~ubuntu-branches/ubuntu/natty/pam/natty-security

« back to all changes in this revision

Viewing changes to modules/pam_succeed_if/pam_succeed_if.8

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-08-26 00:40:14 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826004014-qsd46mostuyljeqp
Tags: 1.1.0-1ubuntu1
* Merge from Debian, remaining changes:
  - debian/libpam-modules.postinst: Add PATH to /etc/environment if it's not
    present there or in /etc/security/pam_env.conf. (should send to Debian).
  - debian/libpam0g.postinst: only ask questions during update-manager when
    there are non-default services running.
  - debian/patches-applied/series: Ubuntu patches are as below ...
  - debian/patches-applied/ubuntu-no-error-if-missingok: add a new, magic
    module option 'missingok' which will suppress logging of errors by
    libpam if the module is not found.
  - debian/patches-applied/ubuntu-regression_fix_securetty: prompt for
    password on bad username.
  - debian/patches-applied/ubuntu-rlimit_nice_correction: Explicitly
    initialise RLIMIT_NICE rather than relying on the kernel limits.
  - Change Vcs-Bzr to point at the Ubuntu branch.
  - debian/local/common-password, debian/pam-configs/unix: switch from
    "md5" to "sha512" as password crypt default.
  - Make libpam-modules depend on base-files (>= 5.0.0ubuntu6), to ensure
    run-parts does the right thing in /etc/update-motd.d.
  - debian/patches-applied/pam_motd-legal-notice: display the contents of
    /etc/legal once, then set a flag in the user's homedir to prevent showing
    it again.
  - debian/local/common-{auth,account,password}.md5sums: include the
    Ubuntu-specific intrepid,jaunty md5sums for use during the
    common-session-noninteractive upgrade.
* Dropped changes, superseded upstream:
  - debian/patches-applied/ubuntu-fix_standard_types: Use standard u_int8_t
    type rather than __u8.
  - debian/patches-applied/ubuntu-user_defined_environment: Look at
    ~/.pam_environment too, with the same format as
    /etc/security/pam_env.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: pam_succeed_if
2
 
.\"    Author: 
3
 
.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
4
 
.\"      Date: 04/16/2008
 
2
.\"    Author: [see the "AUTHOR" section]
 
3
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
 
4
.\"      Date: 06/16/2009
5
5
.\"    Manual: Linux-PAM
6
6
.\"    Source: Linux-PAM
 
7
.\"  Language: English
7
8
.\"
8
 
.TH "PAM_SUCCEED_IF" "8" "04/16/2008" "Linux-PAM" "Linux\-PAM"
 
9
.TH "PAM_SUCCEED_IF" "8" "06/16/2009" "Linux-PAM" "Linux\-PAM"
 
10
.\" -----------------------------------------------------------------
 
11
.\" * (re)Define some macros
 
12
.\" -----------------------------------------------------------------
 
13
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
14
.\" toupper - uppercase a string (locale-aware)
 
15
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
16
.de toupper
 
17
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
 
18
\\$*
 
19
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
 
20
..
 
21
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
22
.\" SH-xref - format a cross-reference to an SH section
 
23
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
24
.de SH-xref
 
25
.ie n \{\
 
26
.\}
 
27
.toupper \\$*
 
28
.el \{\
 
29
\\$*
 
30
.\}
 
31
..
 
32
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
33
.\" SH - level-one heading that works better for non-TTY output
 
34
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
35
.de1 SH
 
36
.\" put an extra blank line of space above the head in non-TTY output
 
37
.if t \{\
 
38
.sp 1
 
39
.\}
 
40
.sp \\n[PD]u
 
41
.nr an-level 1
 
42
.set-an-margin
 
43
.nr an-prevailing-indent \\n[IN]
 
44
.fi
 
45
.in \\n[an-margin]u
 
46
.ti 0
 
47
.HTML-TAG ".NH \\n[an-level]"
 
48
.it 1 an-trap
 
49
.nr an-no-space-flag 1
 
50
.nr an-break-flag 1
 
51
\." make the size of the head bigger
 
52
.ps +3
 
53
.ft B
 
54
.ne (2v + 1u)
 
55
.ie n \{\
 
56
.\" if n (TTY output), use uppercase
 
57
.toupper \\$*
 
58
.\}
 
59
.el \{\
 
60
.nr an-break-flag 0
 
61
.\" if not n (not TTY), use normal case (not uppercase)
 
62
\\$1
 
63
.in \\n[an-margin]u
 
64
.ti 0
 
65
.\" if not n (not TTY), put a border/line under subheading
 
66
.sp -.6
 
67
\l'\n(.lu'
 
68
.\}
 
69
..
 
70
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
71
.\" SS - level-two heading that works better for non-TTY output
 
72
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
73
.de1 SS
 
74
.sp \\n[PD]u
 
75
.nr an-level 1
 
76
.set-an-margin
 
77
.nr an-prevailing-indent \\n[IN]
 
78
.fi
 
79
.in \\n[IN]u
 
80
.ti \\n[SN]u
 
81
.it 1 an-trap
 
82
.nr an-no-space-flag 1
 
83
.nr an-break-flag 1
 
84
.ps \\n[PS-SS]u
 
85
\." make the size of the head bigger
 
86
.ps +2
 
87
.ft B
 
88
.ne (2v + 1u)
 
89
.if \\n[.$] \&\\$*
 
90
..
 
91
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
92
.\" BB/BE - put background/screen (filled box) around block of text
 
93
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
94
.de BB
 
95
.if t \{\
 
96
.sp -.5
 
97
.br
 
98
.in +2n
 
99
.ll -2n
 
100
.gcolor red
 
101
.di BX
 
102
.\}
 
103
..
 
104
.de EB
 
105
.if t \{\
 
106
.if "\\$2"adjust-for-leading-newline" \{\
 
107
.sp -1
 
108
.\}
 
109
.br
 
110
.di
 
111
.in
 
112
.ll
 
113
.gcolor
 
114
.nr BW \\n(.lu-\\n(.i
 
115
.nr BH \\n(dn+.5v
 
116
.ne \\n(BHu+.5v
 
117
.ie "\\$2"adjust-for-leading-newline" \{\
 
118
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
 
119
.\}
 
120
.el \{\
 
121
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
 
122
.\}
 
123
.in 0
 
124
.sp -.5v
 
125
.nf
 
126
.BX
 
127
.in
 
128
.sp .5v
 
129
.fi
 
130
.\}
 
131
..
 
132
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
133
.\" BM/EM - put colored marker in margin next to block of text
 
134
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
135
.de BM
 
136
.if t \{\
 
137
.br
 
138
.ll -2n
 
139
.gcolor red
 
140
.di BX
 
141
.\}
 
142
..
 
143
.de EM
 
144
.if t \{\
 
145
.br
 
146
.di
 
147
.ll
 
148
.gcolor
 
149
.nr BH \\n(dn
 
150
.ne \\n(BHu
 
151
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
 
152
.in 0
 
153
.nf
 
154
.BX
 
155
.in
 
156
.fi
 
157
.\}
 
158
..
 
159
.\" -----------------------------------------------------------------
 
160
.\" * set default formatting
 
161
.\" -----------------------------------------------------------------
9
162
.\" disable hyphenation
10
163
.nh
11
164
.\" disable justification (adjust text to left margin only)
12
165
.ad l
13
 
.SH "NAME"
14
 
pam_succeed_if - test account characteristics
15
 
.SH "SYNOPSIS"
16
 
.HP 18
17
 
\fBpam_succeed_if\.so\fR [\fIflag\fR...] [\fIcondition\fR...]
 
166
.\" -----------------------------------------------------------------
 
167
.\" * MAIN CONTENT STARTS HERE *
 
168
.\" -----------------------------------------------------------------
 
169
.SH "Name"
 
170
pam_succeed_if \- test account characteristics
 
171
.SH "Synopsis"
 
172
.fam C
 
173
.HP \w'\fBpam_succeed_if\&.so\fR\ 'u
 
174
\fBpam_succeed_if\&.so\fR [\fIflag\fR...] [\fIcondition\fR...]
 
175
.fam
18
176
.SH "DESCRIPTION"
19
177
.PP
20
 
pam_succeed_if\.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated\. One use is to select whether to load other modules based on this test\.
 
178
pam_succeed_if\&.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated\&. One use is to select whether to load other modules based on this test\&.
21
179
.PP
22
 
The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met\.
 
180
The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met\&.
23
181
.SH "OPTIONS"
24
182
.PP
25
183
The following
27
185
.PP
28
186
\fBdebug\fR
29
187
.RS 4
30
 
Turns on debugging messages sent to syslog\.
 
188
Turns on debugging messages sent to syslog\&.
31
189
.RE
32
190
.PP
33
191
\fBuse_uid\fR
34
192
.RS 4
35
 
Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated\.
 
193
Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated\&.
36
194
.RE
37
195
.PP
38
196
\fBquiet\fR
39
197
.RS 4
40
 
Don\'t log failure or success to the system log\.
 
198
Don\'t log failure or success to the system log\&.
41
199
.RE
42
200
.PP
43
201
\fBquiet_fail\fR
44
202
.RS 4
45
 
Don\'t log failure to the system log\.
 
203
Don\'t log failure to the system log\&.
46
204
.RE
47
205
.PP
48
206
\fBquiet_success\fR
49
207
.RS 4
50
 
Don\'t log success to the system log\.
 
208
Don\'t log success to the system log\&.
51
209
.RE
52
210
.PP
53
211
 
54
 
\fICondition\fRs are three words: a field, a test, and a value to test for\.
 
212
\fICondition\fRs are three words: a field, a test, and a value to test for\&.
55
213
.PP
56
214
Available fields are
57
215
\fIuser\fR,
64
222
.PP
65
223
\fBfield < number\fR
66
224
.RS 4
67
 
Field has a value numerically less than number\.
 
225
Field has a value numerically less than number\&.
68
226
.RE
69
227
.PP
70
228
\fBfield <= number\fR
71
229
.RS 4
72
 
Field has a value numerically less than or equal to number\.
 
230
Field has a value numerically less than or equal to number\&.
73
231
.RE
74
232
.PP
75
233
\fBfield eq number\fR
76
234
.RS 4
77
 
Field has a value numerically equal to number\.
 
235
Field has a value numerically equal to number\&.
78
236
.RE
79
237
.PP
80
238
\fBfield >= number\fR
81
239
.RS 4
82
 
Field has a value numerically greater than or equal to number\.
 
240
Field has a value numerically greater than or equal to number\&.
83
241
.RE
84
242
.PP
85
243
\fBfield > number\fR
86
244
.RS 4
87
 
Field has a value numerically greater than number\.
 
245
Field has a value numerically greater than number\&.
88
246
.RE
89
247
.PP
90
248
\fBfield ne number\fR
91
249
.RS 4
92
 
Field has a value numerically different from number\.
 
250
Field has a value numerically different from number\&.
93
251
.RE
94
252
.PP
95
253
\fBfield = string\fR
96
254
.RS 4
97
 
Field exactly matches the given string\.
 
255
Field exactly matches the given string\&.
98
256
.RE
99
257
.PP
100
258
\fBfield != string\fR
101
259
.RS 4
102
 
Field does not match the given string\.
 
260
Field does not match the given string\&.
103
261
.RE
104
262
.PP
105
263
\fBfield =~ glob\fR
106
264
.RS 4
107
 
Field matches the given glob\.
 
265
Field matches the given glob\&.
108
266
.RE
109
267
.PP
110
268
\fBfield !~ glob\fR
111
269
.RS 4
112
 
Field does not match the given glob\.
113
 
.RE
114
 
.PP
115
 
\fBfield in item:item:\.\.\.\fR
116
 
.RS 4
117
 
Field is contained in the list of items separated by colons\.
118
 
.RE
119
 
.PP
120
 
\fBfield notin item:item:\.\.\.\fR
121
 
.RS 4
122
 
Field is not contained in the list of items separated by colons\.
 
270
Field does not match the given glob\&.
 
271
.RE
 
272
.PP
 
273
\fBfield in item:item:\&.\&.\&.\fR
 
274
.RS 4
 
275
Field is contained in the list of items separated by colons\&.
 
276
.RE
 
277
.PP
 
278
\fBfield notin item:item:\&.\&.\&.\fR
 
279
.RS 4
 
280
Field is not contained in the list of items separated by colons\&.
123
281
.RE
124
282
.PP
125
283
\fBuser ingroup group\fR
126
284
.RS 4
127
 
User is in given group\.
 
285
User is in given group\&.
128
286
.RE
129
287
.PP
130
288
\fBuser notingroup group\fR
131
289
.RS 4
132
 
User is not in given group\.
 
290
User is not in given group\&.
133
291
.RE
134
292
.PP
135
293
\fBuser innetgr netgroup\fR
136
294
.RS 4
137
 
(user,host) is in given netgroup\.
 
295
(user,host) is in given netgroup\&.
138
296
.RE
139
297
.PP
140
298
\fBuser notinnetgr group\fR
141
299
.RS 4
142
 
(user,host) is not in given netgroup\.
 
300
(user,host) is not in given netgroup\&.
143
301
.RE
144
 
.SH "MODULE SERVICES PROVIDED"
 
302
.SH "MODULE TYPES PROVIDED"
145
303
.PP
146
 
All services are supported\.
 
304
All module types (\fBaccount\fR,
 
305
\fBauth\fR,
 
306
\fBpassword\fR
 
307
and
 
308
\fBsession\fR) are provided\&.
147
309
.SH "RETURN VALUES"
148
310
.PP
149
311
PAM_SUCCESS
150
312
.RS 4
151
 
The condition was true\.
 
313
The condition was true\&.
152
314
.RE
153
315
.PP
154
316
PAM_AUTH_ERR
155
317
.RS 4
156
 
The condition was false\.
 
318
The condition was false\&.
157
319
.RE
158
320
.PP
159
321
PAM_SERVICE_ERR
160
322
.RS 4
161
 
A service error occured or the arguments can\'t be parsed as numbers\.
 
323
A service error occurred or the arguments can\'t be parsed correctly\&.
162
324
.RE
163
325
.SH "EXAMPLES"
164
326
.PP
165
327
To emulate the behaviour of
166
328
\fIpam_wheel\fR, except there is no fallback to group 0:
167
329
.sp
 
330
.if n \{\
168
331
.RS 4
 
332
.\}
 
333
.fam C
 
334
.ps -1
169
335
.nf
170
 
auth required pam_succeed_if\.so quiet user ingroup wheel
 
336
.if t \{\
 
337
.sp -1
 
338
.\}
 
339
.BB lightgray adjust-for-leading-newline
 
340
.sp -1
 
341
 
 
342
auth required pam_succeed_if\&.so quiet user ingroup wheel
171
343
    
 
344
.EB lightgray adjust-for-leading-newline
 
345
.if t \{\
 
346
.sp 1
 
347
.\}
172
348
.fi
 
349
.fam
 
350
.ps +1
 
351
.if n \{\
173
352
.RE
 
353
.\}
174
354
.PP
175
 
Given that the type matches, only loads the othermodule rule if the UID is over 500\. Adjust the number after default to skip several rules\.
 
355
Given that the type matches, only loads the othermodule rule if the UID is over 500\&. Adjust the number after default to skip several rules\&.
176
356
.sp
 
357
.if n \{\
177
358
.RS 4
 
359
.\}
 
360
.fam C
 
361
.ps -1
178
362
.nf
179
 
type [default=1 success=ignore] pam_succeed_if\.so quiet uid > 500
180
 
type required othermodule\.so arguments\.\.\.
 
363
.if t \{\
 
364
.sp -1
 
365
.\}
 
366
.BB lightgray adjust-for-leading-newline
 
367
.sp -1
 
368
 
 
369
type [default=1 success=ignore] pam_succeed_if\&.so quiet uid > 500
 
370
type required othermodule\&.so arguments\&.\&.\&.
181
371
    
 
372
.EB lightgray adjust-for-leading-newline
 
373
.if t \{\
 
374
.sp 1
 
375
.\}
182
376
.fi
 
377
.fam
 
378
.ps +1
 
379
.if n \{\
183
380
.RE
 
381
.\}
184
382
.SH "SEE ALSO"
185
383
.PP
186
384
 
188
386
\fBpam\fR(8)
189
387
.SH "AUTHOR"
190
388
.PP
191
 
Nalin Dahyabhai <nalin@redhat\.com>
 
389
Nalin Dahyabhai <nalin@redhat\&.com>