On Thu, Feb 05, 2009 at 02:13:00PM +0100, David Gubler wrote: > We had an invalid line in our /etc/crontab; it was referring to a user > account that did not exist any more (removed from /etc/passwd and > /etc/shadow, I checked). This prevented other entries in > /etc/crontab from being executed. However, it seems that jobs in > /etc/cron.d/ were working fine. > > I could not find any indication of this problem in syslog, messages or > daemon.log, however auth.log showed that cron did not try to execute > the other jobs in /etc/crontab. > > After commenting the invalid line cron works fine again. > > Expected behaviour: Ignore invalid line and print error message somewhere > sensible. >From memory, that was the original behavior of upstream cron.
That was patched by the Debian group after they got rooted by someone who got a binary file in /var/lib/cron/crontabs (in the style of crontab - </bin/sh, replacing the user's crontab with the shell). Cron at that point didn't know any better, detected an early error in the syntax of that garbage, but kept reading, at some point encountering a valid line. Debian patched cron to stop processing tab files after the first error. Warnings do go to syslog, you might use logcheck or something to notice that more readily. It would proably be reasonable for cron to send a mail, too. This: * * * * * asdf true leads to: Feb 5 07:12:01 justinp /usr/sbin/cron[3358]: (*system*) RELOAD (/etc/crontab) Feb 5 07:12:01 justinp cron[3358]: Error: bad username; while reading /etc/crontab Justin -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

