[root@localhost]# cat /var/log/cron|grep '(user)'|grep ERROR|grep 'Aug 3 19'
Aug 3 19:00:01 localhost crond[12064]: CRON ( user ) ERROR: failed to open PAM security session: Success
Aug 3 19:00:01 localhost crond[12064]: CRON ( user ) ERROR: cannot set security context
Aug 3 19:01:01 localhost crond[23108]: CRON ( user ) ERROR: failed to open PAM security session: Success
Aug 3 19:01:01 localhost crond[23108]: CRON ( user ) ERROR: cannot set security context
通过错误日志 ,查看/etc/pam.d/crond
把所有required改成sufficient就可以了,但具体原因不明确啊。。。。
[root@ localhost]# cat /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
#auth sufficient pam_rootok.so
#auth required pam_env.so
#auth include system-auth
#account required pam_access.so
#account include system-auth
#session required pam_loginuid.so
#session include system-auth
auth sufficient pam_rootok.so
auth sufficient pam_env.so
auth include system-auth
account sufficient pam_access.so
account include system-auth
session sufficient pam_loginuid.so
session include system-auth
You have new mail in /var/spool/mail/root
转载于:https://blog.51cto.com/bluemood/953078