pam_quota is a simple pam session module to automatically setup user quota (root excluded).
pam_quota has been used in a simple multiuser scenario on FreeBSD 5.2-RELEASE with pam_mkhomedir, without any problem. Usege is straightforward, as described by the following README:
This is a simple pam session module to automatically setup user quota (root excluded). To build it simply type 'make' from its directory. To install simply issue a 'make install', and note that by default it will install into /usr/lib (a good place for FreeBSD system): you can override that giving a different DESTDIR to make. For example on Linux you may want to install pam_quota to /lib/security issuing 'make install DESTDIR=/lib/security'.
To enable pam_quota, just add a similar line into /etc/pam.d/< service >:
session required pam_quota.so bhardlimit=30000
bsoftlimit=25000 ihardlimit=15000 isoftlimit=20000 itime=86400 btime=86400
Arguments are used to setup quota values (by default everything is zero) andfollows the dqblk structure:
bhardlimit absolute limit on disk blks alloc
bsoftlimit preferred limit on disk blks
ihardlimit maximum # allocated inodes + 1
isoftlimit preferred inode limit
btime time limit for excessive disk use
itime time limit for excessive files