重置密码

◇◆丶佛笑我妖孽 提交于 2019-12-04 08:26:37

1 设置随机密码

openssl rand -base64 16 | passwd --stdin root
lab rootpw setup

2 重启,在开机时按F2
3 在加载linux内核的地方添加

rd.break

4 查看/sysroot的挂载情况

mount

5 用读写的方式挂载

mount -o remount,rw /sysroot

6 进入linux终端

chroot /sysroot/

7 修改密码

1 passwd root
2 echo redhat|passwd --stdin root

8 添加启动扫描文件
touch /.autorelabel
9 重启

exit
exit
reboot
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!