pam_authenticate.3.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
  4. <refentry id='pam_authenticate'>
  5. <refmeta>
  6. <refentrytitle>pam_authenticate</refentrytitle>
  7. <manvolnum>3</manvolnum>
  8. <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_authenticate-name">
  11. <refname>pam_authenticate</refname>
  12. <refpurpose>account authentication</refpurpose>
  13. </refnamediv>
  14. <!-- body begins here -->
  15. <refsynopsisdiv>
  16. <funcsynopsis id='pam_authenticate-synopsis'>
  17. <funcsynopsisinfo>#include &lt;security/pam_appl.h&gt;</funcsynopsisinfo>
  18. <funcprototype>
  19. <funcdef>int <function>pam_authenticate</function></funcdef>
  20. <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
  21. <paramdef>int <parameter>flags</parameter></paramdef>
  22. </funcprototype>
  23. </funcsynopsis>
  24. </refsynopsisdiv>
  25. <refsect1 id='pam_authenticate-description'>
  26. <title>DESCRIPTION</title>
  27. <para>
  28. The <function>pam_authenticate</function> function is used to
  29. authenticate the user. The user is required to provide an
  30. authentication token depending upon the authentication service,
  31. usually this is a password, but could also be a finger print.
  32. </para>
  33. <para>
  34. The PAM service module may request that the user enter their
  35. username via the conversation mechanism (see
  36. <citerefentry>
  37. <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
  38. </citerefentry> and
  39. <citerefentry>
  40. <refentrytitle>pam_conv</refentrytitle><manvolnum>3</manvolnum>
  41. </citerefentry>). The name of the authenticated user
  42. will be present in the PAM item PAM_USER. This item may be
  43. recovered with a call to
  44. <citerefentry>
  45. <refentrytitle>pam_get_item</refentrytitle><manvolnum>3</manvolnum>
  46. </citerefentry>.
  47. </para>
  48. <para>
  49. The <emphasis>pamh</emphasis> argument is an authentication
  50. handle obtained by a prior call to pam_start().
  51. The flags argument is the binary or of zero or more of the
  52. following values:
  53. </para>
  54. <variablelist>
  55. <varlistentry>
  56. <term>PAM_SILENT</term>
  57. <listitem>
  58. <para>
  59. Do not emit any messages.
  60. </para>
  61. </listitem>
  62. </varlistentry>
  63. <varlistentry>
  64. <term>PAM_DISALLOW_NULL_AUTHTOK</term>
  65. <listitem>
  66. <para>
  67. The PAM module service should return PAM_AUTH_ERR
  68. if the user does not have a registered authentication token.
  69. </para>
  70. </listitem>
  71. </varlistentry>
  72. </variablelist>
  73. </refsect1>
  74. <refsect1 id="pam_authenticate-return_values">
  75. <title>RETURN VALUES</title>
  76. <variablelist>
  77. <varlistentry>
  78. <term>PAM_ABORT</term>
  79. <listitem>
  80. <para>
  81. The application should exit immediately after calling
  82. <citerefentry>
  83. <refentrytitle>pam_end</refentrytitle><manvolnum>3</manvolnum>
  84. </citerefentry> first.
  85. </para>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry>
  89. <term>PAM_AUTH_ERR</term>
  90. <listitem>
  91. <para>
  92. The user was not authenticated.
  93. </para>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry>
  97. <term>PAM_CRED_INSUFFICIENT</term>
  98. <listitem>
  99. <para>
  100. For some reason the application does not have sufficient
  101. credentials to authenticate the user.
  102. </para>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry>
  106. <term>PAM_AUTHINFO_UNAVAIL</term>
  107. <listitem>
  108. <para>
  109. The modules were not able to access the authentication
  110. information. This might be due to a network or hardware
  111. failure etc.
  112. </para>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry>
  116. <term>PAM_MAXTRIES</term>
  117. <listitem>
  118. <para>
  119. One or more of the authentication modules has reached its
  120. limit of tries authenticating the user. Do not try again.
  121. </para>
  122. </listitem>
  123. </varlistentry>
  124. <varlistentry>
  125. <term>PAM_SUCCESS</term>
  126. <listitem>
  127. <para>
  128. The user was successfully authenticated.
  129. </para>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry>
  133. <term>PAM_USER_UNKNOWN</term>
  134. <listitem>
  135. <para>
  136. User unknown to authentication service.
  137. </para>
  138. </listitem>
  139. </varlistentry>
  140. </variablelist>
  141. </refsect1>
  142. <refsect1 id='pam_authenticate-see_also'>
  143. <title>SEE ALSO</title>
  144. <para>
  145. <citerefentry>
  146. <refentrytitle>pam_start</refentrytitle><manvolnum>3</manvolnum>
  147. </citerefentry>,
  148. <citerefentry>
  149. <refentrytitle>pam_setcred</refentrytitle><manvolnum>3</manvolnum>
  150. </citerefentry>,
  151. <citerefentry>
  152. <refentrytitle>pam_chauthtok</refentrytitle><manvolnum>3</manvolnum>
  153. </citerefentry>,
  154. <citerefentry>
  155. <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
  156. </citerefentry>,
  157. <citerefentry>
  158. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  159. </citerefentry>
  160. </para>
  161. </refsect1>
  162. </refentry>