Reset lost LINUX root password

What if regular user can’t remember his/her password,  superuser can reset the password for the regular user right from the terminal. But what if the superuser  loses his/her password? The following steps will guide you how to recover/reset the Root (super user) password.

1. First you need to power on or reboot the machine and access the GRUB menu. This can be done by holding down the Shift key as the computer is first booting up.

2. Select the “*Advanced options for GNU/Linux” option by pressing the down arrow key and Enter button. press e on your keyboard to edit the commands and look for the line that begins with linux /boot/vmlinuz.

3. Delete the last part of the line “ro quiet splash $vt_handoff” and replace it with rw init=/bin/bash. This will enable read-write permissions.

4. Press the F10 key to save the changes and reboot your system. You will be brought back into a bash prompt, but only on this first reboot.

5. type # mount -n -o remount , rw / then Enter the usual passwd command to set a new root password.

6. Execute the following command to reboot the system and load into the operating system like usual. # exec /sbin/init.

One Reply to “Reset lost LINUX root password”

  1. I do agree with all the ideas you’ve presented in your post. They’re very convincing and will definitely work. Still, the posts are too short for novices. Could you please extend them a little from next time? Thanks for the post.

Leave a Reply

Your email address will not be published.