su: cannot set user id: Resource temporarily unavailable

mac2024-03-24  30

$ su - testuser su: cannot set user id: Resource temporarily unavailable

原因: 默认一般用户的最大允许进程数是1024,而smber用户进程数超过限制。

$ lsof -u testuser | wc -l 2546

更改:增大10倍,生产中实践没问题

vim /etc/security/limits.conf # Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 10240 root soft nproc unlimited
最新回复(0)