In the terminal, whenever I try to perform sudo, Ubuntu asks my password and it always says I typed it in wrong.

I tried changing the password as root, but then it says password unchanged.

My user don't have to enter its password on the login screen, and I think that may have something to do with it.

Does anyone know how to fix this?

  • Boot in recovery mode as root

perform these commands:

  • mount -o rw,remount /
  • nano /etc/sudoers

Look for a line containing root ALL=(ALL:ALL) ALL, below that add this line:

your_username_here ALL=(ALL:ALL) ALL

(change your_username_here to your actual username)

(Press Ctrl+X to exit nano, and answer 'y' to save the changes)

  • Enter passwd your_username_here and set a new password.

(change your_username_here to your actual username)

  • Reboot


| improve this answer | |

Assuming you have the right password, double check your caps-lock and num-lock keys. Those can mess up your password.

| improve this answer | |
  • I have no caps lock on or num lock, but I did make it so my user doesn't have to enter their password and I think that may have something to do with it. – Paindeer Jul 20 '13 at 19:08
  • @Paindeer this information is important, I have suggested an edit to include it – That Brazilian Guy Jul 20 '13 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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