Many times people forget the root password of the Linux Servers. Please note that you must have the Grub Password before proceeding with the below steps.

Please follow the simple steps to recover root password of Linux server

  1. Reboot the system and press any button to enter into the Grub mode. Grub is a bootloader which enables you to choose between operating systems at startup. In the bottom, you would find many options. Press ‘p’ to enter Grub password.

Grub Password - Recover Root Passoword Step 1

2. After entering the correct password, you will find the below screen. Just select the OS, for which you want to recover root password and then press ‘e’ to do some editing before booting the server.

Recover Root Passoword Step 2

3. Select the entry where vmlinuz is mentioned  Please press‘e’ again.

Recover Root Passoword Step 3

4. Here you will the command just write  ‘1’ on the command after space to boot it to single user mode.

Recover Root Passoword Step 4


5. Once the system comes up, the shell prompt will appear. Here you can reset the password by using simple Linux command “passwd”.

Recover Root Passoword Step 5

6. Also if you want to disable Grub password, so that next time when entering Grub mode, it does not ask for the password.The same can be done by commenting the password entry in grub.conf file.


Now you are all set to recover root password from the Grub mode.

Leave a Reply

Be the First to Comment!

Notify of