pam_pwhistory.8 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. '\" t
  2. .\" Title: pam_pwhistory
  3. .\" Author: [see the "AUTHOR" section]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
  5. .\" Date: 09/03/2021
  6. .\" Manual: Linux-PAM Manual
  7. .\" Source: Linux-PAM Manual
  8. .\" Language: English
  9. .\"
  10. .TH "PAM_PWHISTORY" "8" "09/03/2021" "Linux-PAM Manual" "Linux\-PAM Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. pam_pwhistory \- PAM module to remember last passwords
  32. .SH "SYNOPSIS"
  33. .HP \w'\fBpam_pwhistory\&.so\fR\ 'u
  34. \fBpam_pwhistory\&.so\fR [debug] [use_authtok] [enforce_for_root] [remember=\fIN\fR] [retry=\fIN\fR] [authtok_type=\fISTRING\fR]
  35. .SH "DESCRIPTION"
  36. .PP
  37. This module saves the last passwords for each user in order to force password change history and keep the user from alternating between the same password too frequently\&.
  38. .PP
  39. This module does not work together with kerberos\&. In general, it does not make much sense to use this module in conjunction with NIS or LDAP, since the old passwords are stored on the local machine and are not available on another machine for password history checking\&.
  40. .SH "OPTIONS"
  41. .PP
  42. \fBdebug\fR
  43. .RS 4
  44. Turns on debugging via
  45. \fBsyslog\fR(3)\&.
  46. .RE
  47. .PP
  48. \fBuse_authtok\fR
  49. .RS 4
  50. When password changing enforce the module to use the new password provided by a previously stacked
  51. \fBpassword\fR
  52. module (this is used in the example of the stacking of the
  53. \fBpam_passwdqc\fR
  54. module documented below)\&.
  55. .RE
  56. .PP
  57. \fBenforce_for_root\fR
  58. .RS 4
  59. If this option is set, the check is enforced for root, too\&.
  60. .RE
  61. .PP
  62. \fBremember=\fR\fB\fIN\fR\fR
  63. .RS 4
  64. The last
  65. \fIN\fR
  66. passwords for each user are saved in
  67. /etc/security/opasswd\&. The default is
  68. \fI10\fR\&. Value of
  69. \fI0\fR
  70. makes the module to keep the existing contents of the
  71. opasswd
  72. file unchanged\&.
  73. .RE
  74. .PP
  75. \fBretry=\fR\fB\fIN\fR\fR
  76. .RS 4
  77. Prompt user at most
  78. \fIN\fR
  79. times before returning with error\&. The default is
  80. \fI1\fR\&.
  81. .RE
  82. .PP
  83. \fBauthtok_type=\fR\fB\fISTRING\fR\fR
  84. .RS 4
  85. See
  86. \fBpam_get_authtok\fR(3)
  87. for more details\&.
  88. .RE
  89. .SH "MODULE TYPES PROVIDED"
  90. .PP
  91. Only the
  92. \fBpassword\fR
  93. module type is provided\&.
  94. .SH "RETURN VALUES"
  95. .PP
  96. PAM_AUTHTOK_ERR
  97. .RS 4
  98. No new password was entered, the user aborted password change or new password couldn\*(Aqt be set\&.
  99. .RE
  100. .PP
  101. PAM_IGNORE
  102. .RS 4
  103. Password history was disabled\&.
  104. .RE
  105. .PP
  106. PAM_MAXTRIES
  107. .RS 4
  108. Password was rejected too often\&.
  109. .RE
  110. .PP
  111. PAM_USER_UNKNOWN
  112. .RS 4
  113. User is not known to system\&.
  114. .RE
  115. .SH "EXAMPLES"
  116. .PP
  117. An example password section would be:
  118. .sp
  119. .if n \{\
  120. .RS 4
  121. .\}
  122. .nf
  123. #%PAM\-1\&.0
  124. password required pam_pwhistory\&.so
  125. password required pam_unix\&.so use_authtok
  126. .fi
  127. .if n \{\
  128. .RE
  129. .\}
  130. .PP
  131. In combination with
  132. \fBpam_passwdqc\fR:
  133. .sp
  134. .if n \{\
  135. .RS 4
  136. .\}
  137. .nf
  138. #%PAM\-1\&.0
  139. password required pam_passwdqc\&.so config=/etc/passwdqc\&.conf
  140. password required pam_pwhistory\&.so use_authtok
  141. password required pam_unix\&.so use_authtok
  142. .fi
  143. .if n \{\
  144. .RE
  145. .\}
  146. .sp
  147. .SH "FILES"
  148. .PP
  149. /etc/security/opasswd
  150. .RS 4
  151. File with password history
  152. .RE
  153. .SH "SEE ALSO"
  154. .PP
  155. \fBpam.conf\fR(5),
  156. \fBpam.d\fR(5),
  157. \fBpam\fR(8)
  158. \fBpam_get_authtok\fR(3)
  159. .SH "AUTHOR"
  160. .PP
  161. pam_pwhistory was written by Thorsten Kukuk <kukuk@thkukuk\&.de>