LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-20-2006, 02:33 PM   #1
PkerC
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
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..
 
Old 06-21-2006, 08:21 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,543
Blog Entries: 51

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
What happens if you set UseLogin to "yes" in sshd_config?
 
Old 06-22-2006, 09:29 AM   #3
PkerC
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
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... :/
 
Old 06-22-2006, 10:14 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,543
Blog Entries: 51

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
meaning of /etc/security/limits.conf commands marceluda Linux - Security 1 05-11-2006 11:01 AM
no /etc/limits ? Mig21 Slackware 7 07-25-2005 11:18 PM
fedora core 2 /etc/secutiry/limits.conf dsharples Linux - Security 1 08-31-2004 07:44 PM
/etc/security/limits.conf documentation? crazyeddie740 Linux - Security 1 06-19-2004 03:02 AM
Wierd PAM limits.conf behavior Kostko Linux - Software 0 08-26-2003 05:55 AM


All times are GMT -5. The time now is 10:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration