基于Red Hat Enterprise Linux 7.5html
在启动引导主页上按e进入内核编辑htm
找到 Linux16 这一段,在末尾处添加 rd.break,按下组合键CTRL+X运行内核程序进入紧急救援模式blog
在这个模式下依次输入如下命令rem
mount -o remount,rw /sysrootit
chroot /sysroot程序
passwd # 注意:到这里的时候会提示输入两次须要重置的密码,输入完成以后回车便可密码
touch /.autorelabelim
exittouch
rebootimg
从新进入系统输入刚刚重置的密码便可登录root帐户
转自:https://www.cnblogs.com/alicetia/p/9348934.html