If you forgot your password of Ubuntu/Linux operating system, You can recover using the following step:
First of all when you see the Grub promptly Press 'ESC' button
Then Press 'e'
Now Highlight the line that begins kernel......., press 'e'
Go to the very end of the line, add rw init =/bin/bash
Now press enter, then press 'b' to boot your system.
Now your operating system Ubuntu/Linux other version will boot up to a password less root shell.
Type in username & enter this command passwd
Now set your password and Reboot.