定时任务出错
解决因用户密码过期导致无法自动运行定时任务
今天发现oracle用户定时任务很久没有自动运行
检查/var/log/cron
... Jun 21 04:30:01 DEV24-DB-1 crond[4769]: Authentication token is no longer valid; new one required Jun 21 04:30:01 DEV24-DB-1 crond[4769]: CRON (oracle) ERROR: failed to open PAM security session: Success Jun 21 04:30:01 DEV24-DB-1 crond[4769]: CRON (oracle) ERROR: cannot set security context ...
检查/var/log/secure
... Jun 23 23:05:01 DEV24-DB-1 crond[8429]: pam_unix(crond:account): expired password for user oracle (password aged) Jun 23 23:10:01 DEV24-DB-1 crond[8674]: pam_unix(crond:account): expired password for user oracle (password aged) Jun 23 23:15:01 DEV24-DB-1 crond[8923]: pam_unix(crond:account): expired password for user oracle (password aged) ...原来是因为用户密码过期了
修改用户密码有效期
# chage -M 9999 oracle #
检查/var/log/cron, 现在工作正常了
... Jun 24 00:10:01 DEV24-DB-1 crond[13243]: (oracle) CMD (. $HOME/.s10profile;$HOME/dba/bin/dbexp.sh gzip=y) ...
如遇其它问题, 可能需要检查/etc/pam.d/crond, /etc/security/access.conf等其它配置文件
-fin-
No comments:
Post a Comment