can't log in when nofile is set to unlimited in /etc/security/limits.conf

manuzhang asked:

I set the following values (-1 will be resolved to unlimited, I suppose) in /etc/security/limits.conf (CentOS 6.2)

root nofile soft -1

root nofile hard -1

and I can’t log in with root user now. Similar to the issue described here. Setting the value back would resolve the issue.

Can anyone help to explain this ?

Updates:

Thanks guys. I memorize my settings incorrectly. Those values should be

root soft nofile -1
root hard nofile -1

My answer:


You’ve reversed the second and third fields.

It should read instead:

root soft nofile -1
root hard nofile -1

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.