2

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?

Paindeer
  • 69
  • 1
  • 3
  • 9

2 Answers2

2
  • 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

(source)

0

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

ubfan1
  • 17,838