欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

crontab 不执行 (www) PAM ERROR (Module is unknown)

程序员文章站 2022-03-12 07:57:15
...

 

problem:crontab 没有执行,查看crontab状态,可以看到显示www pam module unknown

[[email protected] cron]# /sbin/service crond status
Redirecting to /bin/systemctl status crond.service
● crond.service - Command Scheduler
   Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-03-27 03:40:29 UTC; 5 months 22 days ago
 Main PID: 1066 (crond)
   CGroup: /system.slice/crond.service
           └─1066 /usr/sbin/crond -n

Mar 30 20:59:04 sl-payment-europe1 crond[26371]: PAM unable to dlopen(/usr/lib64/security/pam_env.so): /usr/lib64/securit...memory
Mar 30 20:59:04 sl-payment-europe1 crond[26371]: PAM adding faulty module: /usr/lib64/security/pam_env.so
Mar 30 20:59:04 sl-payment-europe1 crond[26370]: PAM unable to dlopen(/usr/lib64/security/pam_env.so): /usr/lib64/securit...memory
Mar 30 20:59:04 sl-payment-europe1 crond[26370]: PAM adding faulty module: /usr/lib64/security/pam_env.so
Mar 30 20:59:05 sl-payment-europe1 crond[26370]: (www) PAM ERROR (Module is unknown)
Mar 30 20:59:05 sl-payment-europe1 crond[26371]: (www) PAM ERROR (Module is unknown)
Mar 30 20:59:06 sl-payment-europe1 crond[26371]: (www) FAILED to authorize user with PAM (Module is unknown)
Mar 30 20:59:06 sl-payment-europe1 CROND[26387]: (root) CMD (sh /usr/local/sbin/redis_check.sh)
Mar 30 20:59:12 sl-payment-europe1 CROND[26369]: (root) CMDOUT (execl: couldn't exec `/bin/sh')
Mar 30 20:59:12 sl-payment-europe1 CROND[26369]: (root) CMDOUT (execl: Cannot allocate memory)
Hint: Some lines were ellipsized, use -l to show in full.


Solve the problem

[[email protected] ~]# vim /etc/pam.d/crond
#
# 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    sufficient   pam_loginuid.so
session    include    password-auth
auth       include    password-auth



说明:session    required   pam_loginuid.so 修改为:session    sufficient   pam_loginuid.so

 

转载于:https://my.oschina.net/AnnaWu/blog/2054512