Admin password authenticates to log in, but not to install apps or change user accounts
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
- Boot in recovery mode as root
- Enter the command:
mount -o rw,remount /
- Enter the command:
groupadd admin
- Enter the command:
adduser username admin
- Enter the command:
sudo nano /etc/sudoers
- Right below
root ALL=(ALL:ALL) ALL
add this lineusername ALL=(ALL:ALL) ALL
- Press Ctrl+X and answer 'y' to save the changes
- Enter the command:
passwd username
- Enter your user's password
- Enter the command:
exit
- Resume normal boot
- You 've made it!!!!
*where username is your actual username.
Related videos on Youtube
jmatienza
Updated on September 18, 2022Comments
-
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 over 11 yearsThanks 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 over 8 yearsI 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.