It is not uncommon to forget your passwords when you have several devices or operating systems to manage. This guide gives a simple step-by-step procedure to recover your ubuntu account. It works on the latest version of ubuntu, but I decided to try it on an older version. This should also be a good guide for other Linux distros since they are all based on the same principle.
When you forget your password, you don’t need to reset or reinstall your operating system. All you need is a bit of patience and calmness. Within a few minutes, after running a couple of commands, you should be done and get back to work.
[adinserter name=”Block 2″]
Reset Ubuntu password via recovery mode
Step 1
Boot into Recovery Mode. Switch on your PC, and go to the GRUB menu if it appears automatically. If it doesn’t, hold down the shift or escape key while booting until the boot menu appears. In the GRUB menu. In the listed menu, press the down arrow key on your keyboard to select the “Recovery Mode” or “Advanced Options for Ubuntu”. Press Enter.

Step 2
In the recovery mode menu, scroll to select root and press enter.

Step 3
A root shell is opened at the bottom. Your next task is to mount and make the root folder writeable by typing mount -rw -o remount /

Step 4
Check the username of your shell by typing ls /home

Step 5
Next, change your password by entering the new password typing passwd “username” Replace with the username displayed in step 5. Note that, nothing will be displayed while you type the password, so be sure of what you are typing.

Step 6
Enter the password again when asked to, and press enter.

Step 7
You should get a message like “Password updated successfully” when you are successful. Type exit or reboot to exit your shell and restart your PC.

Step 8
Login with your new password and get to work
