重置centos 7 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章