summaryrefslogtreecommitdiffstats
path: root/modules/pam_stress/pam_stress.8.xml
blob: 98888b1ce60b0fa87b241e4031337117d10d7ea4 (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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id='pam_stress'>

  <refmeta>
    <refentrytitle>pam_stress</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
  </refmeta>

  <refnamediv id='pam_stress-name'>
    <refname>pam_stress</refname>
    <refpurpose>The stress-testing PAM module</refpurpose>
  </refnamediv>

<!-- body begins here -->

  <refsynopsisdiv>
    <cmdsynopsis id="pam_stress-cmdsynopsis">
      <command>pam_stress.so</command>
      <arg choice="opt">
        debug
      </arg>
      <arg choice="opt">
        no_warn
      </arg>
      <arg choice="opt">
        use_first_pass
      </arg>
      <arg choice="opt">
        try_first_pass
      </arg>
      <arg choice="opt">
        rootok
      </arg>
      <arg choice="opt">
        expired
      </arg>
      <arg choice="opt">
        fail_1
      </arg>
      <arg choice="opt">
        fail_2
      </arg>
      <arg choice="opt">
        prelim
      </arg>
      <arg choice="opt">
        required
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="pam_stress-description">
    <title>DESCRIPTION</title>
    <para>
      The pam_stress PAM module is mainly intended to give the impression of failing as a fully
functioning module might.
    </para>
  </refsect1>

  <refsect1 id="pam_stress-options">
    <title>OPTIONS</title>
    <variablelist>

      <varlistentry>
        <term>
          <option>debug</option>
        </term>
        <listitem>
          <para>
            Put lots of information in syslog.
            *NOTE* this option writes passwords to syslog, so don't use anything sensitive when testing.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>no_warn</option>
        </term>
        <listitem>
          <para>
            Do not give warnings about things (otherwise warnings are issued
            via the conversation function)
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>use_first_pass</option>
        </term>
        <listitem>
          <para>
            Do not prompt for a password, for pam_sm_authentication
            function just use item PAM_AUTHTOK.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>try_first_pass</option>
        </term>
        <listitem>
          <para>
            Do not prompt for a password unless there has been no
            previous authentication token (item PAM_AUTHTOK is NULL)
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>rootok</option>
        </term>
        <listitem>
          <para>
            This is intended for the pam_sm_chauthtok function and
            it instructs this function to permit root to change
            the user's password without entering the old password.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>expired</option>
        </term>
        <listitem>
          <para>
            An argument intended for the account and chauthtok module
            parts. It instructs the module to act as if the user's
            password has expired
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>fail_1</option>
        </term>
        <listitem>
          <para>
            This instructs the module to make its first function fail.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>fail_2</option>
        </term>
        <listitem>
          <para>
            This instructs the module to make its second function (if there
            is one) fail.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>prelim</option>
        </term>
        <listitem>
          <para>
            For pam_sm_chauthtok, means fail on PAM_PRELIM_CHECK.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>required</option>
        </term>
        <listitem>
          <para>
            For pam_sm_chauthtok, means fail if the user hasn't already
            been authenticated by this module. (See stress_new_pwd data
            string in the NOTES.)
          </para>
        </listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1 id="pam_stress-types">
    <title>MODULE TYPES PROVIDED</title>
    <para>
      All module types (<option>auth</option>, <option>account</option>,
      <option>password</option> and <option>session</option>) are provided.
    </para>
  </refsect1>

  <refsect1 id="pam_stress-return_values">
    <title>RETURN VALUES</title>
    <variablelist>
      <varlistentry>
        <term>PAM_BUF_ERR</term>
        <listitem>
           <para>
             Memory buffer error.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_PERM_DENIED</term>
        <listitem>
           <para>
             Permission denied.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_AUTH_ERR</term>
        <listitem>
           <para>
             Access to the system was denied.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_CONV_ERR</term>
        <listitem>
           <para>
             Conversation failure.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SUCCESS</term>
        <listitem>
           <para>
             The function passes all checks.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_USER_UNKNOWN</term>
        <listitem>
           <para>
             The user is not known to the system.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_CRED_ERR</term>
        <listitem>
           <para>
             Failure involving user credentials.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_NEW_AUTHTOK_REQD</term>
        <listitem>
           <para>
             Authentication token is no longer valid; new one required.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SESSION_ERR</term>
        <listitem>
           <para>
             Session failure.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_TRY_AGAIN</term>
        <listitem>
           <para>
             Failed preliminary check by service.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_AUTHTOK_LOCK_BUSY</term>
        <listitem>
           <para>
             Authentication token lock busy.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_AUTHTOK_ERR</term>
        <listitem>
           <para>
             Authentication token manipulation error.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SYSTEM_ERR</term>
        <listitem>
           <para>
             System error.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id='pam_stress-notes'>
    <title>NOTES</title>
    <para>
      This module uses the stress_new_pwd data string which tells
      pam_sm_chauthtok that pam_sm_acct_mgmt says we need a new password.
      The only possible value for this data string is 'yes'.
    </para>
  </refsect1>

  <refsect1 id='pam_stress-examples'>
    <title>EXAMPLES</title>
    <programlisting>
#%PAM-1.0
#
# Any of the following will suffice
account  required pam_stress.so
auth     required pam_stress.so
password required pam_stress.so
session  required pam_stress.so
    </programlisting>
  </refsect1>

  <refsect1 id="pam_stress-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_stress-authors">
    <title>AUTHORS</title>
    <para>
      The pam_stress PAM module was developed by
      Andrew Morgan &lt;morgan@linux.kernel.org&gt;.
      The man page for pam_stress was written by
      Lucas Ramage &lt;ramage.lucas@protonmail.com&gt;.
    </para>
  </refsect1>
</refentry>