Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I travelled from South America and I installed my old HDD and I forgot my Sudo Password. Please help me in retrieving it. Thank You.

share|improve this question

marked as duplicate by Jorge Castro, Luis Alvarado Mar 14 '13 at 19:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Reboot into the recovery option (in grub). You may have to hold shift while booting to see grub. Then, at the shell run the command:

passwd yourusernamehere

Enter a new password and reboot.

share|improve this answer

Boot up using a Live CD like DSL or Slax. Then open etc/shadow of Ubuntu partition (which you've forgot it's root password) where you see something like below:


Just remove the string betwwen first : and second one i.e. you should have


Save the file and you'll be able to login to root without any password. And root can change your other user's passwords.

If you have already another host like Windows, you can use for example ext2fsd to open the file in Windows rather than a Live CD.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.