I just installed Ubuntu 12.04. Then I changed my own user profile to not require a password and log me in automatically. What happened is, I'm still asked for a password once the desktop diplays. Once I'm in, I find my password is not accepted when I'm trying to install an application or make changes to user accounts.

I'm still listed as an administrator, so I figure something must have happened to my password. My question is, why is my password accepted for logging in as a user, but not to do administrator stuff? It's the same password, isn't it? The one I set when I installed Ubuntu.

I tried resetting the password at the root shell prompt (accessed via recovery mode), but I only get an error, with the result "Password unchanged".

Help! Is there something else I can do to avoid completely reinstalling Ubuntu?


I had the same issue. Changing, just a bit, Robin's answer solved the problem...

I've changed a little the steps suggested on: http://www.psychocats.net/ubuntu/fixsudo

  1. Boot in recovery mode as root
  2. Enter the command: mount -o rw,remount /
  3. Enter the command: groupadd admin
  4. Enter the command: adduser username admin
  5. Enter the command: sudo nano /etc/sudoers
  6. Right below root ALL=(ALL:ALL) ALL add this line username ALL=(ALL:ALL) ALL
  7. Press Ctrl+X and answer 'y' to save the changes
  8. Enter the command: passwd username
  9. Enter your user's password
  10. Enter the command: exit
  11. Resume normal boot
  12. You 've made it!!!!

*where username is your actual username.

  • I had this issue when I change my user password on 14.04. The above fix solved the sudo issue, but I had to use this fix to be able to log in again. – Heather Turner Mar 11 '15 at 9:56

The system has removed the user in question from the sudoer's file, which grants admin level permissions.

Instructions for fixing this are available at: http://www.psychocats.net/ubuntu/fixsudo

This page tells you how to get to the root prompt in recovery mode, and provides easy to follow, illustrated instructions for restoring a user to the "admin" group.

If during the process, you get a message telling you that the "admin" group does not exist (as I did) then enter the command: groupadd admin

Then re-do command to add the user to the "admin" group.

  • Thanks for your reply. It is a relief to learn the cause of the problem. Further, as you warned, I did get the message that the "admin" group does not exist. However, when I typed "groupadd admin", I got the following message: groupadd: cannot lock /etc/group; try again later. (Before this I did also type the command to remount the filesystem as read-write.) – jmatienza Apr 30 '12 at 13:46

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.