openSUSE 11.4 cron job not running

Submitted by George Moses on Mon, 2011-06-27 11:31

In a newly installed VPS running openSUSE 11.4 I noticed cronjobs didn't work. The openSUSE distro just switched in this release from Vixie Cron to Cronie. Unfortunately, the VPS was throwing errors like:

Jun 27 12:24:01 s99 /usr/sbin/cron[3356]: pam_warn(crond:session): function=[pam_sm_open_session] service=[crond] terminal=[cron] user=[root] ruser=[] rhost=[]
Jun 27 12:24:01 s99 /usr/sbin/cron[3356]: (root) PAM ERROR (Cannot make/remove an entry for the specified session)
Jun 27 12:24:01 s99 /usr/sbin/cron[3356]: (root) FAILED to open PAM security session (Cannot make/remove an entry for the specified session)

After digging for some time, I noticed that somehow the /etc/pam.d/cron configuration was missing one essential line:

session include common-session

After adding the above line to the config file, things were running smoothly again.