Tuesday, July 6, 2021

How To Change Ubuntu Root Administrative password, if Forgotten

 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.

ALSO SEE: How to Setup Ubuntu Root User Password Using Command

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

 

Reset ubuntu administrative password without Cd

Reboot System

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

root@(none):/# exec /sbin/init

If you got any error like

passwd: Authentication token manipulation error
passwd: password unchanged

This means your mounted root partition is read-only and make it write using the following command:

 
# mount -o remount,rw /

After changing the root password you can also change the other user’s password via terminal or Grub menu.

If you stuck somewhere or have any confusion please let us know…





,,,

No comments:

Post a Comment

Describe BIOS and UEFI

  BIOS (Basic Input/Output System) and UEFI (Unified Extensible Firmware Interface) are firmware interfaces responsible for initializing har...