遗忘Linux root 密码的解决办法

        以前自己装的Linux系统,由于长久未使用,忘记了root密码。为了能使用系统,而不重装系统,从网上找到了解决办法。但是网上办法都不够完整,遂记下解决过程,以备将来使用。

1、进入系统到如下画面;

2、按任意键到如下菜单;

3、按"e"键,进入如下编辑菜单;

4、选中“kernel 。。。”,再按"e”键,进入如下grub edit;

5、在“kernel 。。。”后,加"s";

6、按"enter"键,然后再按"b”键,进入sigle mode;

7、修改密码方法如下:

#mount -t proc proc /proc

#mount -o remount, rw /

#passwd

#sync

#shutdown -r now

 

 

 

1enter the system.JPG

2enter the system.JPG

3enter the system.JPG

4enter the system.JPG

5enter the system.JPG

6enter the system.JPG

8enter the system.JPG

请使用浏览器的分享功能分享到微信等