Almost all Linux distros won’t give you with an easy password reset option on the login screen like typically seen in a Windows computer. But don’t worry, it is simple to change the password through the Ubuntu Recovery mode.
This tutorial should work for almost all Ubuntu versions, but just in case if it didn’t do let us know in comments of which version didn’t work for you. I have tested it on Ubuntu 14.04.4 LTS successfully.
Reset root login password in Ubuntu
Step 1: Shutdown the computer.
Step 2: Start the computer and keep the left SHIFT key pressed to boot into Ubuntu boot menu. If you are dual booting with other OS like Windows, then select Ubuntu and then immediately keep the SHIFT key pressing. Note that you are running Ubuntu on VMware, you have to hit ESC button instead.
Step 3: Use UP/DOWN arrow keys to navigate and select ‘Advanced options for Ubuntu’.
Step 4: Select second item in the list ‘Ubuntu, with Linux 4.2.0-30-generic (recovery mode)’. The Linux version in your case may be different depending on your Ubuntu version.
Step 5: Once in Recovery mode (also termed as Safe mode), use arrow keys to navigate and select ‘root’ and hit enter.
Step 6: You should now see a root prompt at the bottom of the same screen.
Currently, Ubuntu file system will be read-only. You must remount it with write permissions:
mount -rw -o remount /
Now we shall use unix ‘passwd’ command to reset the password for an account. You must know the account login name.
root@ubuntu:~# passwd kiran Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully