HOW TO RECOVER FORGOTTEN ROOT PASSWORD ON REDHAT/CENTOS
As a Linux Administrator some time we face challenges when some how we forgot the root password and without root access we can’t do any kind of administrative task’s in Linux.But luckily there is a easy way to recover the forgotten password.
So let’s have look at the step’s to recover the root password.
Restart the system and press any key to interrupt the normal boot process to use the menu before it enters in to the Operating System.
After interrupt the normal boot process system will allow us to use the menu to edit the grub so that we can recover the root password.
As we can see the system is allowing us to edit the menu by press “e“. So press “e” to go toward next step.
Note :- If you have protected your GRUB by password then it will ask to press “p” to enter the password to unlock the GRUB and then it will allow to edit the menu by pressing “e“.
After the main menu now we moved to a new page where we have to edit the kernel argument by pressing “e”, As we can see in the snapshot above the Kernel argument is there on second line.
Note : -We can move the cursor by UP and Down arrow on the keyboard.
So select the second line as selected above on the snapshot and press “e” to edit the kernel argument.
As we can see after edit the kernel argument we are able to make changes in the line.
Also Read :
So remove the rhgb quiet type single as shown in the snapshot above and then press ENTER.
After make changes the line would look like this as shown in the snapshot above.
Now as shown on the snapshot above select the kernel line and press “b” to boot Operating System in a Single User Mode.
Now it will take to the shell prompt.
At shell prompt just type below command to reset the password.
So this is how we can recover the root password.
If you found this article Useful then Like It, Share It or Subscribe us For Updated Linux Guides and Tutorials. If you have some thing to say then feel free to Comment on the Comment box below.