Wednesday, February 21, 2018

Reset Root User Password in CentOS Linux

Steps

Step1 – In the boot grub menu select option to edit.
Selection_003

 Step2-Select Option to edit (e).
Selection_005

Step3-Go to the line of Linux16 and change ro with rw init=/sysroot/bin/sh.

Selection_006

Step4-Now press Control+x to start on single user mode.
Selection_007

Step5-Now access the system with this command. Type

#chroot /sysroot

Step6-Reset the password by typing command

#passwd root

Step7-Update selinux information

#touch /.autorelabel

Step8-Exit from chroot type
#exit
Step9-Reboot the system
#reboot

Done.

1 comment: