美文网首页
crontab无法查看,原来是密码过期了

crontab无法查看,原来是密码过期了

作者: testerzhang | 来源:发表于2021-05-08 08:46 被阅读0次

    想查看下crontab 信息,发现报错:

    $ crontab -e
    You (testerzhang) are not allowed to access to (crontab) because of pam configuration.
    

    查看/var/log/secure日志:

    May  3 03:25:01 izwz95pyalh1f7lwmd4u62z crond[6000]: pam_unix(crond:account): password for user testerzhang will expire in 4 days
    

    也可以直接查看过期时间

    # chage -l testerzhang
    Last password change                                    : Feb 05, 2021
    Password expires                                        : May 06, 2021
    Password inactive                                       : never
    Account expires                                         : never
    Minimum number of days between password change          : 7
    Maximum number of days between password change          : 90
    Number of days of warning before password expires       : 7
    

    好吧,设置下密码:

    # passwd testerzhang
    

    账号正常了。

    # chage -l testerzhang
    Last password change                                    : May 08, 2021
    Password expires                                        : Aug 06, 2021
    Password inactive                                       : never
    Account expires                                         : never
    Minimum number of days between password change          : 7
    Maximum number of days between password change          : 90
    Number of days of warning before password expires       : 7
    

    欢迎关注我的公众号testerzhang,原创技术文章第一时间推送。

    相关文章

      网友评论

          本文标题:crontab无法查看,原来是密码过期了

          本文链接:https://www.haomeiwen.com/subject/fogydltx.html