]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/pam_modules/pam_passwdqc/README
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / pam_modules / pam_passwdqc / README
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 passwords.  All features are optional
5 and can be (re-)configured without rebuilding.
6
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".
17
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):
20
21         min=N0,N1,N2,N3,N4              [min=disabled,24,12,8,7]
22
23 The minimum allowed password lengths, separately for different kinds
24 of passwords/passphrases.  The special word "disabled" can be used to
25 disallow passwords of a given kind regardless of their length.  Each
26 subsequent number is required to be no larger than the preceding one.
27
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's also the special
31 class for non-ASCII characters which couldn't be classified, but are
32 assumed to be non-digits.)
33
34 N1 is used for passwords consisting of characters from two character
35 classes, which don't meet the requirements for a passphrase.
36
37 N2 is used for passphrases.  A passphrase must consist of sufficient
38 words (see the "passphrase" option, below).
39
40 N3 and N4 are used for passwords consisting of characters from three
41 and four character classes, respectively.
42
43 When calculating the number of character classes, upper-case letters
44 used as the first character and digits used as the last character of a
45 password are not counted.
46
47 In addition to being sufficiently long, passwords are required to
48 contain enough different characters for the character classes and
49 the minimum length they've been checked against.
50
51         max=N                           [max=40]
52
53 The maximum allowed password length.  This can be used to prevent
54 users from setting passwords which may be too long for some system
55 services.
56
57 The value 8 is treated specially.  Passwords longer than 8 characters
58 will not be rejected, but will be truncated to 8 characters for the
59 strength checks and the user will be warned.  This is to be used with
60 the traditional crypt(3) password hashes.
61
62 It is important that you do set max=8 if you're using the traditional
63 hashes, or some weak passwords will pass the checks.
64
65         passphrase=N                    [passphrase=3]
66
67 The number of words required for a passphrase, or 0 to disable the
68 support for passphrases.
69
70         match=N                         [match=4]
71
72 The length of common substring required to conclude that a password is
73 at least partially based on information found in a character string,
74 or 0 to disable the substring search.  Note that the password will not
75 be rejected once a weak substring is found.  Instead, the password
76 will be subjected to the usual strength requirements with the weak
77 substring removed.
78
79 The substring search is case-insensitive and is able to detect and
80 remove a common substring spelled backwards.
81
82         similar=permit|deny             [similar=deny]
83
84 Whether a new password is allowed to be similar to the old one.  The
85 passwords are considered to be similar when there's a sufficiently
86 long common substring and the new password with the substring removed
87 would be weak.
88
89         random=N[,only]                 [random=42]
90
91 The size of randomly-generated passwords in bits, or 0 to disable this
92 feature.  Passwords that contain the offered randomly-generated string
93 will be allowed regardless of other possible restrictions.
94
95 The "only" modifier can be used to disallow user-chosen passwords.
96
97         enforce=none|users|everyone     [enforce=everyone]
98
99 The module can be configured to warn of weak passwords only, but not
100 actually enforce strong passwords.  The "users" setting will enforce
101 strong passwords for non-root users only.
102
103         non-unix                        []
104
105 By default, the module uses getpwnam(3) to obtain the user's personal
106 login information and use that during the password strength checks.
107 This behavior can be disabled with "non-unix".
108
109         retry=N                         [retry=3]
110
111 The number of times the module will ask for a new password if the user
112 fails to provide a sufficiently strong password and enter it twice the
113 first time.
114
115         ask_oldauthtok[=update]         []
116
117 Ask for the old password as well.  Normally, pam_passwdqc leaves this
118 task for the password changing module.  A simple "ask_oldauthtok" will
119 cause pam_passwdqc to ask for the old password during the preliminary
120 check phase.  With "ask_oldauthtok=update", pam_passwdqc will do that
121 during the update phase.
122
123         check_oldauthtok                []
124
125 This tells pam_passwdqc to validate the old password before giving a
126 new password prompt.  Normally, this task is left for the password
127 changing module.
128
129 The primary use for this option is with "ask_oldauthtok=update" in
130 which case no other modules have a chance to run and validate the
131 password between the prompts.  Of course, this will only work with
132 Unix passwords.
133
134         use_first_pass                  []
135         use_authtok                     []
136
137 Use the new password obtained by modules stacked before pam_passwdqc.
138 This disables user interaction within pam_passwdqc.  With this module,
139 the only difference between "use_first_pass" and "use_authtok" is that
140 the former is incompatible with "ask_oldauthtok".
141
142 -- 
143 Solar Designer <solar@openwall.com>