1PASSWDQC.CONF(5)            BSD File Formats Manual           PASSWDQC.CONF(5)
2

NAME

4     passwdqc.conf — libpasswdqc configuration file
5

DESCRIPTION

7     libpasswdqc is a simple password strength checking library.  In addition
8     to checking regular passwords, it offers support for passphrases and can
9     provide randomly generated ones.  A passwdqc.conf configuration file may
10     be used to override default libpasswdqc settings.
11

FORMAT

13     A passwdqc.conf file consists of 0 or more lines of the following format:
14           option=value
15
16     Empty lines and lines beginning with “#” are ignored.  Whitespace charac‐
17     ters between the option, “=”, and value are not allowed.
18

DIRECTIVE OPTIONS

20     config=FILE
21             Load the specified configuration FILE in the passwdqc.conf for‐
22             mat.  This file may define any options described in this manual,
23             including load of yet another configuration file, but loops are
24             not allowed.
25

PASSWORD QUALITY CONTROL OPTIONS

27     min=N0,N1,N2,N3,N4
28             (default: min=disabled,24,11,8,7) The minimum allowed password
29             lengths for different kinds of passwords/passphrases.  The key‐
30             word disabled can be used to disallow passwords of a given kind
31             regardless of their length.  Each subsequent number is required
32             to be no larger than the preceding one.
33
34             N0 is used for passwords consisting of characters from one char‐
35             acter class only.  The character classes are: digits, lower-case
36             letters, upper-case letters, and other characters.  There is also
37             a special class for non-ASCII characters, which could not be
38             classified, but are assumed to be non-digits.
39
40             N1 is used for passwords consisting of characters from two char‐
41             acter classes that do not meet the requirements for a passphrase.
42
43             N2 is used for passphrases.  Note that besides meeting this
44             length requirement, a passphrase must also consist of a suffi‐
45             cient number of words (see the passphrase option below).
46
47             N3 and N4 are used for passwords consisting of characters from
48             three and four character classes, respectively.
49
50             When calculating the number of character classes, upper-case let‐
51             ters used as the first character and digits used as the last
52             character of a password are not counted.
53
54             In addition to being sufficiently long, passwords are required to
55             contain enough different characters for the character classes and
56             the minimum length they have been checked against.
57
58     max=N   (default: max=72) The maximum allowed password length.  This can
59             be used to prevent users from setting passwords that may be too
60             long for some system services.  The value 8 is treated specially:
61             if max is set to 8, passwords longer than 8 characters will not
62             be rejected, but will be truncated to 8 characters for the
63             strength checks and the user will be warned.  This is to be used
64             with the traditional DES-based password hashes, which truncate
65             the password at 8 characters.
66
67             It is important that you do set max=8 if you are using the tradi‐
68             tional hashes, or some weak passwords will pass the checks.
69
70     passphrase=N
71             (default: passphrase=3) The number of words required for a
72             passphrase, or 0 to disable the support for user-chosen
73             passphrases.
74
75     match=N
76             (default: match=4) The length of common substring required to
77             conclude that a password is at least partially based on informa‐
78             tion found in a character string, or 0 to disable the substring
79             search.  Note that the password will not be rejected once a weak
80             substring is found; it will instead be subjected to the usual
81             strength requirements with the weak substring partially dis‐
82             counted.
83
84             The substring search is case-insensitive and is able to detect
85             and remove a common substring spelled backwards.
86
87     similar=permit|deny
88             (default: similar=deny) Whether a new password is allowed to be
89             similar to the old one.  The passwords are considered to be simi‐
90             lar when there is a sufficiently long common substring and the
91             new password with the substring partially discounted would be
92             weak.
93
94     wordlist=FILE
95             Deny passwords that are based on lines of the tiny external text
96             FILE, which can reasonably be e.g. a list of a few thousand com‐
97             mon passwords.  Common dictionary words may also reasonably be
98             included, especially in a local language other than English, or
99             longer yet common English words.  (passwdqc includes a list of a
100             few thousand common English words of lengths from 3 to 6 built
101             in.  Any word list possibly specified with this option is used in
102             addition to the built-in word list.)
103
104             Substring matching and discounting will be used if the match set‐
105             ting above is non-zero.  Please note that this is very ineffi‐
106             cient, and isn't to be used with large wordlists.
107
108     denylist=FILE
109             Deny passwords or passphrases directly appearing in the tiny ex‐
110             ternal text FILE.  That file can reasonably be e.g. a list of
111             common passwords if only a relaxed policy is desired and stricter
112             checks are thus disabled (using their separate options).  Such
113             policy would only be somewhat effective against online/remote at‐
114             tacks, but not against offline attacks on hashed passwords.
115
116     filter=FILE
117             Deny passwords or passphrases directly appearing in a maybe huge
118             binary filter FILE created with pwqfilter.  This is very effi‐
119             cient, needing at most two random disk reads per query.  A filter
120             created from millions of leaked passwords can reasonably be used
121             on top of passwdqc's other checks to further reduce the number of
122             passing yet weak passwords without causing unreasonable inconve‐
123             nience (as e.g. higher minimum lengths and character set require‐
124             ments could).
125
126     random=N[,only]
127             (default: random=47) The size of randomly-generated passphrases
128             in bits (24 to 136), or 0 to disable this feature.  Any
129             passphrase that contains the offered randomly-generated string
130             will be allowed regardless of other possible restrictions.
131
132             The only modifier can be used to disallow user-chosen passwords.
133

PAM MODULE OPTIONS

135     enforce=none|users|everyone
136             (default: enforce=everyone) The PAM module can be configured to
137             warn of weak passwords only, but not actually enforce strong
138             passwords.  The users setting will enforce strong passwords for
139             invocations by non-root users only.
140
141     non-unix
142             Normally, the PAM module uses getpwnam(3) to obtain the user's
143             personal login information and use that during the password
144             strength checks.  This behavior can be disabled with the non-unix
145             option.
146
147     retry=N
148             (default: retry=3) The number of times the PAM module will ask
149             for a new password if the user fails to provide a sufficiently
150             strong password and enter it twice the first time.
151
152     ask_oldauthtok[=update]
153             Ask for the old password as well.  Normally, the PAM module
154             leaves this task for subsequent modules.  With no argument, the
155             ask_oldauthtok option will cause the PAM module to ask for the
156             old password during the preliminary check phase. If the
157             ask_oldauthtok option is specified with the update argument, the
158             PAM module will do that during the update phase.
159
160     check_oldauthtok
161             This tells the PAM module to validate the old password before
162             giving a new password prompt.  Normally, this task is left for
163             subsequent modules.
164
165             The primary use for this option is when ask_oldauthtok=update is
166             also specified, in which case no other module gets a chance to
167             ask for and validate the password.  Of course, this will only
168             work with UNIX passwords.
169
170     use_first_pass, use_authtok
171             Use the new password obtained by other modules stacked before the
172             PAM module.  This disables user interaction within the PAM mod‐
173             ule.  The only difference between use_first_pass and use_authtok
174             is that the former is incompatible with ask_oldauthtok.
175
176     noaudit
177             If audit is enabled at build time, the PAM module logs audit
178             events once user tries to change their credentials.  This option
179             disables that audit logging.
180

FILES

182     /etc/passwdqc.conf (not read unless this suggested file location is spec‐
183     ified with the config=/etc/passwdqc.conf option).
184

SEE ALSO

186     getpwnam(3), libpasswdqc(3), pam_passwdqc(8).
187
188     https://www.openwall.com/passwdqc/
189

AUTHORS

191     The pam_passwdqc module was written for Openwall GNU/*/Linux by Solar
192     Designer <solar at openwall.com>.  This manual page was derived from
193     pam_passwdqc(8). The latter, derived from the author's documentation, was
194     written for the FreeBSD Project by ThinkSec AS and NAI Labs, the Security
195     Research Division of Network Associates, Inc. under DARPA/SPAWAR contract
196     N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.
197
198Openwall Project                March 10, 2021                Openwall Project
Impressum