pam.8.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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='pam8'>
  5. <refmeta>
  6. <refentrytitle>pam</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class='setdesc'>Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id='pam8-name'>
  11. <refname>PAM</refname>
  12. <refname>pam</refname>
  13. <refpurpose>Pluggable Authentication Modules for Linux</refpurpose>
  14. </refnamediv>
  15. <refsect1 id='pam8-description'>
  16. <title>DESCRIPTION</title>
  17. <para>
  18. This manual is intended to offer a quick introduction to
  19. <emphasis remap='B'>Linux-PAM</emphasis>. For more information
  20. the reader is directed to the
  21. <emphasis remap='B'>Linux-PAM system administrators' guide</emphasis>.
  22. </para>
  23. <para>
  24. <emphasis remap='B'>Linux-PAM</emphasis> is a system of libraries
  25. that handle the authentication tasks of applications (services) on
  26. the system. The library provides a stable general interface
  27. (Application Programming Interface - API) that privilege granting
  28. programs (such as <citerefentry>
  29. <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
  30. </citerefentry> and <citerefentry>
  31. <refentrytitle>su</refentrytitle><manvolnum>1</manvolnum>
  32. </citerefentry>) defer to to perform standard authentication tasks.
  33. </para>
  34. <para>
  35. The principal feature of the PAM approach is that the nature of the
  36. authentication is dynamically configurable. In other words, the
  37. system administrator is free to choose how individual
  38. service-providing applications will authenticate users. This dynamic
  39. configuration is set by the contents of the single
  40. <emphasis remap='B'>Linux-PAM</emphasis> configuration file
  41. <filename>/etc/pam.conf</filename>. Alternatively, the configuration
  42. can be set by individual configuration files located in the
  43. <filename>/etc/pam.d/</filename> directory. The presence of this
  44. directory will cause <emphasis remap='B'>Linux-PAM</emphasis> to
  45. <emphasis remap='I'>ignore</emphasis> <filename>/etc/pam.conf</filename>.
  46. </para>
  47. <para>
  48. Vendor-supplied PAM configuration files might be installed in
  49. the system directory <filename>/usr/lib/pam.d/</filename> or
  50. a configurable vendor specific directory instead
  51. of the machine configuration directory <filename>/etc/pam.d/</filename>.
  52. If no machine configuration file is found, the vendor-supplied file
  53. is used. All files in <filename>/etc/pam.d/</filename> override
  54. files with the same name in other directories.
  55. </para>
  56. <para>From the point of view of the system administrator, for whom this
  57. manual is provided, it is not of primary importance to understand the
  58. internal behavior of the
  59. <emphasis remap='B'>Linux-PAM</emphasis>
  60. library. The important point to recognize is that the configuration
  61. file(s)
  62. <emphasis remap='I'>define</emphasis>
  63. the connection between applications
  64. <emphasis remap='B'></emphasis>(<emphasis remap='B'>services</emphasis>)
  65. and the pluggable authentication modules
  66. <emphasis remap='B'></emphasis>(<emphasis remap='B'>PAM</emphasis>s)
  67. that perform the actual authentication tasks.</para>
  68. <para><emphasis remap='B'>Linux-PAM</emphasis>
  69. separates the tasks of
  70. <emphasis remap='I'>authentication</emphasis>
  71. into four independent management groups:
  72. <emphasis remap='B'>account</emphasis> management;
  73. <emphasis remap='B'>auth</emphasis>entication management;
  74. <emphasis remap='B'>password</emphasis> management;
  75. and
  76. <emphasis remap='B'>session</emphasis> management.
  77. (We highlight the abbreviations used for these groups in the
  78. configuration file.)</para>
  79. <para>Simply put, these groups take care of different aspects of a typical
  80. user's request for a restricted service:</para>
  81. <para><emphasis remap='B'>account</emphasis> -
  82. provide account verification types of service: has the user's password
  83. expired?; is this user permitted access to the requested service?</para>
  84. <!-- .br -->
  85. <para><emphasis remap='B'>auth</emphasis>entication -
  86. authenticate a user and set up user credentials. Typically this is via
  87. some challenge-response request that the user must satisfy: if you are
  88. who you claim to be please enter your password. Not all authentications
  89. are of this type, there exist hardware based authentication schemes
  90. (such as the use of smart-cards and biometric devices), with suitable
  91. modules, these may be substituted seamlessly for more standard
  92. approaches to authentication - such is the flexibility of
  93. <emphasis remap='B'>Linux-PAM</emphasis>.</para>
  94. <!-- .br -->
  95. <para><emphasis remap='B'>password</emphasis> -
  96. this group's responsibility is the task of updating authentication
  97. mechanisms. Typically, such services are strongly coupled to those of
  98. the
  99. <emphasis remap='B'>auth</emphasis>
  100. group. Some authentication mechanisms lend themselves well to being
  101. updated with such a function. Standard UN*X password-based access is
  102. the obvious example: please enter a replacement password.</para>
  103. <!-- .br -->
  104. <para><emphasis remap='B'>session</emphasis> -
  105. this group of tasks cover things that should be done prior to a
  106. service being given and after it is withdrawn. Such tasks include the
  107. maintenance of audit trails and the mounting of the user's home
  108. directory. The
  109. <emphasis remap='B'>session</emphasis>
  110. management group is important as it provides both an opening and
  111. closing hook for modules to affect the services available to a user.</para>
  112. </refsect1>
  113. <refsect1 id='pam8-files'>
  114. <title>FILES</title>
  115. <variablelist>
  116. <varlistentry>
  117. <term><filename>/etc/pam.conf</filename></term>
  118. <listitem>
  119. <para>the configuration file</para>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry>
  123. <term><filename>/etc/pam.d</filename></term>
  124. <listitem>
  125. <para>
  126. the <emphasis remap='B'>Linux-PAM</emphasis> configuration
  127. directory. Generally, if this directory is present, the
  128. <filename>/etc/pam.conf</filename> file is ignored.
  129. </para>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry>
  133. <term><filename>/usr/lib/pam.d</filename></term>
  134. <listitem>
  135. <para>
  136. the <emphasis remap='B'>Linux-PAM</emphasis> vendor configuration
  137. directory. Files in <filename>/etc/pam.d</filename> override
  138. files with the same name in this directory.
  139. </para>
  140. </listitem>
  141. </varlistentry>
  142. <varlistentry>
  143. <term><filename>%vendordir%/pam.d</filename></term>
  144. <listitem>
  145. <para>
  146. the <emphasis remap='B'>Linux-PAM</emphasis> vendor configuration
  147. directory. Files in <filename>/etc/pam.d</filename> and
  148. <filename>/usr/lib/pam.d</filename> override files with the same
  149. name in this directory. Only available if Linux-PAM was compiled
  150. with vendordir enabled.
  151. </para>
  152. </listitem>
  153. </varlistentry>
  154. </variablelist>
  155. </refsect1>
  156. <refsect1 id='pam8-errors'>
  157. <title>ERRORS</title>
  158. <para>
  159. Typically errors generated by the
  160. <emphasis remap='B'>Linux-PAM</emphasis> system of libraries, will
  161. be written to <citerefentry>
  162. <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
  163. </citerefentry>.
  164. </para>
  165. </refsect1>
  166. <refsect1 id='pam8-conforming_to'>
  167. <title>CONFORMING TO</title>
  168. <para>
  169. DCE-RFC 86.0, October 1995.
  170. Contains additional features, but remains backwardly compatible
  171. with this RFC.
  172. </para>
  173. </refsect1>
  174. <refsect1 id='pam8-see_also'>
  175. <title>SEE ALSO</title>
  176. <para>
  177. <citerefentry>
  178. <refentrytitle>pam</refentrytitle><manvolnum>3</manvolnum>
  179. </citerefentry>,
  180. <citerefentry>
  181. <refentrytitle>pam_authenticate</refentrytitle><manvolnum>3</manvolnum>
  182. </citerefentry>,
  183. <citerefentry>
  184. <refentrytitle>pam_sm_setcred</refentrytitle><manvolnum>3</manvolnum>
  185. </citerefentry>,
  186. <citerefentry>
  187. <refentrytitle>pam_strerror</refentrytitle><manvolnum>3</manvolnum>
  188. </citerefentry>,
  189. <citerefentry>
  190. <refentrytitle>PAM</refentrytitle><manvolnum>8</manvolnum>
  191. </citerefentry>
  192. </para>
  193. </refsect1>
  194. </refentry>