解決cron無法運行報錯:FAILED to authorize user with PAM (Module is unknown)


查看cron運行日志

tail -f /var/log/cron

  報如下錯誤:

May  8 10:14:01 localhost crond[9399]: (root) FAILED to authorize user with PAM (Module is unknown)
May  8 10:14:01 localhost crond[9400]: (root) FAILED to authorize user with PAM (Module is unknown)

  

網上有如下解決方法:

  • 修改/etc/pam.d/crond,把把所有required改成sufficient,這個可能對非root用戶管用。
#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called, auth modules not needed
account    required   pam_access.so
account    include    password-auth
session    required   pam_loginuid.so
session    include    password-auth
auth       include    password-auth

  

最終解決辦法:

重啟crond服務

/etc/init.d/crond restart

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM