In theory you should use "visudo" to edit /etc/sudoers.. this adds file locking and verification.
You could do something with the $EDITORS environment variable to call a custom script... but then visudo thinks of that and tries to stop you... In conclusion your code looks OK! Alex On 21/04/2008, Tzafrir Cohen <[EMAIL PROTECTED]> wrote: > Hi > > I need to allow the web interface in my live CD to run a few priviliged > commands. > > I prepared a separate sudo_helper scriptand would like to run it through > sudo. Is there any nicer way more proper than editing /etc/sudoers > directly in a postinst script or a live CD chroot hook? > > The current edit command: > > LINE="www-data ALL=NOPASSWD:/usr/share/rapid-scripts/sudo_helper" > if ! fgrep -q "$LINE" /etc/sudoers ; then > echo "$LINE" >> /etc/sudoers > fi > > -- > Tzafrir Cohen > icq#16849755 jabber:[EMAIL PROTECTED] > +972-50-7952406 mailto:[EMAIL PROTECTED] > http://www.xorcom.com iax:[EMAIL PROTECTED]/tzafrir > > _______________________________________________ > debian-live-devel mailing list > [email protected] > http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel > _______________________________________________ debian-live-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

