Admin password authenticates to log in, but not to install apps or change user accounts

9,277

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.

Share:
9,277

Related videos on Youtube

jmatienza
Author by

jmatienza

Updated on September 18, 2022

Comments

  • jmatienza
    jmatienza about 1 year

    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?

  • jmatienza
    jmatienza over 11 years
    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.)
  • Heather Turner
    Heather Turner over 8 years
    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.