admin

CentOS 7修改密码/忘记密码

admin linux服务 2020-10-23 85浏览 0

1 – In the boot grub menu select option to edit.

111111111.jpg

2 – Select Option to edit (e).

2222222.jpg

3 – Go to the line of Linux 16 and change ro with rw init=/sysroot/bin/sh.

333333333333.jpg

4 – Now press Control+x to start on single user mode.

44444444.jpg

5 – Now access the system with this command.

chroot /sysroot

6 – Reset the password.

passwd root

7 – Update selinux information

touch /.autorelabel

8 – Exit chroot

exit

9 – Reboot your system

reboot

That’s it. Enjoy.


版权声明

本站《作品展示》类文章均为原创,转载必须注明出处,技术分享类文章部分来源于网络,版权归原作者所有,若侵权请留言。

发表评论
展开