重启Linux系统进入引导界面,按键盘 e 键进入内核编辑界
在linux16参数行按 ctrl+e 光标定位到末行,输入“rd.break"参数,按 ctrl+x
进入系统的紧急求援模式,依次输入命令
mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel
exit
reboot
重新启动系统,输入新密码就完成了
RHEL 7 / Centos 7 重置root密码
最新推荐文章于 2024-07-12 11:34:40 发布