1

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.

0

2 Answers 2

1

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.

2
  • That ask me to login first Jul 29, 2016 at 18:36
  • so need old ID and pass Jul 29, 2016 at 18:37
0

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:

root:$1$aB7mx0Licb$CTbs2RQrfPHkz5Vna0.fnz8H68tB.:10852:0:99999:7:::

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

root::10852:0:99999:7:::

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.

Not the answer you're looking for? Browse other questions tagged .