LINUX之重置root密码(破解密码)


Linux破解密码

  • 重启系统

  • 到达logo界面快速 按 e 编辑当前条目

  • 将光标移至以 linux 开头的行,此为内核命令行

  • 在UTF-8后添加 rd.break

  • 按 ctrl+x 继续启动

  • 重新以读写方式挂载/sysroot
    mount –o remount,rw /sysroot/

  • 切换至真正操作系统的根/sysroot
    chroot /sysroot

  • 重置密码
    echo redhat(此处为密码) | passwd --stdin root

  • 打标签
    touch /.autorelabel

  • exit 退出两次

  • 稍等一会 让虚拟机自动重启即破解成功