Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 20834  / 2 Years ago, tue, august 9, 2022, 7:42:34

Recently I installed Ubuntu 12.04 (first time on Ubuntu).



I have my normal "administrator", and another Guest account.



I was experimenting today with the user accounts, and set my "administrator" account to "standard" in user account settings.



Now whenever something asks me for authentication, it gives me failed message.



I am using the same old password, didn't create new accounts, just changed privileges.
I'm sure that the password is correct, because I can still log in.



I tried logging in to root from Terminal, but it gave me that I'm not one of the sudoers.


More From » 12.04

 Answers
2

The sudoers file works normally via group membership of a user.



As default, you have the following configuration in ubuntu:



 # Members of the sudo group may gain root privileges
%sudo ALL=(ALL) ALL


As I understand your description, you have dropped the group membership for the sudo group.



Hopefully you have left over another account which is member in the sudo group.
If this is true, you can use the following command to fix your user:



 sudo usermod -a -G sudo  USERNAME


If you have given your root user an explicit password (non standard in ubuntu), you can also invoke:



 su -c usermod -a -G sudo  USERNAME


If both isn't possible, you may do the following:




  1. boot your computer with a live/rescue cd (see also https://wiki.ubuntu.com/RecoveryMode)

  2. mount your root partition (aka /) to e.g. /mnt

  3. chroot /mnt usermod -a -G sudo USERNAME


[#32249] Wednesday, August 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
fieldcheon questions
Fri, Apr 1, 22, 05:58, 2 Years ago
Wed, Feb 2, 22, 03:31, 2 Years ago
Sat, Aug 14, 21, 01:24, 3 Years ago
;