Re: [orca-list] Problem in /etc/sudoers


On Sat, Oct 02, 2010 at 04:59:41PM +0200, Juanje Ojeda wrote:
2010/10/2 Jason White <jason jasonjgw net>:
André Baldo <supermalavox gmail com> wrote:
Is there an accessible way of restoring /etc/sudoers in Ubuntu 10.04?

If you can still use sudo or su to become root, then use your favourite editor
to edit /etc/sudoers.

If you can't become root, then boot a live CD (preferably one that supports
your accessibility requirements), mount the root file system of your Linux
installation and edit etc/sudoers. Finally, reboot.

See the sudoers (5) manual page for details if you don't know what's wrong
with your sudoers file.

Editing /etc/sudoers file is always a risk, so if you want/need to do
it, instead of use directly the editor, I recomend to use 'visudo'.

you can if you want, I typically do personally, but its not really
risky. For it to at be at all a problem you have to one not know the
root password, which is a very bad situation, and two not be obeying the
rule about keeping a root shell open until your changes are tested. If
you don't have a root password on a machine you should fix this, and
learn to keep the root shell open until the changes are tested.


This command will check the syntax before you exit the editor and warn
you so you can fix it.

Normally 'visudo' will launch the editor you have defined by default
in your envirnment settings (this is terminal stuff...): VISUAL or
EDITOR. Which I think is nano in Ubunto and 'vim' in others... I'm not

But probably you want to use something simplier as GEdit. You can
launch it doing from a terminal:
VISUAL=gedit sudo -E visudo

You can use the editor you preffer instead gedit, of course. The '-E'
flag in 'sudo' is for using the user enviroment variables (as VISUAL).

Once you have saved the file (actually a temporary file) and exit from
the editor you'll get a message at the terminal about if the 'sudoers'
file was changed successfully or if it's had syntax errors and need to
be fixed before to be saved.

I know this is now pretty stuff for not technical user, but editing
the 'sudoers' is not a safe thing to do without knowing.

I hope this will help.


orca-list mailing list
orca-list gnome org
Visit for more information on Orca.
The manual is at
The FAQ is at
Netiquette Guidelines are at
Log bugs and feature requests at
Find out how to help at

Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]