summaryrefslogtreecommitdiff
path: root/modules/pam_succeed_if/README
blob: e2ef2edf1ce56ee4051d7a601d1bc810a685f915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
pam_succeed_if — test account characteristics

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

DESCRIPTION

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.

The module should be given one or more conditions as module arguments, and
authentication will succeed only if all of the conditions are met.

OPTIONS

The following flags are supported:

debug

    Turns on debugging messages sent to syslog.

use_uid

    Evaluate conditions using the account of the user whose UID the application
    is running under instead of the user being authenticated.

quiet

    Don't log failure or success to the system log.

quiet_fail

    Don't log failure to the system log.

quiet_success

    Don't log success to the system log.

Conditions are three words: a field, a test, and a value to test for.

Available fields are user, uid, gid, shell and home:

field < number

    Field has a value numerically less than number.

field <= number

    Field has a value numerically less than or equal to number.

field eq number

    Field has a value numerically less equal to number.

field >= number

    Field has a value numerically greater than or equal to number.

field > number

    Field has a value numerically greater than number.

field ne number

    Field has a value numerically different from number.

field = string

    Field exactly matches the given string.

field != string

    Field does not match the given string.

field =~ glob

    Field matches the given glob.

field !~ glob

    Field does not match the given glob.

user ingroup group

    User is in given group.

user notingroup group

    User is not in given group.

EXAMPLES

To emulate the behaviour of pam_wheel, except there is no fallback to group 0:

    auth required pam_succeed_if.so quiet user ingroup wheel


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.

    type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
    type required othermodule.so arguments...


AUTHOR

Nalin Dahyabhai <nalin@redhat.com>