How to change root password in Redhat

This entry was posted in Linux and tagged on June 17, 2012, by

Following is the procedure to recover root password from GRUB using single user mode.

Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first) and then follow the instaruction

  • use the arrows to select the boot entry you want to modify.
  • press e to edit the entry
  • use the arrows to go to kernel line
  • press e to edit this entry
  • at the end of the line add the word single
  • press ESC to go back to the parent menu
  • press b to boot this kernel

The kernel will start booting from single user mode and you will finally get a root prompt (sh#)

Now change the password from the shell

# passwd “enter the new passwd”

Now reboot the system and use the root password.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.