|
Just Beginning
Introduction Is Ubuntu for You?* Which Ubuntu to pick?
Download and Burn Ubuntu
Install Software
Where's the Terminal? Next Steps Beyond the Basics Playing Around Troubleshooting * Off-site link |
Fix Broken Sudo
How does sudo work?
How does sudo work? You can read more on the community documentation about Ubuntu's implementation of sudo.
Cause and symptoms
If you think it's silly that the last admin user can be so easily removed graphically from the admin group, vote for Idea #11107: Users and Groups should always make sure at least one user is in the admin group on Ubuntu Brainstorm.
Booting into recovery mode
The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.
Do the actual repair adduser username admin where username is your actual username.
Case 2: If you had previously edited the /etc/sudoers file and screwed it up, then type sudo cp /etc/sudoers /etc/sudoers.backup and make it sure it looks like this:
sudo nano /etc/sudoers # /etc/sudoers
When you're done making changes, press Control-X, Y, Enter.
# # This file MUST be edited with the 'visudo' command as root. # # See the man page for details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification # Defaults Defaults !lecture,tty_tickets,!fqdn
# User privilege specification
# Members of the admin group may gain root privileges
Case 3: If you are trying to fix the error where it says sudo is mode _____, should be 0440, then you'll want to type
chmod 0440 /etc/sudoers
When you're done with whatever commands you needed to enter, type exit This will bring you back to the recovery menu.
|
|
If you have suggestions or corrections for these tutorials, please post in this Ubuntu Forums thread or leave a comment on my blog. |
|