Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Somehow I managed to change my user to a "standard" account, as opposed to an administrator account, and I don't have any access to sudo, or a backdoor account with admin rights.

Is there anyway I can fix this without having to rebuild the entire machine?

share|improve this question

You can try entering the emergency recovery mode.

Alternatively, boot from a CD or DVD, and mount the drive (say, to /media/hdd). Then, enter the old system via a chroot with

sudo chroot /media/hdd

Once you're in - either via emergency recovery mode or CD/chroot -, fix the problem by editing /etc/sudoers (for example, with the command visudo).

It should read like

Defaults env_reset
root  ALL=(ALL) ALL
%sudo ALL=(ALL) ALL

Also, make sure that your user is still in the sudo group, with the command

usermod -G sudo -a travis

(Most likely, you executed usermod -G without the -a parameter if that's the case).

You can try out sudo by typing su travis, and then sudo -s. If sudo fails, type exit (or press Ctrl+D to get back to your root shell. After you've fixed the problem, simply reboot your old system (remove the CD/DVD beforehand) and everything should work again.

share|improve this answer

Easy way to fix this is to reboot and log into single user mode. To do that you need to press "Esc" before GRUB starts and on the kernel line type "single" or "1".

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .