Redhat 7 或者 CentOS 7 密码破解

时间:2023-11-23 11:16:08

1、在如下界面按 e

Redhat 7 或者 CentOS 7 密码破解

2、在 linux16 这一行的最后面添加 rd.break,然后按 ctrl + x 进入单用户模式

Redhat 7 或者 CentOS 7 密码破解

3、以读写的方式重新挂载 sysroot

Redhat 7 或者 CentOS 7 密码破解

4、切换到 sysroot 目录下

Redhat 7 或者 CentOS 7 密码破解

5、设置密码为“redhat”,命令: echo "redhat"  | passwd --stdin root ,或者使用命令:passwd --stdin root ,然后输入明文密码

Redhat 7 或者 CentOS 7 密码破解

6、最后依次输入以下命令,等待重启完成即可(输入最后一个exit后重启,重启时间可能长一点,这是正常现象)

  1)  touch /.autorelabel

  2)  exit

  3)  exit