1 .\" Title: pam_succeed_if
2 .\" Author: [see the "AUTHOR" section]
3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
9 .TH "PAM_SUCCEED_IF" "8" "06/21/2011" "Linux-PAM" "Linux\-PAM"
10 .\" -----------------------------------------------------------------
11 .\" * (re)Define some macros
12 .\" -----------------------------------------------------------------
13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 .\" toupper - uppercase a string (locale-aware)
15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" SH-xref - format a cross-reference to an SH section
23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 .\" SH - level-one heading that works better for non-TTY output
34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 .\" put an extra blank line of space above the head in non-TTY output
43 .nr an-prevailing-indent \\n[IN]
47 .HTML-TAG ".NH \\n[an-level]"
49 .nr an-no-space-flag 1
51 \." make the size of the head bigger
56 .\" if n (TTY output), use uppercase
61 .\" if not n (not TTY), use normal case (not uppercase)
65 .\" if not n (not TTY), put a border/line under subheading
70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 .\" SS - level-two heading that works better for non-TTY output
72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 .nr an-prevailing-indent \\n[IN]
82 .nr an-no-space-flag 1
85 \." make the size of the head bigger
91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 .\" BB/BE - put background/screen (filled box) around block of text
93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 .if "\\$2"adjust-for-leading-newline" \{\
114 .nr BW \\n(.lu-\\n(.i
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[]
121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133 .\" BM/EM - put colored marker in margin next to block of text
134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
159 .\" -----------------------------------------------------------------
160 .\" * set default formatting
161 .\" -----------------------------------------------------------------
162 .\" disable hyphenation
164 .\" disable justification (adjust text to left margin only)
166 .\" -----------------------------------------------------------------
167 .\" * MAIN CONTENT STARTS HERE *
168 .\" -----------------------------------------------------------------
170 pam_succeed_if \- test account characteristics
173 .HP \w'\fBpam_succeed_if\&.so\fR\ 'u
174 \fBpam_succeed_if\&.so\fR [\fIflag\fR...] [\fIcondition\fR...]
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\&.
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\&.
184 \fIflag\fRs are supported:
188 Turns on debugging messages sent to syslog\&.
193 Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated\&.
198 Don\'t log failure or success to the system log\&.
203 Don\'t log failure to the system log\&.
208 Don\'t log success to the system log\&.
213 Log unknown users to the system log\&.
217 \fICondition\fRs are three words: a field, a test, and a value to test for\&.
230 Field has a value numerically less than number\&.
233 \fBfield <= number\fR
235 Field has a value numerically less than or equal to number\&.
238 \fBfield eq number\fR
240 Field has a value numerically equal to number\&.
243 \fBfield >= number\fR
245 Field has a value numerically greater than or equal to number\&.
250 Field has a value numerically greater than number\&.
253 \fBfield ne number\fR
255 Field has a value numerically different from number\&.
260 Field exactly matches the given string\&.
263 \fBfield != string\fR
265 Field does not match the given string\&.
270 Field matches the given glob\&.
275 Field does not match the given glob\&.
278 \fBfield in item:item:\&.\&.\&.\fR
280 Field is contained in the list of items separated by colons\&.
283 \fBfield notin item:item:\&.\&.\&.\fR
285 Field is not contained in the list of items separated by colons\&.
288 \fBuser ingroup group\fR
290 User is in given group\&.
293 \fBuser notingroup group\fR
295 User is not in given group\&.
298 \fBuser innetgr netgroup\fR
300 (user,host) is in given netgroup\&.
303 \fBuser notinnetgr group\fR
305 (user,host) is not in given netgroup\&.
307 .SH "MODULE TYPES PROVIDED"
309 All module types (\fBaccount\fR,
313 \fBsession\fR) are provided\&.
318 The condition was true\&.
323 The condition was false\&.
328 A service error occurred or the arguments can\'t be parsed correctly\&.
332 To emulate the behaviour of
333 \fIpam_wheel\fR, except there is no fallback to group 0:
344 .BB lightgray adjust-for-leading-newline
347 auth required pam_succeed_if\&.so quiet user ingroup wheel
349 .EB lightgray adjust-for-leading-newline
360 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\&.
371 .BB lightgray adjust-for-leading-newline
374 type [default=1 success=ignore] pam_succeed_if\&.so quiet uid > 500
375 type required othermodule\&.so arguments\&.\&.\&.
377 .EB lightgray adjust-for-leading-newline
394 Nalin Dahyabhai <nalin@redhat\&.com>