How to Reset a Ubuntu Password

From the beginning of computers, they have always been protected by some sort of password so that the data inside the computer is safe and sound. Regardless of the protection, the common tech problem is that almost everyone is forgetting their user account password which essentially gives access to the computer and the data in it. Well, this case is not any different if you are using a Linux-based operating system like Ubuntu.

So, if you ever forgot your user account password in Ubuntu, here is how you can reset a Ubuntu password.

Note: Even though we are showing this in Ubuntu, this procedure will work on any Ubuntu-related distributions like Linux Mint, Lubuntu, etc.

You can easily reset a user account password in Ubuntu using a couple of commands. To do that, boot up your Ubuntu machine and press the ESC button continuously after the BIOS screen to open Ubuntu’s GNU GRUB menu. Here select “Advanced options for Ubuntu” using your down arrow key and press the enter button.

reset-ubuntu-password-advanced-options

The above action will open advanced options; here select the “recovery mode” to open the recovery menu.

reset-ubuntu-password-recovery-mode

Select “root – drop to root shell prompt” from the list of options to open the root shell.

reset-ubuntu-password-drop-to-root-shell

The above action will open the command line interface. Here enter the following command and press the Enter button. What this command does is that it will remount the filesystem with write permission.

mount -o rw,remount /

reset-ubuntu-password-enable-write-permissions

Now enter the following command to list all the user account names, so that you can easily reset the password of a specific user account. As you can see from the below image, my Ubuntu machine currently has two user accounts.

ls /home/

reset-ubuntu-password-list-usernames

Now to reset the password of a specific user account, use the command below and press the Enter button. Also, don’t forget to replace “username” with the actual username of your user account (In my case, its “stugon”).

sudo passwd username

Once you replace the username, the command will look something like this.

sudo passwd stugon

As soon as you press the enter button, Ubuntu will ask you for a new password. Just enter the new password twice and you should receive a confirmation message “password updated successfully.”

reset-ubuntu-password-enter-new-password

Once you are done changing the password, type the command

exit

and press the enter button to return to the recovery menu. Select “resume normal boot” to start using your Ubuntu machine with the new password.

reset-ubuntu-password-resume-normal-boot

You may receive a warning message something like the one below; nothing odd, just press the Enter button to reboot.

reset-ubuntu-password-warning-message

Once you log in in to your Ubuntu machine using your new password, you can start working just like nothing has ever happened.

reset-ubuntu-password-ubuntu-home

That’s all there is do, and it is that easy to reset forgotten Ubuntu user account passwords. So what do you think of it?? Do you think Ubuntu or other Linux distros are vulnerable, or do you think of it as an awesome feature that helps you in the time of need?? Do share you thoughts using the comment form below.