Re: running a command with sudo

2008-04-22 Thread Tzafrir Cohen
On Tue, Apr 22, 2008 at 12:55:17AM +0100, Chris Lamb wrote: Alex Owen wrote: The above should work... but read visudo man page... This is all totally pointless. Just append your line to /etc/sudoers in a live-initramfs hook: this is what it does itself, so it's difficult to see why you

Re: running a command with sudo

2008-04-22 Thread Alex Owen
On Tue, Apr 22, 2008 at 12:55:17AM +0100, Chris Lamb wrote: Alex Owen wrote: The above should work... but read visudo man page... This is all totally pointless. Just append your line to /etc/sudoers in a live-initramfs hook: this is what it does itself, so it's difficult to see

Re: running a command with sudo

2008-04-21 Thread Alex Owen
Hmm... Not sure why you dislike /etc/sudoers so much... that is the only way to configure sudo! If you hate sudo that much why not use apache's suexec for example... or suphp ... again these need configuring. You may be able to do someting with selinux... but that is beyond me... mind you it may

Re: running a command with sudo

2008-04-21 Thread Trent W. Buck
On Mon, Apr 21, 2008 at 04:50:46PM +0100, Alex Owen wrote: 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... VISUAL=mg visudo ? ___ debian-live-devel

Re: running a command with sudo

2008-04-21 Thread Alex Owen
NO... Think about it people... ~/bin/myedit: ---8--- #/bin/bash LINE=www-data ALL=NOPASSWD:/usr/share/rapid-scripts/sudo_helper if ! fgrep -q $LINE $1 ; then echo $LINE $1 fi ---8--- chmod u+x ~/bin/myedit EDITOR=~/bin/myedit visudo The above should work... but read visudo man page...

Re: running a command with sudo

2008-04-21 Thread Chris Lamb
Alex Owen wrote: The above should work... but read visudo man page... This is all totally pointless. Just append your line to /etc/sudoers in a live-initramfs hook: this is what it does itself, so it's difficult to see why you could have any qualms about doing so too. Regards, -- Chris