Linux编辑定时任务异常:用户密码过期导致

Linux编辑定时任务异常:用户密码过期导致

当编辑Linux定时任务时可能会异常如下:

You (用户名) are not allowed to access to (crontab) because of pam configuration.

此时可能是因为用户密码过期导致的异常,需要查看日志:

cat /var/log/secure

若日志中异常的时间范围内包含**(password aged)**,说明应该是用户密码过期导致的,一般密码需要90天更换一次。

pam_unix(crond:account): expired password for user 用户名 (password aged)

解决方案

重新设置密码过期的用户密码即可

passwd 用户名

或者设置用户密码永不过期,不过不太建议这样做

chage -m 99999 用户名

文章参考:
https://www.cnblogs.com/litzhiai/p/8777274.html
https://blog.csdn.net/db_murphy/article/details/114371603

相关推荐

  1. Linux编辑定时任务异常用户密码过期导致

    2024-03-15 19:30:03       41 阅读
  2. linux定时任务

    2024-03-15 19:30:03       59 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-15 19:30:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-15 19:30:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-03-15 19:30:03       87 阅读
  4. Python语言-面向对象

    2024-03-15 19:30:03       96 阅读

热门阅读

  1. Qt自定义标题栏的多屏适配

    2024-03-15 19:30:03       36 阅读
  2. 【C语言】Traps in C Bitfield

    2024-03-15 19:30:03       35 阅读
  3. AIX7.2下安装python3

    2024-03-15 19:30:03       41 阅读
  4. 微服务架构 | 架构演进

    2024-03-15 19:30:03       43 阅读
  5. CISP 4.2备考之《计算环境安全》知识点总结

    2024-03-15 19:30:03       46 阅读
  6. Python常用模块06——requests

    2024-03-15 19:30:03       39 阅读
  7. 网站服务器的作用有哪些?

    2024-03-15 19:30:03       40 阅读
  8. strlen 与 sizeof 详解

    2024-03-15 19:30:03       44 阅读