Debian Codegraph @

upstream/debian-unstable/man8/pam_setquota.8

raw
1 '\" t
2 .\" Title: pam_setquota
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_SETQUOTA" "8" "06/29/2025" "Linux\-PAM" "Linux\-PAM Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 pam_setquota \- PAM module to set or modify disk quotas on session start
32 .SH "SYNOPSIS"
33 .HP \w'\fBpam_setquota\&.so\fR\ 'u
34 \fBpam_setquota\&.so\fR [fs=\fI/home\fR] [overwrite=\fI0\fR] [debug=\fI0\fR] [startuid=\fI1000\fR] [enduid=\fI0\fR] [bsoftlimit=\fI19000\fR] [bhardlimit=\fI20000\fR] [isoftlimit=\fI3000\fR] [ihardlimit=\fI4000\fR]
35 .SH "DESCRIPTION"
36 .PP
37 pam_setquota is a PAM module to set or modify a disk quota at session start
38 .PP
39 This makes quotas usable with central user databases, such as MySQL or LDAP\&.
40 .SH "OPTIONS"
41 .PP
42 .PP
43 fs=/home
44 .RS 4
45 The device file or mountpoint the policy applies to\&. Defaults to the filesystem containing the users home directory\&.
46 .RE
47 .PP
48 overwrite=0
49 .RS 4
50 Overwrite an existing quota\&. Note: Enabling this will remove the ability for the admin to manually configure different quotas for users for a filesystem with
51 \fBedquota\fR(8)\&. (Defaults to 0)
52 .RE
53 .PP
54 debug=0
55 .RS 4
56 Enable debugging\&. A value of 1 outputs the old and new quota on a device\&. A value of 2 also prints out the matched and found filesystems should
57 \fBfs\fR
58 be unset\&. (Defaults to 0)
59 .RE
60 .PP
61 startuid=1000
62 .RS 4
63 Describe the start of the UID range the policy is applied to\&. (Defaults to UID_MIN from login\&.defs or the uidmin value defined at compile\-time if UID_MIN is undefined\&.)
64 .RE
65 .PP
66 enduid=0
67 .RS 4
68 Describe the end of the UID range the policy is applied to\&. Setting
69 \fIenduid=0\fR
70 results in an open\-ended UID range (i\&.e\&. all uids greater than
71 \fBstartuid\fR
72 are included)\&. (Defaults to 0)
73 .RE
74 .PP
75 bsoftlimit=19000
76 .RS 4
77 Soft limit for disk quota blocks, as defined by
78 \fBquotactl\fR(2)\&. Note:
79 \fBbsoftlimit\fR
80 and
81 \fBbhardlimit\fR
82 \fImust\fR
83 be set at the same time!
84 .RE
85 .PP
86 bhardlimit=20000
87 .RS 4
88 Hard limit for disk quota blocks, as defined by
89 \fBquotactl\fR(2)\&. Note:
90 \fBbsoftlimit\fR
91 and
92 \fBbhardlimit\fR
93 \fImust\fR
94 be set at the same time!
95 .RE
96 .PP
97 isoftlimit=3000
98 .RS 4
99 Soft limit for inodes, as defined by
100 \fB quotactl\fR(2)\&. Note:
101 \fBisoftlimit\fR
102 and
103 \fBihardlimit\fR
104 \fImust\fR
105 be set at the same time!
106 .RE
107 .PP
108 ihardlimit=4000
109 .RS 4
110 Hard limit for inodes, as defined by
111 \fB quotactl\fR(2)\&. Note:
112 \fBisoftlimit\fR
113 and
114 \fBihardlimit\fR
115 \fImust\fR
116 be set at the same time!
117 .RE
118 .SH "MODULE TYPES PROVIDED"
119 .PP
120 Only the
121 \fBsession\fR
122 module type is provided\&.
123 .SH "RETURN VALUES"
124 .PP
125 .PP
126 PAM_SUCCESS
127 .RS 4
128 The quota was set successfully\&.
129 .RE
130 .PP
131 PAM_IGNORE
132 .RS 4
133 No action was taken because either the UID of the user was outside of the specified range, a quota already existed and
134 \fBoverwrite=1\fR
135 was not configured or no limits were configured at all\&.
136 .RE
137 .PP
138 PAM_USER_UNKNOWN
139 .RS 4
140 The user was not found\&.
141 .RE
142 .PP
143 PAM_PERM_DENIED
144 .RS 4
145 /proc/mounts
146 could not be opened\&.
147 .sp
148 The filesystem or device specified was not found\&.
149 .sp
150 The limits for the user could not be retrieved\&. See syslog for more information\&.
151 .sp
152 The limits for the user could not be set\&. See syslog for more information\&.
153 .sp
154 Either
155 \fBisoftlimit\fR/\fBihardlimit\fR
156 or
157 \fBbsoftlimit\fR/\fBbhardlimit\fR
158 were not set at the same time\&.
159 .RE
160 .SH "EXAMPLES"
161 .PP
162 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\&.
163 .sp
164 .if n \{\
165 .RS 4
166 .\}
167 .nf
168 session required pam_setquota\&.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home
169 session required pam_setquota\&.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1
170 session required pam_setquota\&.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1
171
172 .fi
173 .if n \{\
174 .RE
175 .\}
176 .sp
177 .SH "SEE ALSO"
178 .PP
179 \fBpam.conf\fR(5),
180 \fBpam.d\fR(5),
181 \fBpam\fR(8)
182 .SH "AUTHOR"
183 .PP
184 pam_setquota was originally written by Ruslan Savchenko <savrus@mexmat\&.net>\&.
185 .PP
186 Further modifications were made by Shane Tzen <shane@ict\&.usc\&.edu>, Sven Hartge <sven@svenhartge\&.de> and Keller Fuchs <kellerfuchs@hashbang\&.sh>\&.