sudo configuration help

Ian Petersen ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Jun 5 16:19:54 UTC 2007


On 6/5/07, Kihara Muriithi <william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> > It would be better to write a short program that copied new
> > contents over top of the specific file and run that with sudo.
> > I'd then actually use a wrapper script that made a copy of the
> > original, let the user edit it, provided some validation and
> > asked for confirmation, etc., and then ran the sudo program
> > to install it.
> A do agree, and someone has to have implemented it somehow

My sudo package includes a -e option, which can be invoked as either
sudo -e or sudoedit that claims to do exactly what you want--allow a
non-root user to safely edit files.

According to man sudoers, you can give users permission to use
sudoedit as follows (untested):

USERS smtp.example.org = sudoedit /etc/exim/smtp-auth

Users that intend to edit /etc/exim/smtp-auth can do so with either of
the following commands:

sudoedit /etc/exim/smtp-auth
sudo -e /etc/exim/smtp-auth

Ian

-- 
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list