pam_pwhistory.8.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  4. <refentry id="pam_pwhistory">
  5. <refmeta>
  6. <refentrytitle>pam_pwhistory</refentrytitle>
  7. <manvolnum>8</manvolnum>
  8. <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  9. </refmeta>
  10. <refnamediv id="pam_pwhistory-name">
  11. <refname>pam_pwhistory</refname>
  12. <refpurpose>PAM module to remember last passwords</refpurpose>
  13. </refnamediv>
  14. <refsynopsisdiv>
  15. <cmdsynopsis id="pam_pwhistory-cmdsynopsis">
  16. <command>pam_pwhistory.so</command>
  17. <arg choice="opt">
  18. debug
  19. </arg>
  20. <arg choice="opt">
  21. use_authtok
  22. </arg>
  23. <arg choice="opt">
  24. enforce_for_root
  25. </arg>
  26. <arg choice="opt">
  27. remember=<replaceable>N</replaceable>
  28. </arg>
  29. <arg choice="opt">
  30. retry=<replaceable>N</replaceable>
  31. </arg>
  32. <arg choice="opt">
  33. authtok_type=<replaceable>STRING</replaceable>
  34. </arg>
  35. </cmdsynopsis>
  36. </refsynopsisdiv>
  37. <refsect1 id="pam_pwhistory-description">
  38. <title>DESCRIPTION</title>
  39. <para>
  40. This module saves the last passwords for each user in order
  41. to force password change history and keep the user from
  42. alternating between the same password too frequently.
  43. </para>
  44. <para>
  45. This module does not work together with kerberos. In general,
  46. it does not make much sense to use this module in conjunction
  47. with NIS or LDAP, since the old passwords are stored on the
  48. local machine and are not available on another machine for
  49. password history checking.
  50. </para>
  51. </refsect1>
  52. <refsect1 id="pam_pwhistory-options">
  53. <title>OPTIONS</title>
  54. <variablelist>
  55. <varlistentry>
  56. <term>
  57. <option>debug</option>
  58. </term>
  59. <listitem>
  60. <para>
  61. Turns on debugging via
  62. <citerefentry>
  63. <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
  64. </citerefentry>.
  65. </para>
  66. </listitem>
  67. </varlistentry>
  68. <varlistentry>
  69. <term>
  70. <option>use_authtok</option>
  71. </term>
  72. <listitem>
  73. <para>
  74. When password changing enforce the module to use the new password
  75. provided by a previously stacked <option>password</option>
  76. module (this is used in the example of the stacking of the
  77. <command>pam_passwdqc</command> module documented below).
  78. </para>
  79. </listitem>
  80. </varlistentry>
  81. <varlistentry>
  82. <term>
  83. <option>enforce_for_root</option>
  84. </term>
  85. <listitem>
  86. <para>
  87. If this option is set, the check is enforced for root, too.
  88. </para>
  89. </listitem>
  90. </varlistentry>
  91. <varlistentry>
  92. <term>
  93. <option>remember=<replaceable>N</replaceable></option>
  94. </term>
  95. <listitem>
  96. <para>
  97. The last <replaceable>N</replaceable> passwords for each
  98. user are saved in <filename>/etc/security/opasswd</filename>.
  99. The default is <emphasis>10</emphasis>. Value of
  100. <emphasis>0</emphasis> makes the module to keep the existing
  101. contents of the <filename>opasswd</filename> file unchanged.
  102. </para>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry>
  106. <term>
  107. <option>retry=<replaceable>N</replaceable></option>
  108. </term>
  109. <listitem>
  110. <para>
  111. Prompt user at most <replaceable>N</replaceable> times
  112. before returning with error. The default is
  113. <emphasis>1</emphasis>.
  114. </para>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry>
  118. <term>
  119. <option>authtok_type=<replaceable>STRING</replaceable></option>
  120. </term>
  121. <listitem>
  122. <para>
  123. See <citerefentry>
  124. <refentrytitle>pam_get_authtok</refentrytitle><manvolnum>3</manvolnum>
  125. </citerefentry> for more details.
  126. </para>
  127. </listitem>
  128. </varlistentry>
  129. </variablelist>
  130. </refsect1>
  131. <refsect1 id="pam_pwhistory-types">
  132. <title>MODULE TYPES PROVIDED</title>
  133. <para>
  134. Only the <option>password</option> module type is provided.
  135. </para>
  136. </refsect1>
  137. <refsect1 id='pam_pwhistory-return_values'>
  138. <title>RETURN VALUES</title>
  139. <variablelist>
  140. <varlistentry>
  141. <term>PAM_AUTHTOK_ERR</term>
  142. <listitem>
  143. <para>
  144. No new password was entered, the user aborted password
  145. change or new password couldn't be set.
  146. </para>
  147. </listitem>
  148. </varlistentry>
  149. <varlistentry>
  150. <term>PAM_IGNORE</term>
  151. <listitem>
  152. <para>
  153. Password history was disabled.
  154. </para>
  155. </listitem>
  156. </varlistentry>
  157. <varlistentry>
  158. <term>PAM_MAXTRIES</term>
  159. <listitem>
  160. <para>
  161. Password was rejected too often.
  162. </para>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry>
  166. <term>PAM_USER_UNKNOWN</term>
  167. <listitem>
  168. <para>
  169. User is not known to system.
  170. </para>
  171. </listitem>
  172. </varlistentry>
  173. </variablelist>
  174. </refsect1>
  175. <refsect1 id='pam_pwhistory-examples'>
  176. <title>EXAMPLES</title>
  177. <para>
  178. An example password section would be:
  179. <programlisting>
  180. #%PAM-1.0
  181. password required pam_pwhistory.so
  182. password required pam_unix.so use_authtok
  183. </programlisting>
  184. </para>
  185. <para>
  186. In combination with <command>pam_passwdqc</command>:
  187. <programlisting>
  188. #%PAM-1.0
  189. password required pam_passwdqc.so config=/etc/passwdqc.conf
  190. password required pam_pwhistory.so use_authtok
  191. password required pam_unix.so use_authtok
  192. </programlisting>
  193. </para>
  194. </refsect1>
  195. <refsect1 id="pam_pwhistory-files">
  196. <title>FILES</title>
  197. <variablelist>
  198. <varlistentry>
  199. <term><filename>/etc/security/opasswd</filename></term>
  200. <listitem>
  201. <para>File with password history</para>
  202. </listitem>
  203. </varlistentry>
  204. </variablelist>
  205. </refsect1>
  206. <refsect1 id='pam_pwhistory-see_also'>
  207. <title>SEE ALSO</title>
  208. <para>
  209. <citerefentry>
  210. <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
  211. </citerefentry>,
  212. <citerefentry>
  213. <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
  214. </citerefentry>,
  215. <citerefentry>
  216. <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
  217. </citerefentry>
  218. <citerefentry>
  219. <refentrytitle>pam_get_authtok</refentrytitle><manvolnum>3</manvolnum>
  220. </citerefentry>
  221. </para>
  222. </refsect1>
  223. <refsect1 id='pam_pwhistory-author'>
  224. <title>AUTHOR</title>
  225. <para>
  226. pam_pwhistory was written by Thorsten Kukuk &lt;kukuk@thkukuk.de&gt;
  227. </para>
  228. </refsect1>
  229. </refentry>