Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

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.