Debian Codegraph @

upstream/debian-unstable/man8/pam_pwhistory.8

raw
1 '\" t
2 .\" Title: pam_pwhistory
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
5 .\" Date: 06/29/2025
6 .\" Manual: Linux-PAM Manual
7 .\" Source: Linux-PAM
8 .\" Language: English
9 .\"
10 .TH "PAM_PWHISTORY" "8" "06/29/2025" "Linux\-PAM" "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] [file=\fI/path/filename\fR] [conf=\fI/path/to/config\-file\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 debug
43 .RS 4
44 Turns on debugging via
45 \fBsyslog\fR(3)\&.
46 .RE
47 .PP
48 use_authtok
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 enforce_for_root
58 .RS 4
59 If this option is set, the check is enforced for root, too\&.
60 .RE
61 .PP
62 remember=N
63 .RS 4
64 The last
65 \fIN\fR
66 passwords for each user are saved\&. The default is
67 \fI10\fR\&. Value of
68 \fI0\fR
69 makes the module to keep the existing contents of the
70 opasswd
71 file unchanged\&.
72 .RE
73 .PP
74 retry=N
75 .RS 4
76 Prompt user at most
77 \fIN\fR
78 times before returning with error\&. The default is
79 \fI1\fR\&.
80 .RE
81 .PP
82 authtok_type=STRING
83 .RS 4
84 See
85 \fBpam_get_authtok\fR(3)
86 for more details\&.
87 .RE
88 .PP
89 file=/path/filename
90 .RS 4
91 Store password history in file
92 /path/filename
93 rather than the default location\&. The default location is
94 /etc/security/opasswd\&.
95 .RE
96 .PP
97 conf=/path/to/config\-file
98 .RS 4
99 Use another configuration file instead of the default
100 /etc/security/pwhistory\&.conf\&.
101 .RE
102 .PP
103 The options for configuring the module behavior are described in the
104 \fBpwhistory.conf\fR(5)
105 manual page\&. The options specified on the module command line override the values from the configuration file\&.
106 .SH "MODULE TYPES PROVIDED"
107 .PP
108 Only the
109 \fBpassword\fR
110 module type is provided\&.
111 .SH "RETURN VALUES"
112 .PP
113 PAM_AUTHTOK_ERR
114 .RS 4
115 No new password was entered, the user aborted password change or new password couldn\*(Aqt be set\&.
116 .RE
117 .PP
118 PAM_IGNORE
119 .RS 4
120 Password history was disabled\&.
121 .RE
122 .PP
123 PAM_MAXTRIES
124 .RS 4
125 Password was rejected too often\&.
126 .RE
127 .PP
128 PAM_USER_UNKNOWN
129 .RS 4
130 User is not known to system\&.
131 .RE
132 .SH "EXAMPLES"
133 .PP
134 An example password section would be:
135 .sp
136 .if n \{\
137 .RS 4
138 .\}
139 .nf
140 #%PAM\-1\&.0
141 password required pam_pwhistory\&.so
142 password required pam_unix\&.so use_authtok
143
144 .fi
145 .if n \{\
146 .RE
147 .\}
148 .PP
149 In combination with
150 \fBpam_passwdqc\fR:
151 .sp
152 .if n \{\
153 .RS 4
154 .\}
155 .nf
156 #%PAM\-1\&.0
157 password required pam_passwdqc\&.so config=/etc/passwdqc\&.conf
158 password required pam_pwhistory\&.so use_authtok
159 password required pam_unix\&.so use_authtok
160
161 .fi
162 .if n \{\
163 .RE
164 .\}
165 .sp
166 .SH "FILES"
167 .PP
168 /etc/security/opasswd
169 .RS 4
170 Default file with password history
171 .RE
172 .PP
173 /etc/security/pwhistory\&.conf
174 .RS 4
175 Config file for pam_pwhistory options
176 .RE
177 .SH "SEE ALSO"
178 .PP
179 \fBpwhistory.conf\fR(5),
180 \fBpam.conf\fR(5),
181 \fBpam.d\fR(5),
182 \fBpam\fR(7)
183 \fBpam_get_authtok\fR(3)
184 .SH "AUTHOR"
185 .PP
186 pam_pwhistory was written by Thorsten Kukuk <kukuk@thkukuk\&.de>