Linux Account Password Expiration will cause the crontab job to fail to be executed, linuxcrontab
Today, a colleague reported that the crontab job on the Linux server was not running. After checking the/var/log/cron log, the following error message was found:
Jan 19 16:30:01 xxxx crond[31399]: Authentication token is no longer valid; new one required
Jan 19 16:30:01 xxxx crond[31400]: Authentication token is no longer valid; new one required
Jan 19 16:30:01 xxxx crond[31401]: Authentication token is no longer valid; new one required
Jan 19 16:30:01 xxxx crond[31398]: Authentication token is no longer valid; new one required
Jan 19 16:30:01 xxxx crond[31400]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jan 19 16:30:01 xxxx crond[31400]: CRON (oracle) ERROR: cannot set security context
Jan 19 16:30:01 xxxx crond[31401]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jan 19 16:30:01 xxxx crond[31401]: CRON (oracle) ERROR: cannot set security context
Jan 19 16:30:01 xxxx crond[31402]: Authentication token is no longer valid; new one required
Jan 19 16:30:01 xxxx crond[31398]: CRON (root) ERROR: failed to open PAM security session: Success
Jan 19 16:30:01 xxxx crond[31399]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jan 19 16:30:01 xxxx crond[31402]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jan 19 16:30:01 xxxx crond[31398]: CRON (root) ERROR: cannot set security context
Jan 19 16:30:01 xxxx crond[31399]: CRON (oracle) ERROR: cannot set security context
Jan 19 16:30:01 xxxx crond[31402]: CRON (oracle) ERROR: cannot set security context
Jan 19 16:35:01 xxxx crond[31431]: Authentication token is no longer valid; new one required
Jan 19 16:35:01 xxxx crond[31431]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jan 19 16:35:01 xxxx crond[31431]: CRON (oracle) ERROR: cannot set security context
Just before the problem occurred, I used the chage command on this server to set the Password Expiration Policy for accounts such as root and oracle. As a result, the oracle Password of this account expires (Password expires), so "Authentication token is no longer valid; new one required" and other such error messages appear.
Solution:
1: Use SecureCRT to log on to the system as an oracle user. After the account and password are changed, this permission authentication problem is immediately resolved.
2: Use the chage command to ensure that the password of the corresponding account never expires. Of course, it is generally not recommended to use this policy to solve the problem.