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" "08/17/2012" "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 or values of other PAM items\&. 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\&.
233 Field has a value numerically less than number\&.
236 \fBfield <= number\fR
238 Field has a value numerically less than or equal to number\&.
241 \fBfield eq number\fR
243 Field has a value numerically equal to number\&.
246 \fBfield >= number\fR
248 Field has a value numerically greater than or equal to number\&.
253 Field has a value numerically greater than number\&.
256 \fBfield ne number\fR
258 Field has a value numerically different from number\&.
263 Field exactly matches the given string\&.
266 \fBfield != string\fR
268 Field does not match the given string\&.
273 Field matches the given glob\&.
278 Field does not match the given glob\&.
281 \fBfield in item:item:\&.\&.\&.\fR
283 Field is contained in the list of items separated by colons\&.
286 \fBfield notin item:item:\&.\&.\&.\fR
288 Field is not contained in the list of items separated by colons\&.
291 \fBuser ingroup group\fR
293 User is in given group\&.
296 \fBuser notingroup group\fR
298 User is not in given group\&.
301 \fBuser innetgr netgroup\fR
303 (user,host) is in given netgroup\&.
306 \fBuser notinnetgr group\fR
308 (user,host) is not in given netgroup\&.
310 .SH "MODULE TYPES PROVIDED"
312 All module types (\fBaccount\fR,
316 \fBsession\fR) are provided\&.
321 The condition was true\&.
326 The condition was false\&.
331 A service error occurred or the arguments can\'t be parsed correctly\&.
335 To emulate the behaviour of
336 \fIpam_wheel\fR, except there is no fallback to group 0:
347 .BB lightgray adjust-for-leading-newline
350 auth required pam_succeed_if\&.so quiet user ingroup wheel
352 .EB lightgray adjust-for-leading-newline
363 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\&.
374 .BB lightgray adjust-for-leading-newline
377 type [default=1 success=ignore] pam_succeed_if\&.so quiet uid > 500
378 type required othermodule\&.so arguments\&.\&.\&.
380 .EB lightgray adjust-for-leading-newline
397 Nalin Dahyabhai <nalin@redhat\&.com>