Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
This appears to be a permissions error. This may be useful. –  D4nC00per Mar 12 '13 at 15:37

2 Answers 2

up vote 1 down vote accepted

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
share|improve this answer
    
At the moment i don't have any administrator accounts (so I assume no sudo members ? ) As i said earlier, the terminal says that my current account "standard" is not a sudoer. what do you mean by rescue CD ? I booted from my USB in it bootable version (one i used for installation of OS) i only get installation wizard –  Rabee Mar 12 '13 at 16:21
    
Worked, thank you ! –  Rabee Mar 12 '13 at 17:16

You do not have a root password. Open a terminal and type sudo passwd root then hit the enter and set the password.

share|improve this answer
3  
This will not work - because the OP can't use sudo in the moment. –  H.-Dirk Schmitt Mar 12 '13 at 15:59
    
sudo passwd root Its works for me –  user258397 Mar 15 at 3:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.