sudo configuration help

John Macdonald john-Z7w/En0MP3xWk0Htik3J/w at public.gmane.org
Tue Jun 5 16:37:58 UTC 2007


On Tue, Jun 05, 2007 at 10:46:46AM -0400, Neil Watson wrote:
> Untested:
> USERS   smtp.example.org = /bin/vi /etc/exim/smtp-auth

That would run vi as root.  While editting the specified file,
the user would be able to open and edit any other file they
wished during the same editting session.

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.

-- 
--
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