Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!sri-spam!mordor!lll-tis!ptsfa!ihnp4!occrsh!occrsh.ATT.COM!tiger.UUCP!rjd From: rjd@tiger.UUCP Newsgroups: comp.unix.wizards Subject: Re: How to set ulimit in SysV Message-ID: <142700003@tiger.UUCP> Date: Thu, 8-Oct-87 14:37:00 EDT Article-I.D.: tiger.142700003 Posted: Thu Oct 8 14:37:00 1987 Date-Received: Sun, 11-Oct-87 17:10:48 EDT References: <6497@oliveb.UUCP> Lines: 52 Nf-ID: #R:oliveb.UUCP:-649700:tiger.UUCP:142700003:000:2510 Nf-From: tiger.UUCP!rjd Oct 8 13:37:00 1987 > > OK, I decided to see how hard this one was; it took 15 minutes, of which > > 13 were due to a bug in init.... > > > > What you do is change your inittab entries for getty to: > > > > t3:2:respawn:/bin/sh /etc/Getty tty03 tty03 That is not a bug. Its a feature!!! :-) Seriously, init was not meant to start up shell scripts.... If you want to raise the ulimit for login sessions, GET THE SOURCE to /bin/login and put the ulimit call in there before it setuid's and execs the shell. It takes about 90 seconds to find, a minute or so to compile, and a few keystrokes to overwrite the original login (a few more if you want to save the original login). > No. This does not alter the ulimit for processes like cron and the > jobs that it starts up. It was not meant to, the original question was inquiring about raising the ulimit for logins. > This really is terribly broken and a major oversight by AT+T. I have > had trouble with this in a numer of different ways, such as > accidentally setting it to -1 and not being able to login because > /etc/login can't write /etc/utmp! Can you believe they made it > signed?! At least it's configurable in rel 3.1, though silly that you > can't turn it off. > > Ben Golding. If you want the ulimit upped for cron and other deamons started on bootup, and it is not already (I do not know that it is not already high), just put the ulimit in the shell script in /etc/rc.d/cron (release 2 unix) or /etc/rc2.d/S??cron (for release 3). You can start it less selectively by just putting the high ulimit in the /etc/rc2 shell script, if you like.... "terribly broken and a major oversight"???? Sorry, I bet they did not know that you had an INFINITE amount of space available and were not concerned with limiting it. Since I bet somehow that you do not have an infinite space, you probably DO need a limiter. You setting it to -1 proves the fact that you are not infallible and might screw up again!!! It is really so simple: root can raise the ulimit for himself and all child processes to anything he wants, non-roots can only lower it. If you want to lower it for some people and raise to for others, either do the mod that Mike Manitus posted that allows you to set up the param- aters in the /etc/passwd file, or simply change login for the higher ulimit and have /etc/profile lower it on a user-by-user basis (note: logins that do not run a shell, such as nuucp running uucicio, will not get the ulimit lowered). Randy