1、启动系统,光标移动到忘记密码的系统内核上,键入‘e’

2、见下图,在对应位置键入‘rd.break’(注意空格),'Ctrl+x'进入下一步

3、执行两条命令:①:mount -o remount,rw /sysroot②:chroot /sysroot

4、设置新密码:echo 新密码 莽炭克假| passwd --stdin root打标签:touch /. autorelabel键入:exit 两次等待系统重启使用新密码登录即可。

1、启动系统,光标移动到忘记密码的系统内核上,键入‘e’
2、见下图,在对应位置键入‘rd.break’(注意空格),'Ctrl+x'进入下一步
3、执行两条命令:①:mount -o remount,rw /sysroot②:chroot /sysroot
4、设置新密码:echo 新密码 莽炭克假| passwd --stdin root打标签:touch /. autorelabel键入:exit 两次等待系统重启使用新密码登录即可。