Beruflich Dokumente
Kultur Dokumente
net/ubuntu/fixsudo
Ubuntu inside Windows the /etc/sudoers file has been altered to no longer allow users in the admin group
Dual-boot with Windows to escalate privilege
Install Desktop CD Ubuntu the permissions on the /etc/sudoers file are changed to something other than
Modest Specs 0440
a user who should not have been has been taken out of the admin group
Install Software
Extra Repositories Problem Fixed (as of Ubuntu 10.04):
Security in Ubuntu
Create a "browse as root"
launcher*
Next Steps
Mount Windows
Install Proprietary Software
Install Flash
Install MP3 Playback
Finding iTunes Alternatives
Export as MP3 in Audacity
Use Wine
Troubleshooting
Can't sudo
Graphical sudo
Forgot password
* Off-site link
Cheap Plugs
The most common way to break sudo is through going to System > Administration >
If you've found these tutorials
Users and Groups, and removing the only admin from the admin group (in other words,
useful, please consider donating a
unchecking the Administer the system box for the only user who is able to administer
small amount to one of my
the system).
1 of 3 06/21/2010 08:58 AM
Fix Broken Sudo http://www.psychocats.net/ubuntu/fixsudo
favorite non-profits/charities. If you think it's silly that the last admin user can be so easily removed graphically from
Every little bit helps. 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.
You may also want to consider
donating directly to the Ubuntu
project.
If sudo is broken this way, you may notice an error saying you're not in the sudoers file
and the incident is going to be reported. Or you may just see the next command
prompt without any action being executed.
If you have a single-boot (Ubuntu is the only operating system on your computer), to
get the boot menu to show, you have to hold down the Shift key during bootup.
If you have a dual-boot (Ubuntu is installed next to Windows, another Linux operating
system, or Mac OS X; and you choose at boot time which operating system to boot
into), the boot menu should appear without the need to hold down the Shift key.
For older versions of Ubuntu (9.04 and 8.04), you can press the Escape key during
bootup in order to see the boot menu.
From the boot menu, select recovery mode, which is usually the second boot option.
After you select recovery mode and wait for all the boot-up processes to finish, you'll be
presented with a few options. In this case, you want the Drop to root shell prompt
option so press the Down arrow to get to that option, and then press Enter to select it.
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.
Case 1: If you'd removed your last admin user from the admin group, then type
Case 2: If you had previously edited the /etc/sudoers file and screwed it up, then type
2 of 3 06/21/2010 08:58 AM
Fix Broken Sudo http://www.psychocats.net/ubuntu/fixsudo
(the proper command is actually sudo visudo, which checks syntax before you save the
/etc/sudoers file, but in some older versions of Ubuntu, that command uses the vi editor,
which can be confusing to new users, as opposed to nano, which is more
straightforward)
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
#includedir /etc/sudoers.d
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
When you're done with whatever commands you needed to enter, type
exit
Choose to resume a normal boot. Then you should be able to sudo again.
If you have suggestions or corrections for these tutorials, please post in this Ubuntu Forums thread
or leave a comment on my blog.
I will not give help to people posting in the above places. If you require technical support, start a
support thread on the Ubuntu Forums. That is the appropriate place to ask for help.
3 of 3 06/21/2010 08:58 AM