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.

  • This appears to be a permissions error. This may be useful. Mar 12, 2013 at 15:37

2 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
  • 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, 2013 at 16:21

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

  • 4
    This will not work - because the OP can't use sudo in the moment. Mar 12, 2013 at 15:59
  • sudo passwd root Its works for me
    – user258397
    Mar 15, 2014 at 3:40

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.