At first Reboot your computer, then you will show GRUB version dialog box, from here select 2nd option that means Recovery mode. If GRUB is not show then restart again and press Shift Button then you will get a dialog box. From here, select Advance Option for Ubuntu & go to recovery mode, After recovery mode start you will get another window. from here select “root Drop to root shell promt” now you will see blew screen start command terminal , here write the command : mount –rw –o remount/ by this command your root directory will be remount and then give the command : passwd your user name(passwd & your user name). now give new password and again give password for verified and then press ENTER.
you will see like as-
Enter New UNIX password:
Retype new UNIX password:
passwd: password update successful
Password change is done.
if you forget you user name then you can use this command : ls /home