1PAM_PWHISTORY(8)               Linux-PAM Manual               PAM_PWHISTORY(8)
2
3
4

NAME

6       pam_pwhistory - PAM module to remember last passwords
7

SYNOPSIS

9       pam_pwhistory.so [debug] [use_authtok] [enforce_for_root] [remember=N]
10                        [retry=N] [authtok_type=STRING] [file=/path/filename]
11                        [conf=/path/to/config-file]
12

DESCRIPTION

14       This module saves the last passwords for each user in order to force
15       password change history and keep the user from alternating between the
16       same password too frequently.
17
18       This module does not work together with kerberos. In general, it does
19       not make much sense to use this module in conjunction with NIS or LDAP,
20       since the old passwords are stored on the local machine and are not
21       available on another machine for password history checking.
22

OPTIONS

24       debug
25           Turns on debugging via syslog(3).
26
27       use_authtok
28           When password changing enforce the module to use the new password
29           provided by a previously stacked password module (this is used in
30           the example of the stacking of the pam_passwdqc module documented
31           below).
32
33       enforce_for_root
34           If this option is set, the check is enforced for root, too.
35
36       remember=N
37           The last N passwords for each user are saved. The default is 10.
38           Value of 0 makes the module to keep the existing contents of the
39           opasswd file unchanged.
40
41       retry=N
42           Prompt user at most N times before returning with error. The
43           default is 1.
44
45       authtok_type=STRING
46           See pam_get_authtok(3) for more details.
47
48       file=/path/filename
49           Store password history in file /path/filename rather than the
50           default location. The default location is /etc/security/opasswd.
51
52       conf=/path/to/config-file
53           Use another configuration file instead of the default
54           /etc/security/pwhistory.conf.
55
56       The options for configuring the module behavior are described in the
57       pwhistory.conf(5) manual page. The options specified on the module
58       command line override the values from the configuration file.
59

MODULE TYPES PROVIDED

61       Only the password module type is provided.
62

RETURN VALUES

64       PAM_AUTHTOK_ERR
65           No new password was entered, the user aborted password change or
66           new password couldn't be set.
67
68       PAM_IGNORE
69           Password history was disabled.
70
71       PAM_MAXTRIES
72           Password was rejected too often.
73
74       PAM_USER_UNKNOWN
75           User is not known to system.
76

EXAMPLES

78       An example password section would be:
79
80           #%PAM-1.0
81           password     required       pam_pwhistory.so
82           password     required       pam_unix.so        use_authtok
83
84
85       In combination with pam_passwdqc:
86
87           #%PAM-1.0
88           password     required       pam_passwdqc.so    config=/etc/passwdqc.conf
89           password     required       pam_pwhistory.so   use_authtok
90           password     required       pam_unix.so        use_authtok
91
92
93

FILES

95       /etc/security/opasswd
96           Default file with password history
97
98       /etc/security/pwhistory.conf
99           Config file for pam_pwhistory options
100

SEE ALSO

102       pwhistory.conf(5), pam.conf(5), pam.d(5), pam(8) pam_get_authtok(3)
103

AUTHOR

105       pam_pwhistory was written by Thorsten Kukuk <kukuk@thkukuk.de>
106
107
108
109Linux-PAM                         05/07/2023                  PAM_PWHISTORY(8)
Impressum