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.

I'll begin by telling you that I am new to Ubuntu and I am using Ubuntu 11.10.

My problem is that I changed my account from administrator to standard. To be clear, I am the only user in the system.

I am unable to use the sudo command or to install anything on the computer. When the system asks me for the password when installing anything, I found everything useless means non of my old password work.

share|improve this question
    
You can check the accepted answer for this topic for directions: –  Marty Fried Jun 14 '12 at 17:40
add comment

2 Answers

I tried to follow reverendj1's instructions (See above? Below? Every time I refresh this page, the articles swap positions), and they didn't work for me on Ubuntu 12.04.1. I had two issues:

1) Simply booting into recovery mode apparently mounts your root partition as read-only, so you can't modify any system files. Another page addresses this, you need to execute this command from the root prompt in order to obtain write privileges:

mount -o remount /dev/[your root partition]

2) But even after I had write privileges, the useradd -G command wasn't working for me. When I tried to execute it, the system would just return the help screen for the useradd command. I don't know why. But I decided to use usermod -aG instead, and that worked. I added my user name to each of the 16 groups in reverendj1's instructions, one at a time. I was being conservative, I saw some error messages I didn't understand when I was experimenting with useradd. Afterwards, I looked at the man page for usermod, and it looks like you could just list the 16 groups all at once, tacking on the user name at the end.

Here's how you can double-check that you did everything correctly. Compare the output of the following command, before and after you make changes:

more /etc/group

You should see that your user name has been added to the groups you specified.

share|improve this answer
add comment

This is actually fairly easy. By making yourself a non-administrator, you just removed yourself from several groups. First you will need to boot into recovery mode. To do that, reboot your computer, and when the grub menu pops up, highlight the top option that says "(recover mode)" at the end. More information on recovery mode can be found here, https://wiki.ubuntu.com/RecoveryMode

Once everything boots up, you will be dumped at a terminal, logged in as root (no password required). Simply enter the following command (for Ubuntu 11.10):

useradd -G root adm dialout fax cdrom floppy tape admin audio dip video plugdev fuse lpadmin netdev sambashare jay

for Ubuntu 12.04+ it would be:

useradd -G root adm dialout fax cdrom floppy tape sudo audio dip video plugdev fuse lpadmin netdev sambashare jay

Just change "jay" to your actual username. This will make you a member of all the administrative groups again. Reboot and enjoy your new administrativorness. :-)

share|improve this answer
1  
Although that list of groups is nice, the group you need to add for 11.10 is not listed. The group used for sudo access was changed to sudo for 12.04, prior to that, it is the admin group. See wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/… –  bodhi.zazen Jun 14 '12 at 17:43
    
Oops. I passed right over that it was for 11.10. I'll update it. –  reverendj1 Jun 14 '12 at 17:44
add comment

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.