1PAM_SETQUOTA(8)                Linux-PAM Manual                PAM_SETQUOTA(8)
2
3
4

NAME

6       pam_setquota - PAM module to set or modify disk quotas on session start
7

SYNOPSIS

9       pam_setquota.so [fs=/home] [overwrite=0] [debug=0] [startuid=1000]
10                       [enduid=0] [bsoftlimit=19000] [bhardlimit=20000]
11                       [isoftlimit=3000] [ihardlimit=4000]
12

DESCRIPTION

14       pam_setquota is a PAM module to set or modify a disk quota at session
15       start
16
17       This makes quotas usable with central user databases, such as MySQL or
18       LDAP.
19

OPTIONS

21       fs=/home
22           The device file or mountpoint the policy applies to. Defaults to
23           the filesystem containing the users home directory.
24
25       overwrite=0
26           Overwrite an existing quota. Note: Enabling this will remove the
27           ability for the admin to manually configure different quotas for
28           users for a filesystem with edquota(8). (Defaults to 0)
29
30       debug=0
31           Enable debugging. A value of 1 outputs the old and new quota on a
32           device. A value of 2 also prints out the matched and found
33           filesystems should fs be unset. (Defaults to 0)
34
35       startuid=1000
36           Describe the start of the UID range the policy is applied to.
37           (Defaults to UID_MIN from login.defs or the uidmin value defined at
38           compile-time if UID_MIN is undefined.)
39
40       enduid=0
41           Describe the end of the UID range the policy is applied to. Setting
42           enduid=0 results in an open-ended UID range (i.e. all uids greater
43           than startuid are included). (Defaults to 0)
44
45       bsoftlimit=19000
46           Soft limit for disk quota blocks, as defined by quotactl(2). Note:
47           bsoftlimit and bhardlimit must be set at the same time!
48
49       bhardlimit=20000
50           Hard limit for disk quota blocks, as defined by quotactl(2). Note:
51           bsoftlimit and bhardlimit must be set at the same time!
52
53       isoftlimit=3000
54           Soft limit for inodes, as defined by
55            quotactl(2). Note: isoftlimit and ihardlimit must be set at the
56           same time!
57
58       ihardlimit=4000
59           Hard limit for inodes, as defined by
60            quotactl(2). Note: isoftlimit and ihardlimit must be set at the
61           same time!
62

MODULE TYPES PROVIDED

64       Only the session module type is provided.
65

RETURN VALUES

67       PAM_SUCCESS
68           The quota was set successfully.
69
70       PAM_IGNORE
71           No action was taken because either the UID of the user was outside
72           of the specified range, a quota already existed and overwrite=1 was
73           not configured or no limits were configured at all.
74
75       PAM_USER_UNKNOWN
76           The user was not found.
77
78       PAM_PERM_DENIED
79           /proc/mounts could not be opened.
80
81           The filesystem or device specified was not found.
82
83           The limits for the user could not be retrieved. See syslog for more
84           information.
85
86           The limits for the user could not be set. See syslog for more
87           information.
88
89           Either isoftlimit/ihardlimit or bsoftlimit/bhardlimit were not set
90           at the same time.
91

EXAMPLES

93       A single invocation of `pam_setquota` applies a specific policy to a
94       UID range. Applying different policies to specific UID ranges is done
95       by invoking pam_setquota more than once. The last matching entry
96       defines the resulting quota.
97
98                 session  required   pam_setquota.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home
99                 session  required   pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1
100                 session  required   pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1
101
102
103

SEE ALSO

105       pam.conf(5), pam.d(5), pam(8)
106

AUTHOR

108       pam_setquota was originally written by Ruslan Savchenko
109       <savrus@mexmat.net>.
110
111       Further modifications were made by Shane Tzen <shane@ict.usc.edu>, Sven
112       Hartge <sven@svenhartge.de> and Keller Fuchs <kellerfuchs@hashbang.sh>.
113
114
115
116Linux-PAM                         05/07/2023                   PAM_SETQUOTA(8)
Impressum