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



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'.
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
sure...

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.

Cheers

-- 
Juanje



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