How to avoid error/failure for cronjob by pam even if password expired

(Doc ID 2371239.1)

Last updated on MARCH 18, 2018

Applies to:

Linux OS - Version Oracle Linux 7.2 and later
Linux x86-64
Linux x86
Information in this document applies to any platform.

Goal

The system's account will be expire by policy but need to run to cron job by that account.

When expired, cron job was failed by PAM with below message :

Jul 10 00:31:01 hostname1 crond[2860]: CRON (xxx) ERROR: failed to open PAM security session: Success
Jul 10 00:31:01 hostname1 crond[2860]: CRON (xxx) ERROR: cannot set security context

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms