On Sun, Apr 11, 2010 at 03:49:04PM +0100, Miguel Medalha wrote:
In my case, I am doing the change because of Samba. When you run tesparm, the lastest versions of Samba give the following warning:
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
When I add the line "ulimit -n 1024" to /etc/profile, the warning disappears, even after a reboot. So, this certainly works for processes running as root.
It's not related to root/nonroot. If you run these things when logged in, /etc/profile has been read in, so your subprocesses all inherit the ulimit. On boot, it's not clear to me whether /etc/profile is read, since I would guess that's not a login shell. (I suppose you could also test this via cron or at, since IIRC those programs do not provide a login shell either (unless asked for?).)
But you are right in that it will probably depend on the particular user requirement.
In any case, if surviving the boot process is desired, the changes should specifically be tested at boot, not just from a root login shell. This issue trips up even seasoned administrators (*ahem*).
--keith