0

i forgot password to use sudo and password for logging as root from login prompt I forgot My root Password Please help me To recover my root password.i am not able update my system not able install new software.

3 Answers3

6

Assuming that your user is allowed to execute sudo you can do the following:

  1. Execute bash as root

    sudo bash
    

    Enter the regular password of your user

  2. Change root password using:

    passwd root
    

This will allow you to set root password (without the need for the old password)

muru
  • 197,895
  • 55
  • 485
  • 740
Yaron
  • 13,173
3
  1. Boot into recovery mode from the Grub menu (using shift key if Ubuntu is the only OS)
  2. After the boot, go to the option Drop to Root Shell Prompt
  3. Type mount -o rw,remount /
  4. To reset Password, type passwd username (your username)
  5. Then type a new Password and exit from the shell to the recovery menu
  6. Select resume normal boot
  7. Select Ok
  8. Use your Ubuntu with the new Password
0

Please try this procedure:

  1. restart your computer while holding the shift key until you see the boot options (it may require several attempts)

  2. Moving up and down in the menu with arrows, choose root

  3. on the terminal which opens type "password " followed by your user name (ex "password paul", paul being your user name)

  4. When prompted, enter a new SIMPLE password, confirm.

  5. After re-booting your computer, change again your password to a more sophisticated one.

If you face any problem with step 3 do : mount -rw -o remount /

erlevo
  • 1