1PAM_SUCCEED_IF(8)                  Linux-PAM                 PAM_SUCCEED_IF(8)
2
3
4

NAME

6       pam_succeed_if - test account characteristics
7

SYNOPSIS

9       pam_succeed_if.so [flag...] [condition...]
10

DESCRIPTION

12       pam_succeed_if.so is designed to succeed or fail authentication based
13       on characteristics of the account belonging to the user being
14       authenticated or values of other PAM items. One use is to select
15       whether to load other modules based on this test.
16
17       The module should be given one or more conditions as module arguments,
18       and authentication will succeed only if all of the conditions are met.
19

OPTIONS

21       The following flags are supported:
22
23       debug
24           Turns on debugging messages sent to syslog.
25
26       use_uid
27           Evaluate conditions using the account of the user whose UID the
28           application is running under instead of the user being
29           authenticated.
30
31       quiet
32           Don't log failure or success to the system log.
33
34       quiet_fail
35           Don't log failure to the system log.
36
37       quiet_success
38           Don't log success to the system log.
39
40       audit
41           Log unknown users to the system log.
42
43       Conditions are three words: a field, a test, and a value to test for.
44
45       Available fields are user, uid, gid, shell, home, ruser, rhost, tty and
46       service:
47
48       field < number
49           Field has a value numerically less than number.
50
51       field <= number
52           Field has a value numerically less than or equal to number.
53
54       field eq number
55           Field has a value numerically equal to number.
56
57       field >= number
58           Field has a value numerically greater than or equal to number.
59
60       field > number
61           Field has a value numerically greater than number.
62
63       field ne number
64           Field has a value numerically different from number.
65
66       field = string
67           Field exactly matches the given string.
68
69       field != string
70           Field does not match the given string.
71
72       field =~ glob
73           Field matches the given glob.
74
75       field !~ glob
76           Field does not match the given glob.
77
78       field in item:item:...
79           Field is contained in the list of items separated by colons.
80
81       field notin item:item:...
82           Field is not contained in the list of items separated by colons.
83
84       user ingroup group[:group:....]
85           User is in given group(s).
86
87       user notingroup group[:group:....]
88           User is not in given group(s).
89
90       user innetgr netgroup
91           (user,host) is in given netgroup.
92
93       user notinnetgr group
94           (user,host) is not in given netgroup.
95

MODULE TYPES PROVIDED

97       All module types (account, auth, password and session) are provided.
98

RETURN VALUES

100       PAM_SUCCESS
101           The condition was true.
102
103       PAM_AUTH_ERR
104           The condition was false.
105
106       PAM_SERVICE_ERR
107           A service error occurred or the arguments can't be parsed
108           correctly.
109

EXAMPLES

111       To emulate the behaviour of pam_wheel, except there is no fallback to
112       group 0 being only approximated by checking also the root group
113       membership:
114
115           auth required pam_succeed_if.so quiet user ingroup wheel:root
116
117
118       Given that the type matches, only loads the othermodule rule if the UID
119       is over 500. Adjust the number after default to skip several rules.
120
121           type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
122           type required othermodule.so arguments...
123
124

SEE ALSO

126       glob(7), pam(8)
127

AUTHOR

129       Nalin Dahyabhai <nalin@redhat.com>
130
131
132
133Linux-PAM                         11/25/2020                 PAM_SUCCEED_IF(8)
Impressum