LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   raise ulimit help (http://www.linuxquestions.org/questions/linux-newbie-8/raise-ulimit-help-406436/)

depraved 01-22-2006 04:20 AM

raise ulimit help
 
I'm trying to raise the ulimit out of 1024, and I read a tutorial on how to do so but it locked me out of the account, I wrote:

username hard nofile 4096
username soft nofile 4096

in /etc/security/limits.conf

and that locked me out of my account.

I also changed:

#define __FD_SETSIZE 1024

to this:

#define __FD_SETSIZE 4096

..

What am I doing wrong? I'm running Mandrake Offical 10.0, any help is appreciated.

stress_junkie 01-22-2006 07:08 AM

I would first try to log on as your normal user, then log on as root and look at the /var/log/messages file. That could have some helpful information about your login failure.

depraved 01-22-2006 12:06 PM

Jan 22 09:26:32 localhost sshd(pam_unix)[14765]: session opened for user depraved by (uid=501)
Jan 22 09:26:32 localhost pam_limits[14765]: setrlimit 11 to -1073753628 failed: Operation not permitted
Jan 22 09:26:32 localhost sshd[14765]: fatal: PAM session setup failed[6]: Permission denied

thats what my log said...I was told to leave the lines uncommented that I added in etc/security/limits.conf which looks like this

#<domain> <type> <item> <value>
#

#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
#depraved hard nofile 4096
#depraved soft nofile 4096

# End of file
(comments I added are in italic)

When I uncomment them, I cant relogin into the shell. But it works fine if I recomment them. But my ulimit -n still shows 1024.

Also I added session required pam_limits.so to /etc/pam.d/login, /etc/pam.d/sshd, & /etc/pam.d/su. But still the ulimit -n still shows 1024.

Am I even doing this right? basically I want my maxuser count to raise to 4096 lol, becoming quite the task for me. Any help is appreciated guys. Again i'm running Mandrake 10.0(very new to linux lol)

btmiller 01-22-2006 12:25 PM

If you leave the lines commented out, then they're not going to have any effect whatsoever. What exactly are you trying to do here? By playing with the nofile limit you're limited the max number of open files a user can have, not the maximum number of users. Is this what you mean to do? AFAIK there's no (practical) limit on the number of users that can be logged in simultaneously (well, not quite true, my RH boxes only configure 2048 pseudo-ttys so that does limit the number of login sessions, but unbless you're running a major datacenter server I would think 2000 active sessions would be plenty).

depraved 01-22-2006 01:25 PM

I want to raise the limit of maximum users on my UnrealIRCd. And I heard to do this I would need to raise the limit on my box. I want to raise it to 4069, or atleast just learn how. So there can be a maximum of 4069 users allowed to connect to the server. Thanks for any help.

stress_junkie 01-22-2006 02:47 PM

btmiller,
Good job figuring out that depraved is trying to adjust the number of logins. I would never have figured that out by the first post. You must be a mind reader.

depraved,
I thought that you were logging on at the console. The messages from /var/log/messages show that you are using ssh login over the network. Also, it is clear that pam is involved. I have a lot to learn about pam. My SuSE 9.2 system has pam documentation here:

/usr/share/doc/packages/pam/html/index.html

Although it now seems that you really don't want to adjust the number of open files allowed per user, so playing with pam may or may not be relevant.


All times are GMT -5. The time now is 04:29 AM.