报类似这样的错误:
Nov 3 12:19:01 CLT01 crond[28094]: (CRON) ERROR (setreuid failed): 资源暂时不可用
Nov 3 12:19:01 CLT01 crond[28094]: (username) ERROR (failed to change user)
以下为处理过程,供参考。
◆ssh配置有问题,未启用PAM,对/etc/ssh/sshd_config做了如下修改
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
#UsePAM no
UsePAM yes
UsePAM yes
◆增加了sshd的pam配置文件cat /etc/pam.d/sshd
#%PAM-1.0
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
◆重启sshd
service sshd restart
◆修改了/etc/security/limits.conf
# Added by liking, 20151103
* - nofile 16384
* - nproc 16384
* - nofile 16384
* - nproc 16384
◆修改了/etc/security/limits.d/90-nproc.conf
#* soft nproc 1024
把这行注释掉了,问题根源就在于这个进程数限制太小!
统一改为了16384,以后若改就改配置文件limits.conf
文章评论