If for some reason you need to reset your password on Ubuntu here is a guide that will show you how to reset it. You can easily reset the password using the recovery mode option.
To reset the password you need to boot into GRUB, to do that restart your system and press the left Shift key. First select Advanced options for Ubuntu, in the next menu select the line with (Recovery mode). In the next screen select the “root – Drop to root shell prompt” and select
You can now reset the password using the following commands:
First check for the right username:
ls /home
Now mount with the right permissions:
mount -rw -o remount /
To change the password for the right username:
passwd tinuz
Enter the new password (twice)
Enter new UNIX password:
Retype new UNIX password:
If all goes well you will get the following message:
passwd: password updated successfully
This means that the password is changed and you can reboot the system and log in with your new password. To reboot your system use the following command:
reboot
In the code used above you need to replace tinuz for your own username.