There are a lot of guide lines on recovering ROOT password in a Red Hat or Fedora, by entering single user mode and change the ROOT password using
passwd command. However the trick isn’t work in RHEL 6 any more, where issuing the
passwd command in single user mode will not prompt you to enter the new password.
Here is a trick where I discover in order to recover the ROOT password in RHEL6.
- First enter single user mode. To do this, boot your machine and wait until the message to enter GRUB (the one with a counter). Press any key to enter GRUB, then press e to edit the boot argument. Just append the word single at the back of the arguments and press enter to continue boot.
- You should enter single user mode, with the root prompt. Instead of using entering only
passwd, enter the following command:
passwd -d root
- “-d” is meant for making the password blank. Now your root password should be blank. Reboot your machine and change your ROOT password.