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能够正常显示,同时定时任务也正常执行了.

 

文档创建时间:2018年4月26日16:36:09

posted @ 2018-04-26 16:37  Zhai_David  阅读(1590)  评论(0编辑  收藏  举报