How To Change Ubuntu Root Administrative password, if Forgotten

If you are using the Ubuntu Linux for testing purpose and forget the administrative or root password then you don’t need to format your system. You can change the root password without any recovery CD/DVD by using the Ubuntu Grub and few commands. This Ubuntu password reset tutorial will guide you through step by step procedure to get the root access. This tutorial can work for almost all current active Ubuntu versions such as Ubuntu 12.04 | Ubuntu 14.04 |Ubuntu 15.04 | Ubuntu 16.04 | Ubuntu 17.04.

How do I reset a lost administrative or root password of Ubuntu Linux?

Reboot Ubuntu Linux System to Grub Menu

Step 1: First of all reboot your Ubuntu Linux box and when bios appear, hold the shift button until you see the Ubuntu Grub Menu as shown in the screenshot.

Step 2: Once you see the Grup menu use the arrow key to select the Ubuntu default menu as shown in the above screenshot and press the “E” key to edit.

Step 3: The Grub edit menu will look like something shown in the screenshot and its time to alter some lines.

You need to find the following line:

ro quiet splash $vt_handoff

Replace the above line with this one:

rw init=/bin/bash

Once the editing has done press the ctrl+X to exit. We are replacing it to get a read and write access.

Step 4: After executing the third step of this tutorial you see the Ubuntu rebooted in shell command and now we need need to mount the root partition with read/write flags. For that run the following commands:

root@(none):/# mount | grep -w /

Step 5: After running the above command successfully simply run the passwd command to change the Ubuntu root password.

root@(none):/# passwd

Reboot System

After changing the password reboot the system to using this command to ignore any error.

About The Author

Rajkumar Maurya is the H2S Media tech expert. He’s always been passionate about technology and has been writing on the subject since 2014. He has extensive knowledge of all kinds of technology, from consumer-tech to enterprise solutions. Follow him on:Twitter | Instagram
You can contact the author at-- raj@how2shout.com