limits.conf not being read when logging in

  • Posted July 16, 2014

I have 2 entries in my limits.conf,

*		hard		nofile		10240
*		soft		nofile		4096

but running ulimit -Sn or ulimit -Hn only displays the default values.

gabriel@server:~$ ulimit -Sn
gabriel@server:~$ ulimit -Hn

It works fine on one server but on another it’s as if they’re being ignored. I did have a problem with apt-get autoremove for some old kernels on this one server which I didn’t have on the other, I didn’t note it down but I’m quite able to reboot.


Hi! What OS is the server running?

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@info nope, no errors being reported

Any idea how to tell if is corrupted?

It’s not for root just normal users, it works on other droplets fine, it used to work on this droplet but for some reason doesn’t anymore. Have rebooted a few times :)

Add the following line to both /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive

session required

After that, log out and log in again.

Ubuntu 14.04