小编Abb*_*hia的帖子

ulimit -n 不改变 - 值limits.conf 没有效果

我正在尝试为 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,因为我的机器上的用户是通过某种分布式身份验证方案进行身份验证的。

linux ubuntu bash ulimit pam

19
推荐指数
3
解决办法
5万
查看次数

标签 统计

bash ×1

linux ×1

pam ×1

ubuntu ×1

ulimit ×1