PAM_CANONICALIZE_USE(8)

  .SH "NAME" pam_canonicalize_user - Get user name and canonicalize it
  .SH "SYNOPSIS"
    .HP u
      pam_canonicalize_user.so

  .SH "DESCRIPTION"

  .PP This PAM 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.

  .SH "OPTIONS"

    .PP This module does not recognise any options.

  .SH "MODULE TYPES PROVIDED"

    .PP Only the auth module type is provided.

  .SH "RETURN VALUES"

      .PP PAM_IGNORE

              The user name was set successfully.

          .RE
          .PP PAM_USER_UNKNOWN

                  The user was not found.

              .RE
              .PP PAM_SYSTEM_ERR

                      The application did not supply neither a user name nor a conversation method.

                  .RE
                  .PP PAM_INCOMPLETE

                          The conversation method supplied by the application is waiting for an event.

                      .RE
                      .PP PAM_CONV_ERR

                              The conversation method supplied by the application failed to obtain the user name.

                          .RE
                          .PP PAM_ABORT

                                  Error resuming an old conversation.

                              .RE
                              .PP PAM_BUF_ERR

                                      Memory buffer error.

                                  .RE

                              .SH "EXAMPLES"

                                .PP Prepend the PAM auth stack with the following line to canonicalize the user name before the authentication:

                                        auth required pam_canonicalize_user.so

                              .SH "SEE ALSO"

                                .PP pam_get_user(3), pam_get_item(3), pam_set_item(3), getpwnam(3), pam.conf(5), pam.d(5), pam(8)

                              .SH "AUTHOR"

                                .PP pam_canonicalize_user was written by Dmitry V. Levin <ldv@strace.io>.