Archive

Archive for November, 2008

Ubuntu lost password!

November 28, 2008 1 comment

This is one sad thing you come across after may be realising that you badly need linux for some work which is impossible in windows(believe me there are some such things…) So you realise that you do have linux installed(you were feeling all geeky some time in your past) At once you restart your computer and switch to linux. Then they ask you for the username and password! Most probably your username is your name but as i said you were feeling geeky when installing it long ago you have definitely kept some not-to-be-known-super-nerdy-password huh..!

Now you don’t remember it! Unlike other OS, no hint questions, but only an adamant screen asking the same question and wont let you proceed. Realize that passwords should be always from some of your standard known ones (or rather md5() of your name or md5 of “your_name;” – quite geeky and no need to remember;)

Steps to do:

  1. Restart your computer
  2. When you reach your grub press ‘ESC’ then press ‘e’ to enter the edit mode
  3. Go to your ubuntu kernel line and press ‘e’
  4. go to the end of line and add -> rw init=/bin/bash
  5. Press enter
  6. press ‘b’ to boot
  7. Now as it boots it will lead you to the full access root terminal, obviously as root
  8. at the prompt type passwd username and it will ask for a new unix password, set it and done
  9. Suppose you do not know the username, then type -> passwd -a -S which will list all the users and from there you can check it out!
  10. Restart your computer and login with new password

Now that you have done so much to get into linux again, please do something productive there and stay there for some time…it isnt for geeks but for work!

PS: rm -rf  – whoever you are, whatever you do, please please do not try this at home or at workplace!

PPS: An easier way out – http://www.psychocats.net/ubuntu/resetpassword courtesy – A.Y. Siu, see comments