How to Reset The Linux Root Password

Posted by Tully on Sun 30 June 2013

Do you have a Linux server you forgot the root Password to?

In this tutorial, I will show you how to reset your forgotten password. We will be resetting the root password by booting into single user mode (Run Level 1) from the GRUB Menu.


Start / Restart the server. When it's first booting up, you will see a screen like the one shown below. Press any key before the countdown ends to bring up the GRUB Menu.

countdown menu

grub main menu


From the grub menu shown above, press the letter a to go into append mode. Now that your in append mode, press the spacebar and type the number 1 and hit enter. This will boot you into single user mode.

grub append mode


Now that your in Single User Mode, you will have full root privileges. An example of this prompt is shown below. To reset the password, simply type passwd root at the command prompt. Fill in the new password and hit enter. You will be prompted to retype your new password. After setting up the new password, restart the server by typing reboot and hitting enter. When the system finishes rebooting, you may log into the system with the root password you previously set-up.

single user mode change root password