Reset password on an Ubuntu VM

Shruthi Gurudath
2 min readAug 18, 2020

--

We have all been there at least once, yeah, forgetting the passwords !! It is like leaving the house key inside and locking ourselves outside the house.

In this article, I am showing how to reset the password in Ubuntu.

Step 1: Restart your Ubuntu machine
Unfortunately, the boot screen just flies right by in Ubuntu under VMWare. So the first thing you’ll need to do is shut down the VM, and then get ready to start it up. But before you start the VM: get ready to hit Shift because that's what will get you into Grub. Ready? Ok. Boot it and hit Shift.

Now you should be in Grub. If you don’t get it, don’t worry, just shut down and try again.

Step 2: Select Advanced Option in ubuntu

Step 3: Recovery menu will be listed as below

Step 4: Select root option from the menu

Step 5: Give ls /home to see the users
This is the single-user mode where you are root. Your / filesystem may be mounted as read-only at this point. Type this to mount it as read-write:
mount -rw -o remount /

Step 6: Give passwd (username) to set the new UNIX password

There you go, your password is set now. Simple right!

--

--