忘记root账户密码无法登陆该如何呢?

开机或者重启启动时 按e进入安全模式
在“linux16....”行  最后输入 rb.break console=tty1
按Ctrl+x
 
mount -o remount /sysroot
chroot /sysroot
passwd
输入新密码:
确认密码:
touch /.autorelabel
exit
reboot
 
本人以测试centos7可执行。

猜你喜欢

转载自www.cnblogs.com/huifeidezhubao/p/9963588.html
今日推荐