Script runs Manually but not in Cron, yet other parts of the script run
I have script that runs if I execute it as root manually but when I direct it to run in a script the file size is always 0. See below:
/sbin/ausearch -i -ts week-ago -k open --success no >/audits/open.txt
lastb -n 35 >/audits/failedlogin.txt
The line lastb -n 35 >/audits/failedlogin.txt results in a output file and it works but the line
/sbin/ausearch -i -ts week-ago -k open --success no >/audits/open.txt only results in a new file with nothing in it however if I run it manualy the file is populated?
Is this an enviornmental issue when cron is run? A million thanks in advance, Johnny Mac