解決cron無(wú)法運(yùn)行報(bào)錯(cuò):FAILED to authorize user with PAM (Module is unknown)
創(chuàng)新互聯(lián)建站主營(yíng)涇川網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP軟件開(kāi)發(fā),涇川h5成都小程序開(kāi)發(fā)搭建,涇川網(wǎng)站營(yíng)銷推廣歡迎涇川等地區(qū)企業(yè)咨詢
查看cron運(yùn)行日志tail -f /var/log/cron
報(bào)如下錯(cuò)誤:
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)
網(wǎng)上有如下解決方法:
禁用SELinux,可以使用getenforce命令查看是否禁用。
修改/etc/pam.d/crond,把把所有required改成sufficient,這個(gè)可能對(duì)非root用戶管用。
account required pam_access.so
account include password-auth
session required pam_loginuid.so
session include password-auth
auth include password-auth
最終解決辦法:
重啟crond服務(wù)
/etc/init.d/crond restart
參考文獻(xiàn):https://zhang.ge/5093.html