wsxxz 发表于 2019-1-27 11:31:39

普通用户crontab不执行 提示ERROR: failed to open PAM security session: Success

# cat /var/log/cron|grep '(user)'|grep ERROR|grep 'Aug3 19'
Aug3 19:00:01 localhost crond: CRON (user ) ERROR: failed to open PAM security session: Success
Aug3 19:00:01 localhost crond: CRON (user ) ERROR: cannot set security context
Aug3 19:01:01 localhost crond: CRON (user ) ERROR: failed to open PAM security session: Success
Aug3 19:01:01 localhost crond: CRON (user ) ERROR: cannot set security context




通过错误日志 ,查看/etc/pam.d/crond
把所有required改成sufficient就可以了,但具体原因不明确啊。。。。
# 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       sufficientpam_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




页: [1]
查看完整版本: 普通用户crontab不执行 提示ERROR: failed to open PAM security session: Success