Tag Archives: cron

Cron can’t start PAM on FreeBSD

I was having these error messages in /var/log/cron:

Feb 29 15:52:01 localhost /usr/sbin/cron[96178]: in openpam_load_module(): no pam_nologin.so found
Feb 29 15:52:01 localhost /usr/sbin/cron[96178]: (CRON) error (can't start PAM

Searched the net, couldn’t find anything relevant.

Eventually, though, figured out to /etc/rc.d/cron restart, and voila! Maybe something went hazy after upgrade.


Running ddclient as a cronjob

1. Comment out the daemon= line in /etc/ddclient/ddclient.conf
2. Test with ddclient -noquiet -debug -verbose
3. crontab -e root, add an appropriate line.

Default crontab values

Here’s what I had by default:

# ...
# Perform daily/weekly/monthly maintenance.
1 3 * * * root periodic daily
15 4 * * 6 root periodic weekly
30 5 1 * * root periodic monthly
# ...

Now, the format, according to man 5 crontab, is:

field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)

A field may be an asterisk (*), which always stands for ``first-last''.

No wonder locate.updatedb was never run automatically: it’s set to 4:15 on Saturday nights!