破解CentOS7 口令的兩種方法

方法一:

1、啓動時任意鍵暫停啓動

2、按e鍵進入編輯模式

3、將光標移動linux16開始的行,添加內核參數rd.break

4、按ctrl-x啓動

5、mount –o remount,rw /sysroot

6、chroot /sysroot

7、passwd root


8、touch /.autorelabel (打標籤,selinux禁用不用操作這一步)

9、exit

10、reboot



方法二:

啓動時任意鍵暫停啓動
 按e鍵進入編輯模式
 將光標移動linux16開始的行,改爲rw init=/sysroot/bin/sh
 按ctrl-x啓動
 chroot /sysroot
 passwd root
 touch /.autorelabel
 exit
 reboot

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章