Subject: problems with setting user limits
To: None <tech-userlevel@netbsd.org>
From: Felix Zaslavskiy <felix@students.poly.edu>
List: tech-userlevel
Date: 01/24/2003 02:15:43
My goal is to set user resource limits upon user login. It seems i did
everything correct but it dont work.
Here is what i did. ( i am using netbsd1.6)

I created login.conf file
-- login.conf --
#default user settings
default:\
        :coredumpsize#32768:\
        :maxproc#32:\
        :memoryuse#8192:\
        :stacksize#1024:\
        :memorylocked#4096:\
        :datasize#131072:\
        :filesize#32768:

#cap_mkdb login.conf

I added all the users to the class default by editing the master.passwd file
with vipw.  userinfo command shows that users do have class default.
/var/log/authlog does not show any errors.

After this changes any user can login successfuly but this output is strange
#sysctl proc.$$.rlimit
proc.20404.rlimit.cputime.soft = unlimited
proc.20404.rlimit.cputime.hard = unlimited
proc.20404.rlimit.filesize.soft = unlimited
proc.20404.rlimit.filesize.hard = unlimited
proc.20404.rlimit.datasize.soft = 134217728
proc.20404.rlimit.datasize.hard = 1073741824
proc.20404.rlimit.stacksize.soft = 2097152
proc.20404.rlimit.stacksize.hard = 33554432
proc.20404.rlimit.coredumpsize.soft = 2048000000
proc.20404.rlimit.coredumpsize.hard = 2048000000
proc.20404.rlimit.memoryuse.soft = 62783488
proc.20404.rlimit.memoryuse.hard = 62783488
proc.20404.rlimit.memorylocked.soft = 20927829
proc.20404.rlimit.memorylocked.hard = 62783488
proc.20404.rlimit.maxproc.soft = 160
proc.20404.rlimit.maxproc.hard = 532
proc.20404.rlimit.descriptors.soft = 64
proc.20404.rlimit.descriptors.hard = 1772

Clearly none of the settings in login.conf are applied.  What did i miss
????

Felix