在开机时按e进入编辑启动列表
在UTF-8那一行加入 rd.break
ctrl-x自动重启,进入编辑
重新mount sysroot,确保rw
mount |grep /sysroot
mount -o remount,rw /sysroot
chroot /sysroot
设置新密码为test
echo test|passwd --stdin root
最后一步,重要!不做就不生效(针对SELinux)
touch /.autorelabel
两次exit 重启
SELinux relabel
重启后测试使用root密码 test生效
done