-   Red Hat (
-   -   limits are not working (limits.conf) (

PkerC 06-20-2006 02:33 PM

limits are not working (limits.conf)

Well Im trying to limit the number of processes to some users but is not working..

/etc/pam.d/sshd I have this:


auth      required    /lib/security/ service=system-auth
auth      required    /lib/security/
account    required    /lib/security/ service=system-auth
password  required    /lib/security/ service=system-auth
session    required    /lib/security/ service=system-auth
session    required    /lib/security/
session    optional    /lib/security/

So, limits module is there..

/etc/security/limits.conf I have this:


user hard nproc 3
Its not working, if I try to exceed the processes I get no problem.. I can run any processes that I want, even I put 0 processes..

I have to do something more? what could be wrong or missing? Should I put something else on the sshd configuration file??

I hope some help..

Im using RedHat 8


unSpawn 06-21-2006 08:21 PM

What happens if you set UseLogin to "yes" in sshd_config?

PkerC 06-22-2006 09:29 AM

Ive already tried that, but when I try to login(with users there are on limits.conf) by ssh appears this:

-bash: fork: Resource temporarily unavailable
-bash-2.05b$ ps x

I cant do nothing by ssh... :/

unSpawn 06-22-2006 10:14 AM

Ive already tried that, but
Then please *post* you've tried that. We wherent there and are way low on ESP as well.

when I try to login(with users there are on limits.conf) by ssh appears this:
-bash: fork: Resource temporarily unavailable

What do your system logs say (please post *exact* errors)?
And exactly how many nprocs where in use by that user at that point?
And are you able to log in as unprivileged user that hasn't hard limit nproc set?

BTW, RHL 8.x was EOL'ed a long time ago.
Even support by Fedora Legacy has been suspended.
Please ask yourself if you want to expose such a system to teh intarweb.
If you still want (or need) to, you'll have to find, package and update everything yourself by hand.

All times are GMT -5. The time now is 09:18 AM.