How to reset ubuntu 20.04 forgotten root password

I have forgot my ubuntu login password installed few years ago

I want to recover the os.

I have looked into stack overflow for the recovery process.

Pressing esc or shift key on grub menu entry wont works in my case

How to boot into recovery mode and reset the password

try this method brother

2 Likes

@Linux_User I have Ubuntu os 20.04 does changing grub menu option do i have to revert after the password change

I will try and let you know brother

Steps Captured from the Video
Linux Boot Menu entry
ro → rw
init=/bin/bash

My grub version is 2.04
Linux entries like shown in the menu is not available there

Where to get the linux kernel image version file name to boot and start bash like shown in the video reference you sent

The Above Video Reference contains for the Virtual Machines
In My case that also worked
The setup i have

  • MBR Partition contains two OS (Older Harddrive)
    1.Windows 10
    2.Ubuntu 20.04.6(need to be reset password))

  • GPT Partition contains OS
    1. Windows 10 Primary

To every time access grub menu need to reboot the the system using advanced startup setting by choosing old harddrive there.

Due to the above setup i’m not able to access the MBR Partitions grub menu directly

linux {linux.kernal.image.version} ro quite splash

linux {linux.kernal.image.version} rw quite splash init=/bin/bash

then Ctrl + X

After Executing the bash shell opened i have checked the available username in /home folders i found the username i wanted to reset the password

after changing password successfully

exit command on the bash shell redirected me into kernal panic
i have shutdown the system by force power off
then rebooted manually
The video reference works for me

Thanks @Linux_User

2 Likes