1- 在启动界面选择  centos linux, with linux***.x86_64(第二行)

CentOS7 忘记密码解决办法

 

2 - 按键盘e键,来进入编辑界面

CentOS7 忘记密码解决办法

 

3 - 找到Linux 16的那一行,将ro改为rw init=/sysroot/bin/sh

CentOS7 忘记密码解决办法

 

4 - 现在按下 Control+x ,使用单用户模式启动

CentOS7 忘记密码解决办法

5 - 现在,可以使用下面的命令访问系统 chroot /sysroot

6 - 重置密码 passwd root

7 - 更新系统信息 touch /.autorelabel

8 - 退出chroot exit

9 - 重启你的系统 reboot

就是这样!

相关文章:

  • 2021-07-04
  • 2021-11-22
  • 2021-11-28
  • 2021-09-15
  • 2021-09-04
  • 2021-10-04
  • 2021-06-07
猜你喜欢
  • 2021-12-23
  • 2021-10-17
  • 2021-09-26
  • 2021-12-04
  • 2021-12-04
  • 2021-10-09
相关资源
相似解决方案