LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   limits are not working (limits.conf) (http://www.linuxquestions.org/questions/red-hat-31/limits-are-not-working-limits-conf-456666/)

PkerC 06-20-2006 02:33 PM

limits are not working (limits.conf)
 
Hi..

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

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

Code:

#%PAM-1.0
auth      required    /lib/security/pam_stack.so service=system-auth
auth      required    /lib/security/pam_nologin.so
account    required    /lib/security/pam_stack.so service=system-auth
password  required    /lib/security/pam_stack.so service=system-auth
session    required    /lib/security/pam_stack.so service=system-auth
session    required    /lib/security/pam_limits.so
session    optional    /lib/security/pam_console.so

So, limits module is there..

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

Code:

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

Thanks..

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:
Code:

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

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 01:43 PM.