From mboxrd@z Thu Jan 1 00:00:00 1970 From: dean@defreitas.net Subject: ausearch & aureport fail from cron Date: Wed, 30 May 2012 14:34:14 +0000 (GMT) Message-ID: <112530930.8418.1338388454285.JavaMail.mail@webmail10> Reply-To: dean@defreitas.net Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8642447652950709601==" Return-path: Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4UEYs9D031592 for ; Wed, 30 May 2012 10:34:54 -0400 Received: from smtprelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4UEYK5t025391 for ; Wed, 30 May 2012 10:34:28 -0400 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay06.hostedemail.com (Postfix) with SMTP id 041C2FCDD for ; Wed, 30 May 2012 14:34:14 +0000 (UTC) Received: from webmail10 (imap-ext [216.40.42.5]) (Authenticated sender: dean@defreitas.net) by omf08.hostedemail.com (Postfix) with ESMTP for ; Wed, 30 May 2012 14:34:14 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com --===============8642447652950709601== Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit  I am using RHEL 5.8 (upgraded from 5.7) and I can not get these reporting tools to work from cron. I have tried many variations to no avail:

/sbin/ausearch -if /var/log/audit/audit.log  -ts 05/29/2012 00:00:00 -te 05/29/2012 23:59:59 > somefile.txt
/sbin/ausearch --input-logs -ts 05/29/2012 00:00:00 -te 05/29/2012 23:59:59 > somefile.txt
cat /var/log/audit/audit.log | /sbin/ausearch -ts 05/29/2012 00:00:00 -te 05/29/2012 23:59:59 > somefile.txt

Each of those work from the command line and in a script, but fail when the script is run from cron.

Do I need to set up a more extensive environment in my script? I should not need to set LD_LIBRARY_PATH and I have explicitely called ausearch by it's full path.

Thank you very much in advance,
Dean
--===============8642447652950709601== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8642447652950709601==--