1、查看日志,报错如下:
May 25 15:50:01 localhost crond[42423]: (root) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
May 25 15:51:01 localhost crond[43791]: (root) PAM ERROR (Authentication token is no longer valid; new one required)
2、查找原因,可能为密码过期
查看密码过期时间
[root@localhost log]# chage -l root
Last password change : Feb 21, 2022
Password expires : May 22, 2022
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 90
Number of days of warning before password expires : 7
今天25日,22日就过期了
3、设置密码为永不过期
[root@localhost log]# chage -M 99999 root
[root@localhost log]# chage -l root
Last password change : Feb 21, 2022
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
4、查看日志,计划任务正常执行