summaryrefslogtreecommitdiff
path: root/modules/pam_wheel/pam_wheel.8.xml
blob: c8d93773bace8ab3eb4b6256eae0c5eb4ac20713 (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?xml version="1.0" encoding='UTF-8'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">

<refentry id="pam_wheel">

  <refmeta>
    <refentrytitle>pam_wheel</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  </refmeta>

  <refnamediv id="pam_wheel-name">
    <refname>pam_wheel</refname>
    <refpurpose>Only permit root access to members of group wheel</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis id="pam_wheel-cmdsynopsis">
      <command>pam_wheel.so</command>
      <arg choice="opt">
	debug
      </arg>
      <arg choice="opt">
        deny
      </arg>
      <arg choice="opt">
	group=<replaceable>name</replaceable>
      </arg>
      <arg choice="opt">
	root_only
      </arg>
      <arg choice="opt">
	trust
      </arg>
      <arg choice="opt">
	use_uid
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="pam_wheel-description">
    <title>DESCRIPTION</title>
    <para>
      The pam_wheel PAM module is used to enforce the so-called
      <emphasis>wheel</emphasis> group. By default it permits root
      access to the system if the applicant user is a member of the
      <emphasis>wheel</emphasis> group. If no group with this name exist,
      the module is using the group with the group-ID
      <emphasis remap='B'>0</emphasis>.
    </para>
  </refsect1>

  <refsect1 id="pam_wheel-options">
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term>
          <option>debug</option>
        </term>
        <listitem>
          <para>
            Print debug information.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>deny</option>
        </term>
        <listitem>
          <para>
            Reverse the sense of the auth operation: if the user
            is trying to get UID 0 access and is a member of the
            wheel group (or the group of the <option>group</option> option),
            deny access. Conversely, if the user is not in the group, return
            PAM_IGNORE (unless <option>trust</option> was also specified,
            in which case we return PAM_SUCCESS).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>group=<replaceable>name</replaceable></option>
        </term>
        <listitem>
          <para>
            Instead of checking the wheel or GID 0 groups, use
            the <option><replaceable>name</replaceable></option> group
            to perform the authentication.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>root_only</option>
        </term>
        <listitem>
          <para>
            The check for wheel membership is done only when the target user
            UID is 0.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>trust</option>
        </term>
        <listitem>
          <para>
            The pam_wheel module will return PAM_SUCCESS instead
            of PAM_IGNORE if the user is a member of the wheel group
            (thus with a little play stacking the modules the wheel
            members may be able to su to root without being prompted
            for a passwd).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>use_uid</option>
        </term>
        <listitem>
          <para>
            The check for wheel membership will be done against
            the current uid instead of the original one (useful when
            jumping with su from one account to another for example).
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="pam_wheel-types">
    <title>MODULE TYPES PROVIDED</title>
    <para>
      The <emphasis remap='B'>auth</emphasis> and
      <emphasis remap='B'>account</emphasis> module types are provided.
    </para>
  </refsect1>

  <refsect1 id='pam_wheel-return_values'>
    <title>RETURN VALUES</title>
    <variablelist>
      <varlistentry>
        <term>PAM_AUTH_ERR</term>
        <listitem>
           <para>
             Authentication failure.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_BUF_ERR</term>
        <listitem>
           <para>
             Memory buffer error.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_IGNORE</term>
        <listitem>
          <para>
            The return value should be ignored by PAM dispatch.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_PERM_DENY</term>
        <listitem>
          <para>
            Permission denied.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SERVICE_ERR</term>
        <listitem>
          <para>
	    Cannot determine the user name.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>PAM_SUCCESS</term>
        <listitem>
          <para>
            Success.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>PAM_USER_UNKNOWN</term>
        <listitem>
          <para>
            User not known.
          </para>
        </listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1 id='pam_wheel-examples'>
    <title>EXAMPLES</title>
    <para>
      The root account gains access by default (rootok), only wheel
      members can become root (wheel) but Unix authenticate non-root
      applicants.
      <programlisting>
su      auth     sufficient     pam_rootok.so
su      auth     required       pam_wheel.so
su      auth     required       pam_unix.so
      </programlisting>
    </para>
  </refsect1>

  <refsect1 id='pam_wheel-see_also'>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
	<refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>

  <refsect1 id='pam_wheel-author'>
    <title>AUTHOR</title>
      <para>
        pam_wheel was written by Cristian Gafton &lt;gafton@redhat.com&gt;.
      </para>
  </refsect1>

</refentry>