{
    "mode": "man",
    "parameter": "pam_setquota",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/pam_setquota/8/json",
    "generated": "2026-06-15T13:15:50Z",
    "synopsis": "pamsetquota.so [fs=/home] [overwrite=0] [debug=0] [startuid=1000] [enduid=0]\n[bsoftlimit=19000] [bhardlimit=20000] [isoftlimit=3000] [ihardlimit=4000]",
    "sections": {
        "NAME": {
            "content": "pamsetquota - PAM module to set or modify disk quotas on session start\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pamsetquota.so [fs=/home] [overwrite=0] [debug=0] [startuid=1000] [enduid=0]\n[bsoftlimit=19000] [bhardlimit=20000] [isoftlimit=3000] [ihardlimit=4000]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "pamsetquota is a PAM module to set or modify a disk quota at session start\n\nThis makes quotas usable with central user databases, such as MySQL or LDAP.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "fs=/home\nThe device file or mountpoint the policy applies to. Defaults to the filesystem\ncontaining the users home directory.\n\noverwrite=0\nOverwrite an existing quota. Note: Enabling this will remove the ability for the admin to\nmanually configure different quotas for users for a filesystem with edquota(8). (Defaults\nto 0)\n\ndebug=0\nEnable debugging. A value of 1 outputs the old and new quota on a device. A value of 2\nalso prints out the matched and found filesystems should fs be unset. (Defaults to 0)\n\nstartuid=1000\nDescribe the start of the UID range the policy is applied to. (Defaults to UIDMIN from\nlogin.defs or the uidmin value defined at compile-time if UIDMIN is undefined)\n\nenduid=0\nDescribe the end of the UID range the policy is applied to. Setting enduid=0 results in\nan open-ended UID range (i.e. all uids greater than startuid are included). (Defaults to\n0)\n\nbsoftlimit=19000\nSoft limit for disk quota blocks, as defined by quotactl(2). Note: bsoftlimit and\nbhardlimit must be set at the same time!\n\nbhardlimit=20000\nHard limit for disk quota blocks, as defined by quotactl(2). Note: bsoftlimit and\nbhardlimit must be set at the same time!\n\nisoftlimit=3000\nSoft limit for inodes, as defined by\nquotactl(2). Note: isoftlimit and ihardlimit must be set at the same time!\n\nihardlimit=4000\nHard limit for inodes, as defined by\nquotactl(2). Note: isoftlimit and ihardlimit must be set at the same time!\n",
            "subsections": []
        },
        "MODULE TYPES PROVIDED": {
            "content": "Only the session module type is provided.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "PAMSUCCESS\nThe quota was set successfully.\n\nPAMIGNORE\nNo action was taken because either the UID of the user was outside of the specifed range,\na quota already existed and overwrite=1 was not configured or no limits were configured\nat all.\n\nPAMUSERUNKNOWN\nThe user was not found.\n\nPAMPERMDENIED\n/proc/mounts could not be opened.\n\nThe filesystem or device specified was not found.\n\nThe limits for the user could not be retrieved. See syslog for more information.\n\nThe limits for the user could not be set. See syslog for more information.\n\nEither isoftlimit/ihardlimit or bsoftlimit/bhardlimit were not set at the same time.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "A single invocation of `pamsetquota` applies a specific policy to a UID range. Applying\ndifferent policies to specific UID ranges is done by invoking pamsetquota more than once.\nThe last matching entry defines the resulting quota.\n\nsession  required   pamsetquota.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home\nsession  required   pamsetquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1\nsession  required   pamsetquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pam.conf(5), pam.d(5), pam(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "pamsetquota was originally written by Ruslan Savchenko <savrus@mexmat.net>.\n\nFurther modifications were made by Shane Tzen<shane@ict.usc.edu>, Sven Hartge\n<sven@svenharte.de> and Keller Fuchs <kellerfuchs@hashbang.sh>\n\n\n\nLinux-PAM Manual                             06/08/2020                              PAMSETQUOTA(8)",
            "subsections": []
        }
    },
    "summary": "pamsetquota - PAM module to set or modify disk quotas on session start",
    "flags": [],
    "examples": [
        "A single invocation of `pamsetquota` applies a specific policy to a UID range. Applying",
        "different policies to specific UID ranges is done by invoking pamsetquota more than once.",
        "The last matching entry defines the resulting quota.",
        "session  required   pamsetquota.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home",
        "session  required   pamsetquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1",
        "session  required   pamsetquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1"
    ],
    "see_also": [
        {
            "name": "pam.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.conf/5/json"
        },
        {
            "name": "pam.d",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
        },
        {
            "name": "pam",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/pam/8/json"
        }
    ]
}