Linux忘记密码怎么办?root密码找回方法下载
生活处处要用到密码,为了不让密码重复,往往会根据需求设置不同的密码,这样就会造成密码众多容易遗忘的后遗症。那么Linux的root密码忘记了怎么办?要如何找回密码?下面小编就跟大家分享下Linux密码找回的方法。
一、常规修复方式
1、重启linux系统;

2、3 秒之内要按一下回车,出现如下界面;

3、然后知识兔输入e;

4、在 第二行最后边输入 single,有一个空格。具体方法为按向下尖头移动到第二行,按“e”进入编辑模式;

5、在后边加上single 回车;

6、最后按“b”启动,启动后就进入了单用户模式了;

7、此时已经进入到单用户模式了,你可以更改root密码了。更密码的命令为 passwd。

二、使用系统安装光盘的救援模式
救援模式即rescue ,这个模式主要是应用于,系统无法进入的情况。如,grub损坏或者某一个配置文件修改出错。如何使用rescue模式呢?
1、光盘启动,按F5 进入rescue模式;

2、输入linux rescue 回车;

3、选择语言,笔者建议你选择英语;

4、选择us 键盘;


5、这里问你是否启动网络,有时候可能会联网调试。我们选no。

6、这里告诉我们,接下来会把系统挂载在/mnt/sysimage 中。
其中有三个选项:
Continue 就是挂载后继续下一步。
Read-Only 挂载成只读,这样更安全,有时文件系统损坏时,只读模式会防止文件系统近一步损坏。
Skip就是不挂载,进入一个命令窗口模式。
这里我们选择Continue。

7、至此,系统已经挂载到了/mnt/sysimage中。接下来回车,输入chroot /mnt/sysimage 进入管理员环境。

提示: 其实也可以到rescue模式下更改root的密码的。这个rescue模式和windows PE系统很相近。
当运行了chroot /mnt/sysimage/ 后,再ls 看到目录结构和原来系统中的目录结构是一样的。
4、现在的环境和原来系统的环境是一模一样的。你可以输入exit 或者按Ctrl + D退出这个环境。然后知识兔你再ls 看一下。

这个目录其实就是rescue模式下的目录结构,而我们的系统文件全部在 /mnt/sysimage目录下。
下载仅供下载体验和测试学习,不得商用和正当使用。