pam_quota is a user quota setup module that is integrated with the PAM session. It is easy to use and excludes root.
To build pam_quota, all you need to do is enter its directory and type 'make'. Once completed, it can be installed by running 'make install'. It should be noted that by default, pam_quota will install into /usr/lib, which is a great location for FreeBSD systems. However, it is possible to override this location by entering a different DESTDIR when running 'make'. For instance, on Linux, you may choose to install pam_quota to /lib/security by issuing 'make install DESTDIR=/lib/security'.
After setting up pam_quota, enabling the software is a breeze. Simply add a line similar to the following to /etc/pam.d/< service >:
session required pam_quota.so bhardlimit=30000 bsoftlimit=25000 ihardlimit=15000 isoftlimit=20000 itime=86400 btime=86400
The arguments utilized in pam_quota are utilized for setting up quota values. By default, the values are all zero, and they follow the dqblk structure. The arguments are inclusive of:
- bhardlimit: An absolute limit on disk blocks allocation
- bsoftlimit: The preferred limit on disk blocks
- ihardlimit: The maximum number of allocated inodes plus one
- isoftlimit: The preferred inode limit
- btime: The time limit for excessive disk use
- itime: The time limit for excessive files
Overall, I found pam_quota to be a nifty software tool for setting up user quotas. It was easy to install and set up, and I experienced no issues while using it. While it may not be suitable for more advanced scenarios, it's a good choice for simpler setups.
Version 0.1: N/A