我正在尝试为 ubuntu 机器上的所有用户提高打开文件描述符的最大值。
这个问题有点像这个问题的后续。
即使需要 pam_limits.so,ulimit 也不会读取打开的文件描述符limits.conf 设置
除了我在limits.conf中添加了所需的“root”条目
这是条目
* soft nofile 100000
* hard nofile 100000
root soft nofile 100000
root hard nofile 100000
Run Code Online (Sandbox Code Playgroud)
相关的pam_limits.so
行在 /etc/pam.d/ 中的所有相关文件中已取消注释,并fs.file-max
已在 /etc/sysctl.conf 中正确设置
然而,我仍然看到
abc@machine-2:/etc/pam.d$ ulimit -n
1024
Run Code Online (Sandbox Code Playgroud)
重启后。
可能是什么问题呢?
我的默认 shell 是 /bin/sh 并且我不能使用 chsh 来更改我的默认 shell,因为我的机器上的用户是通过某种分布式身份验证方案进行身份验证的。