1PAM_PASSWDQC(8)           BSD System Manager's Manual          PAM_PASSWDQC(8)
2

NAME

4     pam_passwdqc — Password quality-control PAM module
5

SYNOPSIS

7     [service-name] module-type control-flag pam_passwdqc [options]
8

DESCRIPTION

10     The pam_passwdqc module is a simple password strength checking module for
11     PAM.  In addition to checking regular passwords, it offers support for
12     passphrases and can provide randomly generated ones.
13
14     The pam_passwdqc module provides functionality for only one PAM manage‐
15     ment group: password changing.  In terms of the module-type parameter,
16     this is the “password” feature.
17
18     The pam_chauthtok() service function may ask the user for a new password,
19     and verify that it meets certain minimum standards.  If the chosen pass‐
20     word is unsatisfactory, the service function returns PAM_AUTHTOK_ERR.
21
22     The following options may be passed to the module:
23
24     min=N0,N1,N2,N3,N4
25             (min=disabled,24,11,8,7) The minimum allowed password lengths for
26             different kinds of passwords/passphrases.  The keyword disabled
27             can be used to disallow passwords of a given kind regardless of
28             their length.  Each subsequent number is required to be no larger
29             than the preceding one.
30
31             N0 is used for passwords consisting of characters from one char‐
32             acter class only.  The character classes are: digits, lower-case
33             letters, upper-case letters, and other characters.  There is also
34             a special class for non-ASCII characters, which could not be
35             classified, but are assumed to be non-digits.
36
37             N1 is used for passwords consisting of characters from two char‐
38             acter classes that do not meet the requirements for a passphrase.
39
40             N2 is used for passphrases.  Note that besides meeting this
41             length requirement, a passphrase must also consist of a suffi‐
42             cient number of words (see the passphrase option below).
43
44             N3 and N4 are used for passwords consisting of characters from
45             three and four character classes, respectively.
46
47             When calculating the number of character classes, upper-case let‐
48             ters used as the first character and digits used as the last
49             character of a password are not counted.
50
51             In addition to being sufficiently long, passwords are required to
52             contain enough different characters for the character classes and
53             the minimum length they have been checked against.
54
55     max=N   (max=40) The maximum allowed password length.  This can be used
56             to prevent users from setting passwords that may be too long for
57             some system services.  The value 8 is treated specially: if max
58             is set to 8, passwords longer than 8 characters will not be
59             rejected, but will be truncated to 8 characters for the strength
60             checks and the user will be warned.  This is to be used with the
61             traditional DES-based password hashes, which truncate the pass‐
62             word at 8 characters.
63
64             It is important that you do set max=8 if you are using the tradi‐
65             tional hashes, or some weak passwords will pass the checks.
66
67     passphrase=N
68             (passphrase=3) The number of words required for a passphrase, or
69             0 to disable the support for user-chosen passphrases.
70
71     match=N
72             (match=4) The length of common substring required to conclude
73             that a password is at least partially based on information found
74             in a character string, or 0 to disable the substring search.
75             Note that the password will not be rejected once a weak substring
76             is found; it will instead be subjected to the usual strength
77             requirements with the weak substring removed.
78
79             The substring search is case-insensitive and is able to detect
80             and remove a common substring spelled backwards.
81
82     similar=permit|deny
83             (similar=deny) Whether a new password is allowed to be similar to
84             the old one.  The passwords are considered to be similar when
85             there is a sufficiently long common substring and the new pass‐
86             word with the substring removed would be weak.
87
88     random=N[,only]
89             (random=42) The size of randomly-generated passphrases in bits
90             (24 to 72), or 0 to disable this feature.  Any passphrase that
91             contains the offered randomly-generated string will be allowed
92             regardless of other possible restrictions.
93
94             The only modifier can be used to disallow user-chosen passwords.
95
96     enforce=none|users|everyone
97             (enforce=everyone) The module can be configured to warn of weak
98             passwords only, but not actually enforce strong passwords.  The
99             users setting will enforce strong passwords for invocations by
100             non-root users only.
101
102     non-unix
103             Normally, pam_passwdqc uses getpwnam(3) to obtain the user's per‐
104             sonal login information and use that during the password strength
105             checks.  This behavior can be disabled with the non-unix option.
106
107     retry=N
108             (retry=3) The number of times the module will ask for a new pass‐
109             word if the user fails to provide a sufficiently strong password
110             and enter it twice the first time.
111
112     ask_oldauthtok[=update]
113             Ask for the old password as well.  Normally, pam_passwdqc leaves
114             this task for subsequent modules.  With no argument, the
115             ask_oldauthtok option will cause pam_passwdqc to ask for the old
116             password during the preliminary check phase.  If the
117             ask_oldauthtok option is specified with the update argument,
118             pam_passwdqc will do that during the update phase.
119
120     check_oldauthtok
121             This tells pam_passwdqc to validate the old password before giv‐
122             ing a new password prompt.  Normally, this task is left for sub‐
123             sequent modules.
124
125             The primary use for this option is when ask_oldauthtok=update is
126             also specified, in which case no other module gets a chance to
127             ask for and validate the password.  Of course, this will only
128             work with UNIX passwords.
129
130     use_first_pass, use_authtok
131             Use the new password obtained by modules stacked before
132             pam_passwdqc.  This disables user interaction within
133             pam_passwdqc.  The only difference between use_first_pass and
134             use_authtok is that the former is incompatible with
135             ask_oldauthtok.
136

SEE ALSO

138     getpwnam(3), pam.conf(5), pam(8)
139

AUTHORS

141     The pam_passwdqc module was written for Openwall GNU/*/Linux by Solar
142     Designer <solar at openwall.com>.  This manual page, derived from the
143     author's documentation, was written for the FreeBSD Project by ThinkSec
144     AS and NAI Labs, the Security Research Division of Network Associates,
145     Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of
146     the DARPA CHATS research program.
147
148BSD                            February 12, 2008                           BSD
Impressum