On Jun 8, 2010, at 1:42 PM, Aristoteles Neto wrote:

> On 9/06/2010 08:27, Mark Edwards wrote:
>> Thanks.  I would like the ASSP to be able to restart itself, however.
>> 
>> I guess I will look into modifying my configuration to run as root.  I have 
>> ASSP running as an "assp" user, so that its possible to log in via Samba and 
>> groom the spam and notspam folders, etc.  I'm generally averse to allowing 
>> root login for things, but maybe in this case I should bend that rule.
>> 
> 
> One option would be to configure 'sudo' and allow the assp init script 
> to be executed as root by the user that runs assp, without a password 
> prompt.
> 
> Like so:
> nobody ALL=(ALL) NOPASSWD: /etc/init.d/assp
> 
> Then configure the restart command on ASSP as 'sudo /etc/init.d/assp 
> restart' and it should be able to restart itself.
> 
> Since this will mean that the 'nobody' user will be able to run the 
> script as root, make sure it is only writeable by root, or is chattr'd +i.

This is an interesting idea, but have you actually used it in practice?  I can 
make it work on the command-line, with:

/usr/bin/sudo /etc/init.d/assp start

But putting that same command in AutoRestartCmd results in the ASSP shutting 
down but never starting back up.  I never see a sudo instance logged in 
/var/log/auth.log for the restart from the ASSP web gui, whereas I do when I 
trigger the start command from the command line.

In the gui, I see:

"The following command will be started in OS-shell, if ASSP runs not as a 
service or daemon", which implies perhaps my command is not even being run.

--
Mark Edwards
Audiovisual Coordinator & IT Assistant
Contemporary Jewish Museum
736 Mission Street
San Francisco, CA  94103

direct line: 415.655.7802
fax: 415.655.7815


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Assp-user mailing list
Assp-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to