linux环境,crontab报错Authentication token is no longer valid; new one required You (aimonitor) are not allowed to access to (crontab) because of pam configuration.

问题描述:

  今天同事反应,一个系统上的某些数据没有生成,看了下,怀疑定时任务没有执行,就看下了crontab,发现报了下面的错误:

[aimonitor@4A-LF-w08 ~]$ crontab -l

Authentication token is no longer valid; new one required
You (aimonitor) are not allowed to access to (crontab) because of pam configuration.

问题解决:

1.基于以上的现象在网上找了下解决方法,说的是可能用户密码过期了

2.查看用户的密码过期时间

复制代码
复制代码
[root@4A-LF-w08 ~]# chage -l aimonitor
Last password change                    : Jan 16, 2018
Password expires                    : Apr 16, 2018
Password inactive                    : never
Account expires                        : never
Minimum number of days between password change        : 6
Maximum number of days between password change        : 90
Number of days of warning before password expires    : 30
复制代码
复制代码

备注:通过以上的信息知道,密码在2018.4.16号过期,后续就没有数据产生了,时间是4.17号.

3.将账号设置为密码永不过期

复制代码
复制代码
[root@4A-LF-w08 ~]# chage -M 99999 aimonitor
[root@4A-LF-w08 ~]# chage -l aimonitor
Last password change                    : Jan 16, 2018
Password expires                    : never
Password inactive                    : never
Account expires                        : never
Minimum number of days between password change        : 6
Maximum number of days between password change        : 99999
Number of days of warning before password expires    : 30
复制代码
复制代码

4.再次检查crontab,发现crontab能够正常显示,同时定时任务也正常执行了.

 

posted @   邱明成  阅读(499)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
历史上的今天:
2017-10-19 How can I set ccshared=-fPIC while executing ./configure?
2015-10-19 小心ThreadLocal的陷阱
点击右上角即可分享
微信分享提示