rhel 7 破解开机密码

1.开机时按e进入编辑状态,找到linux16 所在行,末尾添加 rd.break    console=tty0  按ctrl + x  进入单用户模式。

2.以可读写的方式重新挂载根系统,   mount   -o   remount,(逗号)rw   /sysroot

3.切换到根系统 ,   chroot   /sysroot

4.设置新密码,   echo  123456   |passwd  --stdin root

5.标记下一次启动重做 SELinux 标签,    touch  /.autorelabel

6. 退出,exit

7.重启, reboot

猜你喜欢

转载自blog.csdn.net/wubude/article/details/81122053