login.conf limits do not work

Artem Kuchin artem at artem.ru
Mon Apr 20 12:05:28 UTC 2015


20.04.2015 14:58, Todor Dragnev пишет:
> You need to set login class for user qmaild with pw user mod
>
>
>     -L class      This option sets the login class for the user being cre-
>                     ated.  See login.conf(5) and passwd(5) for more
> information
>                     on user login classes.
> Regards,
> Todor


I did

su -c vpopmail

-c - sets the class for this su

But, i did what you said and set the class using vipw

did not help at all.



>
> On 20 April 2015 at 13:18, Artem Kuchin <artem at artem.ru> wrote:
>
>> I am probably missing something.
>>
>> I have a used with uid 82  qmaild
>> I want to limit memory usage for it
>>
>> So i created a class
>>
>> vpopmail:\
>>          :passwd_format=sha512:\
>>          :copyright=/etc/COPYRIGHT:\
>>          :welcome=/etc/motd:\
>>          :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
>>          :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
>> /usr/local/bin ~/bin:\
>>          :nologin=/var/run/nologin:\
>>          :cputime=unlimited:\
>>          :datasize=300M:\
>>          :stacksize=300M:\
>>          :memorylocked=64K:\
>>          :memoryuse=300M:\
>>          :filesize=unlimited:\
>>          :coredumpsize=unlimited:\
>>          :openfiles=unlimited:\
>>          :maxproc=unlimited:\
>>          :sbsize=unlimited:\
>>          :vmemoryuse=300M:\
>>          :swapuse=unlimited:\
>>          :pseudoterminals=unlimited:\
>>          :priority=0:\
>>          :ignoretime@:\
>>          :umask=022:
>>
>> did
>> cap_mkdb login.conf
>>
>> run test
>>
>> su -c vpopmail -m qmaild   -c 'cat aaa.eml | ./aaa'
>>
>> check top
>>
>>
>> 76727     82        1  90    0   809M   475M CPU2    2   0:09 59.28% perl
>>
>> As you see, res is 809M
>> So. limits to not work
>>
>> What am i doing wrong?
>>
>>
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "
>> freebsd-questions-unsubscribe at freebsd.org"
>>
>
>



More information about the freebsd-questions mailing list