重新启动系统,在启动grub菜单,选择编辑选项启动。
按键盘e键,来进入编辑界面
将ro改为rw init=/sysroot/bin/sh
再按下 Control+x ,使用单用户模式启动
输入命令:
chroot /sysroot
passwd 密码
touch /.autorelabel #更新系统信息
exit #退出chroot
exec /sbin/init 5 或 reboot #重启系统
密码修改成功
原文:http://www.cnblogs.com/jw1519/p/6223283.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!