Linux下redhat/Centos破解root用户密码
2020-10-26 本文已影响0人
陳陳陳ccc
#开机时按E键进入
#在rhgb quiet后加rd.break然后ctrl+x进入到了系统的紧急求援模式
rd.break
#重新挂载sysroot设置读写权限
mount -orw,remount /sysroot/
#切换到root目录下
chroot /sysroot
#修改密码
echo 1 | passwd --stdin root
#据说是selinux在重启后更新label
touch ./autorelabel
#两次退出
exit
![](https://img.haomeiwen.com/i9650472/e2d934eaea312950.png)
![](https://img.haomeiwen.com/i9650472/a7d1e1a29828d03e.png)
![](https://img.haomeiwen.com/i9650472/b8558ff1db29a2d8.png)
![](https://img.haomeiwen.com/i9650472/64269af168f6b2af.png)