linux-pam/modules/pam_canonicalize_user/pam_canonicalize_user.8.xml
Dmitry V. Levin 2cae0f5c67 pam_canonicalize_user: new module to canonicalize user name
This module uses the name of the user obtained via pam_get_user(3)
as a key to query the password database, and replaces PAM_USER
with the pw_name value that has been returned.

The main usage scenario is systems where a user name is used in several
distinct authentication systems, some of them being case sensitive while
others are not.

* configure.ac (AC_CONFIG_FILES): Add
modules/pam_canonicalize_user/Makefile.
* doc/sag/pam_canonicalize_user.xml: New file.
* doc/sag/Linux-PAM_SAG.xml: Add a reference to
pam_canonicalize_user.xml.
* modules/Makefile.am (SUBDIRS): Add pam_canonicalize_user.
* modules/pam_canonicalize_user/Makefile.am: New file.
* modules/pam_canonicalize_user/README.xml: New file.
* modules/pam_canonicalize_user/pam_canonicalize_user.8.xml: New file.
* modules/pam_canonicalize_user/pam_canonicalize_user.c: New file.
* modules/pam_canonicalize_user/tst-pam_canonicalize_user: New file.
2023-11-14 23:25:00 +00:00

138 lines
4.3 KiB
XML

<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>