You (oracle) are not allowed to access to (crontab) because of pam configuration.
1. Check the cron process/service is running or not
# ps -ef | grep cron
root 10441 1 0 Apr16 ? 00:00:00 crond
root 17805 17148 0 13:00 pts/0 00:00:00 grep cron
# /etc/init.d/crond status
crond (pid 10441) is running...
2. Check the crontab for oracle user
# crontab -l -u oracle
Authentication token is no longer valid; new one required
You (oracle) are not allowed to access to (crontab) because of pam configuration.
Getting above error. check for logs
# less /var/log/cron
Jun 11 11:40:01 linuxtutor1 crond[20496]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 11 11:50:01 linuxtutor1 crond[31752]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 11 12:00:01 linuxtutor1 crond[11037]: Authentication token is no longer valid; new one required
Jun 11 12:00:01 linuxtutor1 crond[11037]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jun 11 12:00:01 linuxtutor1 crond[11037]: CRON (oracle) ERROR: cannot set security context
# less /var/log/secure
Jun 11 13:02:04 linuxtutor1 crontab: pam_unix(crond:account): expired password for user oracle (password aged)
Jun 11 13:03:40 linuxtutor1 su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Jun 11 13:03:49 linuxtutor1 crontab: pam_unix(crond:account): expired password for user oracle (password aged)
Jun 11 13:05:14 linuxtutor1 su: pam_unix(su-l:session): session closed for user oracle
Jun 11 13:11:46 linuxtutor1 chage[30384]: changed password expiry for oracle
User oracle account is expired on 10th june 2013
# chage -l oracle
Last password change : May 13, 2013
Password expires : Jun 10, 2014
Password inactive : never
Account expires : never
Minimum number of days between password change : 7
Maximum number of days between password change : 28
Number of days of warning before password expires : 7
# date
Wed Jun 11 13:10:28 EDT 2013
Change oracle user's password to never expire
# chage -M 99999 -m 99999 oracle
Check the user's password age
# chage -l oracle
Last password change : May 13, 2013
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 99999
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
Check the oracle user's crontab entries. Now it is displaying the cron details.
# crontab -l -u oracle
0 * * * * /home/oracle/bin/check-db-status
Now the cron jobs are running fine without any issues.
1. Check the cron process/service is running or not
# ps -ef | grep cron
root 10441 1 0 Apr16 ? 00:00:00 crond
root 17805 17148 0 13:00 pts/0 00:00:00 grep cron
# /etc/init.d/crond status
crond (pid 10441) is running...
2. Check the crontab for oracle user
# crontab -l -u oracle
Authentication token is no longer valid; new one required
You (oracle) are not allowed to access to (crontab) because of pam configuration.
Getting above error. check for logs
# less /var/log/cron
Jun 11 11:40:01 linuxtutor1 crond[20496]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 11 11:50:01 linuxtutor1 crond[31752]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Jun 11 12:00:01 linuxtutor1 crond[11037]: Authentication token is no longer valid; new one required
Jun 11 12:00:01 linuxtutor1 crond[11037]: CRON (oracle) ERROR: failed to open PAM security session: Success
Jun 11 12:00:01 linuxtutor1 crond[11037]: CRON (oracle) ERROR: cannot set security context
# less /var/log/secure
Jun 11 13:02:04 linuxtutor1 crontab: pam_unix(crond:account): expired password for user oracle (password aged)
Jun 11 13:03:40 linuxtutor1 su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Jun 11 13:03:49 linuxtutor1 crontab: pam_unix(crond:account): expired password for user oracle (password aged)
Jun 11 13:05:14 linuxtutor1 su: pam_unix(su-l:session): session closed for user oracle
Jun 11 13:11:46 linuxtutor1 chage[30384]: changed password expiry for oracle
User oracle account is expired on 10th june 2013
# chage -l oracle
Last password change : May 13, 2013
Password expires : Jun 10, 2014
Password inactive : never
Account expires : never
Minimum number of days between password change : 7
Maximum number of days between password change : 28
Number of days of warning before password expires : 7
# date
Wed Jun 11 13:10:28 EDT 2013
Change oracle user's password to never expire
# chage -M 99999 -m 99999 oracle
Check the user's password age
# chage -l oracle
Last password change : May 13, 2013
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 99999
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
Check the oracle user's crontab entries. Now it is displaying the cron details.
# crontab -l -u oracle
0 * * * * /home/oracle/bin/check-db-status
Now the cron jobs are running fine without any issues.
1 comments:
Thanks, it helped me
Post a Comment