[Ilugc] Re: does ulimit work as expected

  • From: suraj@xxxxxxxxxxx (Suraj)
  • Date: Thu, 8 Jan 2004 18:48:35 -0800

Ramanraj K wrote on Fri, Jan 09, 2004 at 12:40:34AM +0530: 
,----
| Looks like there are not less than three places where we can impose 
| restrictions.
| /etc/profile
| /etc/security/limits.conf
| /etc/pam.d/login  - there were no comments in my distro and I am not 
| sure how this helps.
`----

Like I mentioned earlier, two things  use ulimit to set the limits and
be left out because there could be shells that dont obey /etc/profile

OR use PAM.

/etc/security/limits.conf happens to be  the configuration file of the
pam_limits  module. Whether  you want  to  use pam_limits  or not,  is
determined by /etc/pam.d/login (or /etc/pam.d/<prog_that_uses_pam>).

,----
| I set # ulimit -S 200 and bravely tried the echo, and ended up with a
`----

ulimit -S? its ulimit -u for setting the user process limits.

,----
| There should be a test script that includes statements like
`----

Test scripts? Why not just see the ulimit -u value?

if [ "`ulimit -u`" -gt "`cat /usr/local/etc/max_ulimit`" ]; then
  echo "you aren't safe"
fi

cheers,

  -Suraj

-- 
+--------------------------------------------------<suraj@xxxxxxxxxxx>--+
|The bejeweled arms of belles outside family bonds                      |
|drown the demented in the mire of slush                                |
|(women outside the virtue - 9), Thirukkural                            |
+--<http://www.symonds.net/~suraj/>-------------------------------------+

Other related posts: