Centos7.x破解密码
Centos7.x破解密码
centos7
破解密码
重置Centos 7 Root密码的方式和Centos 6完全不同。让我来展示一下到底如何操作。
1 .在启动grub菜单,选择编辑选项启动

2 . 按键盘e键,来进入编辑界面

3 .找到Linux 16的那一行,将ro改为rw init=/sysroot/bin/sh

4.现在按下 Control+x ,使用单用户模式启动

1490320409353.jpg
5 . 现在,可以使用下面的命令访问系统
chroot /sysroot
6 . 重置密码
passwd root
7 .更新系统信息
touch /.autorelabel
8 . 退出chroot
exi
9 . 重启你的系统
reboot
就是这样!下面给出截图。

1490320617147.jpg
通过以上步骤就可以重置CentOS 7的Root密码了,谢谢阅读,希望能帮到大家,
1>.破解CentOS7 的root口令方法一
启动时任意键暂停启动
按e键进入编辑模式
将光标移动到linux16开始的行,添加内核参数rd.break
按Ctrl-x启动
mount -o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel
exit
reboot
2>.破解CentOS7的root口令方法二
启动时任意键暂停启动
按e键进入编辑模式
将光标移动到linux16开始的行,改为rw init=/sysroot/bin/sh
按Ctrl-x启动
chroot /sysroot
passwd root
touch /.autorelabel # (如果你系统没有开启selinux,那么可以不做这一步)
exit
reboot
备注:1\. touch /.autorelabel 因为在此情況下,SELinux 並沒有启动,对所有文件的更改,可能会造成文档的context(安全上下文)不正确,为确保开机时重新设定SELinux context,必須在根目录下添加隐藏文件.autorelabel。
网友评论