From: Kurt S Harris <kharris@redwood.aur.us.ray.com>
To: linux-audit@redhat.com
Subject: ausearch from cron
Date: Thu, 29 May 2008 09:37:27 -0600 [thread overview]
Message-ID: <483ECDB7.2040602@redwood.aur.us.ray.com> (raw)
When I run an ausearch from a cron in RedHat 5.1 I don't get any output,
running the same command from the command line I get results. Any ideas
on what I'm missing?
output:
<no matches>
May 29 09:36:01 magenta last message repeated 3 times
May 29 09:36:01 magenta logger: AuditSearch: -ts 09:35:00 -te 09:36:00
May 29 09:36:01 magenta logger:
crontab:
* * * * 1-5 /usr/sbin/logaudit >> /var/log/messages 2>>/var/log/messages
logaudit:
#!/bin/bash
logaudit(){
ctime=$(/bin/date '+%T')
min=$(echo ${ctime}|cut -f2 -d:)
if [ "${min}" = "00" ];then
Args=$(echo ${ctime} | /bin/awk -F : '{print "-ts "$1 -1 ":59:00
-te "$1":"$2":00"}')
else
Args=$(echo ${ctime} | /bin/awk -F : '{print "-ts "$1":" $2 - 1
":00 -te "$1":"$2":00"}')
fi
echo -e "\nAuditSearch:" $Args
/sbin/ausearch ${Args} -i >> /var/log/messages 2>>/var/log/messages
echo -e "\n\n"
}
logaudit | /usr/bin/logger -p auth.alert
next reply other threads:[~2008-05-29 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 15:37 Kurt S Harris [this message]
2008-05-29 15:48 ` ausearch from cron Steve Grubb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483ECDB7.2040602@redwood.aur.us.ray.com \
--to=kharris@redwood.aur.us.ray.com \
--cc=linux-audit@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox