linux-报错su: failed to execute /bin/bash: Resource temporarily unavailable
报错原因:
[root@iottest01 ~]# su - xinsec
上一次登录:二 11月 22 15:21:39 CST 2022从 192.168.10.170pts/3 上
su: failed to execute /bin/bash: 资源暂时不可用
su: failed to execute /bin/bash: Resource temporarily unavailable
解决方案:
修改/etc/security/limits.d/20-nproc.conf
[root@test86 ~]# cat /etc/security/limits.d/20-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 4096
root soft nproc unlimited
修改后
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 65536
root soft nproc unlimited
那一列默认是4096
,因为有些小不能满足其他用户资源需求,所以需要改大一点。比如我这边修改成65536