[Thamesvalley-pm] scripting question

ed ed-pm at s5h.net
Tue Aug 14 10:29:24 PDT 2007

On Tue, 14 Aug 2007 14:12:36 +0100
Greg Matthews <gmatt at nerc.ac.uk> wrote:

> Paul Johnson wrote:
> > Cron problems are almost invariably due to environment or
> > permissions problems.  In your case I would tend to be suspicious
> > of the ssh call, in in particular of the permissions of the
> > identify file. 
> >>     $TMPLOG .=  `ssh  -l root -i /etc/mail/.ssh/vid $relay "egrep
> >> -i :INFECTED:  /var/log/maillog" `  
> >   
> except that it reports ok on ClamAV and Sophos viruses! it just
> misses the bitdefender ones.

Might be worth putting something like this into the script:

open( F, ">>/tmp/environment" );
foreach( sort keys( %ENV ) ) {
	print( F "$_ ${ENV{$_}}\n" );
print( F `id` );

to compare with what your user has.

You can add things over to the environment if there's something
important missing.

The bread crumbs to the stereo is unreliable because of some bitchy
farm boy on tatooine. Covad is promising a severance package next week.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/thamesvalley-pm/attachments/20070814/16f76048/attachment.bin 

More information about the Thamesvalley-pm mailing list