zoukankan      html  css  js  c++  java
  • 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能够正常显示,同时定时任务也正常执行了.

  • 相关阅读:
    牛客练习赛53 A-E
    算导第二章笔记 (归并排序 之 插入排序优化)
    LightOJ 1372 (枚举 + 树状数组)
    LightOJ 1348 (树链剖分 + 线段树(树状数组))
    Light OJ 1343
    Light OJ 1266
    Light OJ 1085
    CodeForces 671C
    Codeforces Round #352 (Div. 2) (A-D)
    ZOJ1008
  • 原文地址:https://www.cnblogs.com/qiumingcheng/p/13840666.html
Copyright © 2011-2022 走看看