Page 1 of 1

IRCd allow more than 1024 problem

Posted: Fri Apr 01, 2005 4:51 pm
by pete212
when i ulimit -n 4096 on root it works but when i log out and log back in its set back to 1024.. why is this?

Posted: Fri Apr 01, 2005 4:54 pm
by Psadi
Since you dont specify OS I gues you are running Linux.

I would gues that you have to set it in some config file somewhere. Im guessing that setting it like you do as root it just stays as long you are loged in as root.

Posted: Fri Apr 01, 2005 8:35 pm
by pete212
running redhat 9

Posted: Fri Apr 01, 2005 10:28 pm
by Shelluser
pete212 wrote:running redhat 9
You do not want to run an IRC server on RedHat 9.

That version is *way* outdated, RedHat dropped it several months ago meaning that no updates and no security updates will be released for it.

Do yourself a favor and upgrade that box first.

Posted: Sat Apr 02, 2005 1:45 am
by pete212
what do you recommend

Posted: Sat Apr 02, 2005 1:57 am
by aquanight

Posted: Sat Apr 02, 2005 2:04 am
by pete212
Ive already done that aquanight, it still resets.

Posted: Sat Apr 02, 2005 2:17 am
by aquanight
Did you check if you have the pam_limits.so in /etc/pam.d/login, et al?

Posted: Sat Apr 02, 2005 2:18 am
by pete212
thats what i think is my problem, can you tell me what to do exactly? i didnt undertand it in the FAQ

Posted: Sat Apr 02, 2005 2:45 am
by aquanight
Open these files in your favorite editor:
/etc/pam.d/login
/etc/pam.d/sshd
/etc/pam.d/su
/etc/pam.d/cron
/etc/pam.d/screen (if screen is installed, and might not be needed anyway)

Check if you have this line in them:

Code: Select all

session required pam_limits.so
If it's not there, add it.

Note: I strongly suggest you make backups of these files. And also keep one terminal/ssh window/whatever logged in, in case something goes wrong and you get locked out you have that one window to restore the backups. :)

Posted: Sat Apr 02, 2005 2:57 am
by pete212
do i need to restart anything after i do this?

Posted: Sat Apr 02, 2005 3:12 am
by aquanight
I don't think so. Just start up a second ssh session and see if it has the new limits. If not (or you can't login) then you probably did something wrong.

Posted: Sat Apr 02, 2005 3:13 am
by pete212
PM