In ubuntu you have to remember your USERNAME and PASSWORD for every single login session.Sometimes you may leave your Ubuntu untouched for weeks because of your work. When you want to login after a long period,possibly you may forgot your USERNAME as well as your PASSWORD too.
So what to do now.Do i need to reinstall my ubuntu again.Oh !!! god i have to loss my data.I know most of the users are panicked at these times.But i m here to rescue you friend ;-)No more worries….
Jus follow these simple steps to reset your password.
1.Buring the boot up go to GRUB MENU( It shows a list of operating systems installed in your hard disk).
2.Select Ubuntu and Press “e”.
3.Now it ll show three lines.The second line ll start with the string “Kernel”.
4.Select this line and press “e”.
5.At the very end of the line add the this string without quotes “rw init=/bin/bash”.
6.Now press “Enter” and then press “b” to boot up.
7.Now you ll be dropped into a root shell with full permissions.
8.Type “cd home” without quotes.It ll show the list of user names.So Here you can find forgotten username by using “ls” (without quotes ) command.
9.Now type “passwd ” without quotes.
10.It ll ask new password for two times.Thats all You successfully got your ubuntu back….;-)
11. No more steps…..Keep rocking…..
NOTES: I tried this trick in Ubuntu 8.10.It works fine.But in the root shell it doesnt show the command what you type.Just keep typing and press enter.It ll work.It also accepts only one letter password.You can easily changr your password again after successfully logged in.