Forgotten root Password

July 2, 2010 · Posted in Fedora, Linux, RedHat, centos 

I forgot my Red Hat Server root password. What i need to do to recover the root password?

In RedHat Linux, we can recover the root password by log in single-user mode and create a new root password.

Below are the steps:-

  • Power on, or reboot your RedHat Machines
  • At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.
  • After that, you should see the screen similar to the following
grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet
  • Press the Spacebar once to add a blank space, then add the word single and press Enter to tell GRUB to boot into single-user Linux mode.
grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet single
  • After it finishes loading, you will get a shell prompt
sh-3.2#
  • Now you can change the root password by enter the following command
sh-3.2# passwd root
  • After that, reboot your machine
sh-3.2# reboot

Now you should able to log in to root with your new changed password.

    Comments

    2 Responses to “Forgotten root Password”

    1. ravinder on August 16th, 2010 12:09 pm

      hi guys

      how to change redhat enterprices linux on boot screen pls tell me and change red color

    2. @HKw@! on August 17th, 2010 6:36 am

      Please describe clearly

    Leave a Reply