忘记Redhat7root密码

第一 重启系统 

第二步:找到如下图的一行

 第三步:按Ctrl+E直接跳到这行的末尾,在末尾加入 rd.break  console=tty0 ,然后按Ctrl +X 继续 

 

 第四步:

输入

扫描二维码关注公众号,回复: 11158268 查看本文章

mount -o remount,rw /sysroot  #挂载/sysroot

chroot /sysroot #切换至系统

passwd root #更改密码

touch / .autorelable #更新系统配置文件

exit  #退出

reboot 重启

 系统重启后 就可以了.

猜你喜欢

转载自www.cnblogs.com/wqx851/p/12810553.html