记忆角落

  • {{ item.name }}
  • linux-报错su: failed to execute /bin/bash: Resource temporarily unavailable
  • 报错原因:
  • 解决方案:
  • 首页
  • 关于
  • 归档
  • 邻居
  • 捐赠

linux-报错su: failed to execute /bin/bash: Resource temporarily unavailable

  • 郭良俊只狗
  • 2022-11-22
  • 0

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

© 2012 - 2023 记忆角落 网站统计
Theme by Wing
粤ICP备14056850号-1 又拍云CDN赞助