limits 不生效

正常情况下,改完 limits.conf 后,重新登录就会生效,但是一台机器(CentOS 6.2, 2.6.32-279.el6.x86_64)很奇怪,注销再次登录并不会生效。
messages 文件出现类似的错误:
Sep  1 12:08:35 jaseywang sshd[16119]: fatal: setresuid 500: Resource temporarily unavailable
Sep  1 12:08:41 jaseywang sshd[16120]: Accepted publickey for jaseywang from 111.111.111.111 port 53803 ssh2
Sep  1 12:08:41 jaseywang sshd[16122]: fatal: setresuid 500: Resource temporarily unavailable
Sep  1 12:08:46 jaseywang sshd[16123]: Accepted publickey for jaseywang from 111.111.111.111 port 53804 ssh2
Sep  1 12:08:46 jaseywang sshd[16125]: fatal: setresuid 500: Resource temporarily unavailable
Sep  1 12:08:52 jaseywang sshd[16126]: error: RSA_public_decrypt failed: error:0407006A:lib(4):func(112):reason(106)
Sep  1 12:08:52 jaseywang sshd[16126]: error: hash mismatch
Sep  1 12:08:52 jaseywang sshd[16126]: error: hash mismatch
Sep  1 12:31:06 jaseywang sshd[18049]: Accepted publickey for jaseywang from 111.241.250.121 port 20918 ssh2

后来通过重启 sshd,再次登录才会生效,可能跟 sshd 有关,不过按我的理解, sshd_config 文件并没有改变,重启实际上是没改变什么的,奇怪。

  • wych

    我挖个坟: 跟UsePAM 有关