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

  • 相关阅读:
    Java——enum与int的转换——转载
    Java——JScrollPane设置透明——转载
    Java——JFrame与JButton添加背景
    Java——模态对话框
    u-boot_2010.6 nandflash驱动彻底分析
    linux 常用命令整理----权限管理
    linux 常用命令整理----链接文件
    linux 常用命令整理----文件操作
    linux 常用命令整理----目录操作
    linux 进程运行状态
  • 原文地址:https://www.cnblogs.com/qiumingcheng/p/13840666.html
Copyright © 2011-2022 走看看