1 pam_passwdqc is a simple password strength checking module for
2 PAM-aware password changing programs, such as passwd(1). In addition
3 to checking regular passwords, it offers support for passphrases and
4 can provide randomly generated ones. All features are optional and
5 can be (re-)configured without rebuilding.
7 This module should be stacked before your usual password changing
8 module (such as pam_unix or pam_pwdb) in the password management group
9 (the "password" lines in /etc/pam.d/passwd or /etc/pam.conf). The
10 password changing module should then be told to use the provided new
11 authentication token (new password) rather than request it from the
12 user. There's usually the "use_authtok" option to do that. If your
13 password changing module lacks the "use_authtok" option or its prompts
14 are inconsistent with pam_passwdqc's, you may tell pam_passwdqc to ask
15 for the old password as well, with "ask_oldauthtok". In that case the
16 option to use with the password changing module is "use_first_pass".
18 There's a number of supported options which can be used to modify the
19 behavior of pam_passwdqc (defaults are given in square brackets):
21 min=N0,N1,N2,N3,N4 [min=disabled,24,11,8,7]
23 The minimum allowed password lengths for different kinds of passwords
24 and passphrases. The keyword "disabled" can be used to disallow
25 passwords of a given kind regardless of their length. Each subsequent
26 number is required to be no larger than the preceding one.
28 N0 is used for passwords consisting of characters from one character
29 class only. The character classes are: digits, lower-case letters,
30 upper-case letters, and other characters. There is also a special
31 class for non-ASCII characters, which could not be classified, but are
32 assumed to be non-digits.
34 N1 is used for passwords consisting of characters from two character
35 classes that do not meet the requirements for a passphrase.
37 N2 is used for passphrases. Note that besides meeting this length
38 requirement, a passphrase must also consist of a sufficient number of
39 words (see the "passphrase" option below).
41 N3 and N4 are used for passwords consisting of characters from three
42 and four character classes, respectively.
44 When calculating the number of character classes, upper-case letters
45 used as the first character and digits used as the last character of a
46 password are not counted.
48 In addition to being sufficiently long, passwords are required to
49 contain enough different characters for the character classes and
50 the minimum length they have been checked against.
54 The maximum allowed password length. This can be used to prevent
55 users from setting passwords that may be too long for some system
58 The value 8 is treated specially: with max=8, passwords longer than 8
59 characters will not be rejected, but will be truncated to 8 characters
60 for the strength checks and the user will be warned. This is to be
61 used with the traditional DES-based password hashes, which truncate
62 the password at 8 characters.
64 It is important that you do set max=8 if you are using the traditional
65 hashes, or some weak passwords will pass the checks.
67 passphrase=N [passphrase=3]
69 The number of words required for a passphrase, or 0 to disable the
70 support for user-chosen passphrases.
74 The length of common substring required to conclude that a password is
75 at least partially based on information found in a character string,
76 or 0 to disable the substring search. Note that the password will not
77 be rejected once a weak substring is found; it will instead be
78 subjected to the usual strength requirements with the weak substring
81 The substring search is case-insensitive and is able to detect and
82 remove a common substring spelled backwards.
84 similar=permit|deny [similar=deny]
86 Whether a new password is allowed to be similar to the old one. The
87 passwords are considered to be similar when there is a sufficiently
88 long common substring and the new password with the substring removed
91 random=N[,only] [random=42]
93 The size of randomly-generated passphrases in bits (24 to 72), or 0 to
94 disable this feature. Any passphrase that contains the offered
95 randomly-generated string will be allowed regardless of other possible
98 The "only" modifier can be used to disallow user-chosen passwords.
100 enforce=none|users|everyone [enforce=everyone]
102 The module can be configured to warn of weak passwords only, but not
103 actually enforce strong passwords. The "users" setting will enforce
104 strong passwords for invocations by non-root users only.
108 Normally, the module uses getpwnam(3) to obtain the user's personal
109 login information and use that during the password strength checks.
110 This behavior can be disabled with the "non-unix" option.
114 The number of times the module will ask for a new password if the user
115 fails to provide a sufficiently strong password and enter it twice the
118 ask_oldauthtok[=update] []
120 Ask for the old password as well. Normally, pam_passwdqc leaves this
121 task for subsequent modules. With no argument, the "ask_oldauthtok"
122 option will cause pam_passwdqc to ask for the old password during the
123 preliminary check phase. With "ask_oldauthtok=update", pam_passwdqc
124 will do that during the update phase.
128 This tells pam_passwdqc to validate the old password before giving a
129 new password prompt. Normally, this task is left for subsequent
132 The primary use for this option is when "ask_oldauthtok=update" is
133 also specified, in which case no other module gets a chance to ask
134 for and validate the password. Of course, this will only work with
140 Use the new password obtained by modules stacked before pam_passwdqc.
141 This disables user interaction within pam_passwdqc. With this module,
142 the only difference between "use_first_pass" and "use_authtok" is that
143 the former is incompatible with "ask_oldauthtok".
146 Solar Designer <solar at openwall.com>
148 $Owl: Owl/packages/pam_passwdqc/pam_passwdqc/README,v 1.11 2008/02/12 19:43:33 solar Exp $