In this post will guide you simple steps to reset forgotten root password in RHEL, CentOS and Fedora Linux with example. There are various ways to reset root password which are.
- Booting into single user mode.
- Using boot disk and edit passwd file.
- Mount drive to another system and change passwd file.

Here, in this article we are going to review “Booting into single user mode” option to reset forgotten root password.
Cautious: We urge to take backup of your data and try it out at your own risk.
STEP 1. Boot Computer and Interrupt while booting at GRUB stage hitting ‘arrow‘ keys or “space bar“.

STEP 2. Type ‘a‘ to modify kernel argument. Anytime you can cancel typing ‘ESC‘ key.

STEP 3. Append 1 at the end of “rhgb quiet” and press “Enter” key to boot into single user mode.

STEP 4. Type command “runlevel” to know the the runlevel where you are standing. Here “1 S” state that your are in a single user mode.

STEP 5. Type ‘passwd‘ command without username and press ‘Enter‘ key in command prompt. It’ll ask to supply new root password and re-type the same password for confirmation. “Your are Done” Congratulation!!!

What if GRUB bootloader is password protected? We’ll cover in our next article, how to protect GRUB with password and reset the same. Stay tuned…
If you find this article is helpful, or you may have some comments or query about it please feel free to contact with us through below comment box.
When I do this it goes and ask root password for mantinance
@Ravi,
Could you share the screenshot? let me check it.
thanks man great
Yes i have tried this option it works perfect
I followed the same, I had a problem. First, I have two Red Hat Linux servers. Second, I was able to recover the password for the one with OS 5.1.x. I was not able to do it on the Red Hat Enterprise Linux 6.4, it’s an appliance with nGeniusOne from Netscout Systems.
In this box, I was able to boot to the GNUB, but when I type “a” to modify the kernel. Nothing pops up. It keeps showing the OS until I hit “Enter” and it boots to complete. Only one item as there was no previous updates. Can anyone help out?
That was awesome, I followed the same and was able to reset my CentOS password which had stayed blocked for close to a week
Thanks!!!
Wow!!, thats awesome, I was able to reset my REDHAT 5.5 password by following your tutorial. I am soo happy. Thank you very much and keep it up.
Exllcellent write up helped me out grately thank you
I was locked out of centos 6.6 as I had lost my password details by following your easy step recovery procedure I was able to create another password. Thankyou for this very useful information.
Accidentaly i changed the owner root to oroot in the password file at /etc/passwd.
When u tired to logon the system said that root doesn’t exist. How can i change back user oroot to root in the passwd file?
Thanks