editing /etc/sudoers

Mario Vukelic mario.vukelic at dantian.org
Sat Nov 29 09:33:20 UTC 2008

On Fri, 2008-11-28 at 23:57 -0700, Robert Holtzman wrote:
> Running 8.04. After adding another user I need to add her to the 
> /etc/sudoers file. 

What *exactly* do you want her to allow to do?

> The Ubuntu forum, 
> https://help.ubuntu.com/community/Sudoers talks about vi being the 
> default editor for visudo in 8.04. Does this provide the same safeguards 
> as visudo did?

You always run "visudo" (which is just unfortunately named). Which
editor actually gets invoked is determined by environment variables.
>From "man visudo":

The following environment variables are used only if visudo was
configured with the --with-env-editor option:

VISUAL          Invoked by visudo as the editor to use
EDITOR          Used by visudo if VISUAL is not set"

So, set VISUAL to your editor of choice and run visudo.

> If I read the docs right the entry to allow the new user to install 
> software would be "username ALL=(username) /usr/bin, /usr/sbin". 

No. This will let user "username" run any program from /usr/bin
and /usr/sbin on any host as user "username" (i.e., must not su to
another user).

> Could 
> someone please confirm this or correct me? Assuming it's correct, is 
> that the only entry required? The docs I saw weren't that clear (or was 
> it me who was dense?).

Which docs? If you ask me, "man sudoers" is hard to read and seems
complicated, but it is very much worth it. Search down to the EXAMPLES

More information about the ubuntu-users mailing list