logcheck cron job not run with logcheck uid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
logcheck (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
/etc/cron.
-------
# /etc/cron.
PATH=/usr/
MAILTO=root
@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
# EOF
-------
It should be like this, I believe:
-------
# /etc/cron.
PATH=/usr/
MAILTO=root
#@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi
@reboot logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /bin/su -s /bin/bash -c "/usr/sbin/logcheck -R"; fi
#2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck; fi
#2 * * * * logcheck if [ -x /usr/sbin/logcheck ]; then nice -n10 /bin/su -s /bin/bash -c "/usr/sbin/
# EOF
-------
Otherwise, logcheck refuses to run (as root).
-Forest
or not really like that (sorry, didn't look too closely at what I was copying)...but su logcheck should prefix the commands, anyway.