Forgot username and password in Ubuntu NO PROBLEM ;-)

Posted: May 7, 2009 in Linux
Tags: , , ,

Hello friends,

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.

cheers, Balachandar.K.M

About these ads
Comments
  1. nava says:

    nice info……i need it

  2. ubuntucat says:

    It’s even easier than that. Just select recovery mode from the bootup menu, and that takes you to a root prompt. No need to edit the boot lines manually.

    More details here:
    http://www.psychocats.net/ubuntu/resetpassword

  3. emycmgcqg says:

    Nice…..I m searching this ….

  4. infoqueue says:

    ya..you can do in that way too…but it wont work all the times..in my system recovery mode asks root password to get into root shell..
    but the above method wont ask any password for sure…:-)

  5. mulenmar says:

    I know it’s rather late to say this, but this method is also a major, MAJOR security hole. If someone can get physical access to your computer, they can use this method to do exactly what you’re showing: gain root access to your computer, and ALL of its data.

    So please, set up a GRUB password folks, and at least remember THAT. Make it your Social (in)Security number, or whatever your country’s equivalent is.

  6. masterbike says:

    Thank you for the help in my case when i go to step 8 i don’t see what i was writing but i wrote it and its ok returns the user name that i don’t remember (stupid)
    Thanks

  7. chris says:

    umm when i get to 8 i put in the cd home command and it brings up another thing that says :/home# what do i do? i doesnt show me any usernames

    • infoqueue says:

      Oops…After getting into the home directory with the “cd home” command , type “ls” ( without quotes ) command in your root terminal to see the list of user names.

      NOTE : POST UPDATED.

  8. rinzetsu says:

    I just purchased a HP Mini 110 running ubuntu. A typo during computer setup made the computer useless. HP has no ubuntu support techs, doesn’t ship restore CD’s and has no software restore software available for download. They only solution they offered was for me to ship the laptop back at my own expense so they could reload the system. Worst technical support experience of my life.

    This solution was a godsend. Thanks for taking the time to respond. I shared the solution on the HP website for others to use.

  9. Marsje says:

    TNX! What else do I need to say?

  10. Goodman says:

    OK, I did every step, and it even told me password had been reset. After I typed “ls” I just got back username so I figured “username” was the username. Then when I reboot it still does not let me in. This is a HP labtop I bought from a School district that was used then they wipe it out and load this free Ununtu without telling you a password and username to use the thing!. What am I missing?

    • #codeRider says:

      when you try to reset your password try this,
      net@system$passwd
      Then change the password.If you use passwd without username then you are changing your root password as you are currently a root user.Let me know after you try this.

  11. Goodman says:

    No, it says command not found when I tryed that. What happens is I type cd home “enter” then ls “enter” and it comes back “username” then I type passwd “enter” then it says “Enter new UNIX password:” Which I’ve been doing the one letter password and then rebooting but it still does not let me in.

    Also, been thinking of geting windows xp OEM version to load on it. I figure it will take over and let me use the thing. Is that right?

  12. DAYWALKER says:

    Ummm what if your ubuntu is’nt on your harddisk but on a network that auto boots it up?

  13. seshagiri says:

    Excellent solution – I could not find it anywhere else. It helped me.
    –seshagiri

  14. It’s not working at all for mine Idk how yhu guys are getting it…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s