PAM_SETQUOTA(8)
๐ PAM_SETQUOTA(8) ๐
okay bestie, sit down, hydrate, because we're talking about pam_setquota โ straight out of the Linux-PAM Manual. it's a PAM module that sets or modifies disk quotas on session start, and honestly? it's giving โจcentralized-user-database-realnessโจ. no cap. let's get into it ๐ซถ
๐ธ NAME ๐ธ
pam_setquota โ a PAM module to set or modify disk quotas on session start ๐
โจ SYNOPSIS โจ
pam_setquota.so [fs=/home] [overwrite=0] [debug=0] [startuid=1000]
[enduid=0] [bsoftlimit=19000] [bhardlimit=20000]
[isoftlimit=3000] [ihardlimit=4000]
๐ฆ DESCRIPTION ๐ฆ
so pam_setquota is a PAM module that sets or modifies a disk quota at session start. that's the whole vibe. ๐ซถ
and the reason it's iconic? it makes quotas usable with central user databases, like MySQL or LDAP. yeah. your fancy central auth situation can have quotas too. we love to see it. ๐
๐ OPTIONS ๐
fs=/homeโ the device file or mountpoint that the policy applies to. defaults to the filesystem containing the user's home directory. ๐overwrite=0โ overwrite an existing quota. but listen: enabling this will remove the ability for the admin to manually configure different quotas for users for a filesystem withedquota(8). defaults to0.
โ ๏ธ bestie that's a real tradeoff, not a vibe. turn it on and you're handing the keys to this module. ๐จ
debug=0โ enable debugging. a value of1outputs the old and new quota on a device. a value of2also prints out the matched and found filesystems shouldfsbe unset. defaults to0. ๐startuid=1000โ describes the start of the UID range the policy is applied to. defaults toUID_MINfromlogin.defs, or theuidminvalue defined at compile-time ifUID_MINis undefined. ๐ฏenduid=0โ describes the end of the UID range the policy is applied to. settingenduid=0results in an open-ended UID range (i.e. all uids greater thanstartuidare included). defaults to0. ๐bsoftlimit=19000โ soft limit for disk quota blocks, as defined byquotactl(2). note:bsoftlimitandbhardlimitmust be set at the same time! โ ๏ธbhardlimit=20000โ hard limit for disk quota blocks, as defined byquotactl(2). note:bsoftlimitandbhardlimitmust be set at the same time! โ ๏ธisoftlimit=3000โ soft limit for inodes, as defined byquotactl(2). note:isoftlimitandihardlimitmust be set at the same time! โ ๏ธihardlimit=4000โ hard limit for inodes, as defined byquotactl(2). note:isoftlimitandihardlimitmust be set at the same time! โ ๏ธ
๐ MODULE TYPES PROVIDED ๐
only the session module type is provided. that's it. one type. she's focused. ๐
๐ RETURN VALUES ๐
PAM_SUCCESSโ the quota was set successfully. slay! ๐PAM_IGNOREโ no action was taken, because either the UID of the user was outside of the specified range, a quota already existed andoverwrite=1was not configured, or no limits were configured at all. ๐PAM_USER_UNKNOWNโ the user was not found. ๐ญPAM_PERM_DENIEDโ this one's a whole list, buckle up:/proc/mountscould not be opened.- the filesystem or device specified was not found.
- the limits for the user could not be retrieved. see syslog for more information.
- the limits for the user could not be set. see syslog for more information.
- either
isoftlimit/ihardlimitorbsoftlimit/bhardlimitwere not set at the same time.
๐ฅ EXAMPLES ๐ฅ
a single invocation of pam_setquota applies a specific policy to a UID range. applying different policies to specific UID ranges is done by invoking pam_setquota more than once. the last matching entry defines the resulting quota. ๐
session required pam_setquota.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home
session required pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1
session required pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1
the way that third line just rolls in with overwrite=1 and takes overโฆ main character energy fr fr. ๐ซถ
๐ SEE ALSO ๐
๐ AUTHOR ๐
pam_setquota was originally written by Ruslan Savchenko <savrus@mexmat.net>. ๐
further modifications were made by Shane Tzen <shane@ict.usc.edu>, Sven Hartge <sven@svenhartge.de> and Keller Fuchs <kellerfuchs@hashbang.sh>. ๐
and that's the page, bestie!! ๐ฆ this whole thing came to you from Linux-PAM, dated 09/27/2026, filed under PAM_SETQUOTA(8) โ go set some quotas, you absolute icon. periodt. ๐
โจ๐ธ
๐ฆ where this page comes from
- arch rolling: pam 1.7.3-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms