1. 程式人生 > >重置centos 7 root密碼

重置centos 7 root密碼

centos7 破解root密碼 重置

1、1、啟動的時候,在啟動界面,相應啟動項,內核名稱上按“e”;
2、進入後,找到linux16開頭的地方,按“end”鍵到最後,輸入rd.break,按ctrl+x進入;
3、 mount -o remount,rw /sysroot
4、 chroot /sysroot
5、 passwd修改密碼
6、touch /.autorelabel
7、grep SELINUX /etc/selinux/config
8、sed -i ‘s#SELINUX=enforcing#SELINUX=disable#‘ /etc/selinux/config
9、exit;exit

重置centos 7 root密碼