问题描述:oracle用户密码过期导致归档日志文件无法删除.
系统:rhel 7.3
场景描述:生产环境系统u01目录使用率超告警阀值,经确认为归档占用大量空间,系统中有自动清理归档日志文件的脚本,为什么没有清理呢?
1、异常分析
--查/var/log/cron日志文件
异常告警信息:
Jul 10 01:00:01 hisdb01 CROND[6903]: (root) CMD (/usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &)
Jul 10 01:01:01 hisdb01 crond[7063]: (oracle) PAM ERROR (Authentication token is no longer valid; new one required)
Jul 10 01:01:01 hisdb01 crond[7063]: (oracle) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jul 10 01:01:01 hisdb01 CROND[7064]: (root) CMD (run-parts /etc/cron.hourly)
正常日志信息:
Jul 3 01:00:01 hisdb01 CROND[2934]: (root) CMD (/usr/local/qcloud/YunJing/YDCrontab.sh > /dev/null 2>&1)
Jul 3 01:01:01 hisdb01 CROND[3096]: (root) CMD (run-parts /etc/cron.hourly)
Jul 3 01:01:01 hisdb01 CROND[3097]: (oracle) CMD (/home/oracle/delarch.sh >> /home/oracle/delarch.log)
Jul 3 01:01:01 hisdb01 CROND[3095]: (root) CMD (/usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &)
Jul 3 01:01:01 hisdb01 run-parts(/etc/cron.hourly)[3096]: starting 0anacron
说明:如上所示,自动任务脚本delarch.sh运行失败,报错"Authentication token is no longer valid".
2、查oracle用户密码信息
[oracle@hisdb01 ~]$ chage -l oracle
Last password change : Jul 12, 2023
Password expires : Oct 10, 2023
Password inactive : Oct 09, 2024
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 90
Number of days of warning before password expires : 7
[oracle@hisdb01 ~]$ crontab -l
1 1 * * * /home/oracle/delarch.sh >> /home/oracle/delarch.log
说明:用户oracle Last password change为当天修改的日期.
3、解决方案
修改oracle用户密码后,第二天归档日志成功被删除.
标签:01,CMD,Jul,hisdb01,归档,oracle,日志,CROND
From: https://blog.51cto.com/u_12991611/6780263