The way to reset the root on 7 is totally different to 6. Let me show you how to reset root in CentOS 7.

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

grub_menu1

2 – Select Option to edit (e).

grub_menu2

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

grub_menu3

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

reset_password_centos_7

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
Print Friendly, PDF & Email

Comments

comments

Bài viết liên quan