logcheck cron job not run with logcheck uid

Bug #39781 reported by Forest Bond
4
Affects Status Importance Assigned to Milestone
logcheck (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

/etc/cron.d/logcheck is as follows:
-------------------------------------------
# /etc/cron.d/logcheck: crontab entries for the logcheck package

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
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.d/logcheck: crontab entries for the logcheck package

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
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/logcheck; fi

# EOF
-------------------------------------------

Otherwise, logcheck refuses to run (as root).

-Forest

Revision history for this message
Forest Bond (forest-bond) wrote :

or not really like that (sorry, didn't look too closely at what I was copying)...but su logcheck should prefix the commands, anyway.

Revision history for this message
Forest Bond (forest-bond) wrote :

forget it. sorry, forgot about the user field in the cron file. please reject this bug.

Revision history for this message
Dennis Kaarsemaker (dennis) wrote : Re: [Bug 39781] Re: logcheck cron job not run with logcheck uid

 status Rejected

Changed in logcheck:
status: Unconfirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.