How to reset root password in Redhat / cento 6

47 viewsLinux
0

How to reset forgotten root password of  centos or Redhat  6 ?

Answered question
0

Root password can be reset through single or rescue mode in  Rehdat or Cent OS 6.

1. Reboot the server

2. Edit Grub screen while booting [after post session]. Select the kernel line,  press “e” to edit the kernel. Type “S” or Single or 1 at the end of Vmlinuz line  then press Enter, Press “b” to  boot the modified kernel line

3. Server will boot to  Single user mode and get  #  prompt

4. Type “passwd” on # prompt to set the new password for root account

5. Reboot the server using “reboot” command, then  boot the server to  multi user mode and access root account using the password.

Answered question