aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_canonicalize_user/pam_canonicalize_user.8.xml
blob: 832f7ece2ef7599347d69be120e0762aae859cd1 (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
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="pam_canonicalize_user">

  <refmeta>
    <refentrytitle>pam_canonicalize_user</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="source">Linux-PAM</refmiscinfo>
    <refmiscinfo class="manual">Linux-PAM Manual</refmiscinfo>
  </refmeta>

  <refnamediv xml:id="pam_canonicalize_user-name">
    <refname>pam_canonicalize_user</refname>
    <refpurpose>Get user name and canonicalize it</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis xml:id="pam_canonicalize_user-cmdsynopsis" sepchar=" ">
      <command>pam_canonicalize_user.so</command>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 xml:id="pam_canonicalize_user-description">
  <title>DESCRIPTION</title>
  <para>
    This PAM module uses the name of the user obtained via
    <citerefentry>
      <refentrytitle>pam_get_user</refentrytitle><manvolnum>3</manvolnum>
    </citerefentry>
    as a key to query the password database, and replaces
    <emphasis>PAM_USER</emphasis> with the <emphasis>pw_name</emphasis> value
    that has been returned.
  </para>
  </refsect1>

  <refsect1 xml:id="pam_canonicalize_user-options">
    <title>OPTIONS</title>
    <para>This module does not recognise any options.</para>
  </refsect1>

  <refsect1 xml:id="pam_canonicalize_user-types">
    <title>MODULE TYPES PROVIDED</title>
    <para>Only the <option>auth</option> module type is provided.</para>
  </refsect1>

  <refsect1 xml:id="pam_canonicalize_user-return_values">
    <title>RETURN VALUES</title>
    <variablelist>
      <varlistentry>
        <term>PAM_IGNORE</term>
        <listitem>
          <para>The user name was set successfully.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_USER_UNKNOWN</term>
        <listitem>
          <para>The user was not found.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SYSTEM_ERR</term>
        <listitem>
          <para>The application did not supply neither a user name nor a conversation method.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_INCOMPLETE</term>
        <listitem>
          <para>The conversation method supplied by the application is waiting for an event.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_CONV_ERR</term>
        <listitem>
          <para>The conversation method supplied by the application failed to obtain the user name.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_ABORT</term>
        <listitem>
          <para>Error resuming an old conversation.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_BUF_ERR</term>
        <listitem>
          <para>Memory buffer error.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 xml:id="pam_canonicalize_user-examples">
    <title>EXAMPLES</title>
    <para>
      Prepend the PAM auth stack with the following line to canonicalize
      the user name before the authentication:
      <programlisting>
        auth required pam_canonicalize_user.so
      </programlisting>
    </para>
  </refsect1>

  <refsect1 xml:id="pam_get_user-see_also">
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>pam_get_user</refentrytitle><manvolnum>3</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>pam_set_item</refentrytitle><manvolnum>3</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>getpwnam</refentrytitle><manvolnum>3</manvolnum>
      </citerefentry>,
      <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 xml:id="pam_canonicalize_user-author">
    <title>AUTHOR</title>
    <para>
      pam_canonicalize_user was written by Dmitry V. Levin &lt;ldv@strace.io&gt;.
    </para>
  </refsect1>

</refentry>