问题描述: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
2 2 * * * /home/oracle/delarch.sh >> /home/oracle/delarch.log
说明:用户oracle Last password change为当天修改的日期.
3、解决方案
修改oracle用户密码后,第二天归档日志成功被删除.
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




