in reply to Running Perl program w/root privs via cron

This may be completely irrelevant, but are the cascading invocations really necessary ? My suggestion instead of cascading the program invocations, simply set up a crontab distribution scheme that starts the program on each (designated) machine - this is of course different from the commandline/manual invocation, but spares you a lot of hassle/security thoughts.

At my shop, there are lots of rsh/rlogin solutions, so ssh is a major step up here, but as you're running from a cronjob already, you might want to create a special user and distribute his crontab all over the place, and have him mail/otherwise propagate the results from each machine.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

Replies are listed 'Best First'.
Re: Re: Running Perl program w/root privs via cron
by virtualsue (Vicar) on Jun 09, 2002 at 09:44 UTC
    Unfortunately, I didn't tell you some important info -
    1. The app decides which hosts it is going to update dynamically, it doesn't know ahead of time
    2. Eventually it may not be run via cron, it might also be triggered via db updates or some other method
    Your suggestion was very good given what I told you, and I thank you very much for it. :-)