第1步:重启Linux系统主机并出现引导界面时,按下键盘上的e键进入内核编辑界面

第2步:在linux16参数这行的最后面追加“rd.break”参数,然后按下Ctrl + X组合键来运行修改过的内核程序,如图

centos 系统重置root密码操作

第3步:大约30秒过后,进入到系统的紧急求援模式

第4步:依次输入以下命令,等待系统重启操作完毕,然后就可以使用新密码linuxprobe来登录Linux系统了

mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel
exit
reboot

相关文章: