"Fossies" - the Fresh Open Source Software Archive 
Member "passwdqc-2.0.3/README" (23 Jun 2023, 8158 Bytes) of package /linux/privat/passwdqc-2.0.3.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "README":
2.0.2_vs_2.0.3.
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.
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 are 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 config=FILE []
22
23 Load the specified configuration FILE, which must be in the
24 passwdqc.conf format (described in the passwdqc.conf(5) manual page).
25 This file may define any options described in here, including load of
26 yet another configuration file, but loops are not allowed.
27
28 min=N0,N1,N2,N3,N4 [min=disabled,24,11,8,7]
29
30 The minimum allowed password lengths for different kinds of passwords
31 and passphrases. The keyword "disabled" can be used to disallow
32 passwords of a given kind regardless of their length. Each subsequent
33 number is required to be no larger than the preceding one.
34
35 N0 is used for passwords consisting of characters from one character
36 class only. The character classes are: digits, lower-case letters,
37 upper-case letters, and other characters. There is also a special
38 class for non-ASCII characters, which could not be classified, but are
39 assumed to be non-digits.
40
41 N1 is used for passwords consisting of characters from two character
42 classes that do not meet the requirements for a passphrase.
43
44 N2 is used for passphrases. Note that besides meeting this length
45 requirement, a passphrase must also consist of a sufficient number of
46 words (see the "passphrase" option below).
47
48 N3 and N4 are used for passwords consisting of characters from three
49 and four character classes, respectively.
50
51 When calculating the number of character classes, upper-case letters
52 used as the first character and digits used as the last character of a
53 password are not counted.
54
55 In addition to being sufficiently long, passwords are required to
56 contain enough different characters for the character classes and
57 the minimum length they have been checked against.
58
59 max=N [max=72]
60
61 The maximum allowed password length. This can be used to prevent
62 users from setting passwords that may be too long for some system
63 services.
64
65 The value 8 is treated specially: with max=8, passwords longer than 8
66 characters will not be rejected, but will be truncated to 8 characters
67 for the strength checks and the user will be warned. This is to be
68 used with the traditional DES-based password hashes, which truncate
69 the password at 8 characters.
70
71 It is important that you do set max=8 if you are using the traditional
72 hashes, or some weak passwords will pass the checks.
73
74 passphrase=N [passphrase=3]
75
76 The number of words required for a passphrase, or 0 to disable the
77 support for user-chosen passphrases.
78
79 match=N [match=4]
80
81 The length of common substring required to conclude that a password is
82 at least partially based on information found in a character string,
83 or 0 to disable the substring search. Note that the password will not
84 be rejected once a weak substring is found; it will instead be
85 subjected to the usual strength requirements with the weak substring
86 partially discounted.
87
88 The substring search is case-insensitive and is able to detect and
89 remove a common substring spelled backwards.
90
91 similar=permit|deny [similar=deny]
92
93 Whether a new password is allowed to be similar to the old one. The
94 passwords are considered to be similar when there is a sufficiently
95 long common substring and the new password with the substring partially
96 discounted would be weak.
97
98 wordlist=FILE []
99
100 Deny passwords that are based on lines of a tiny external text file,
101 which can reasonably be e.g. a list of a few thousand common passwords.
102 Common dictionary words may also reasonably be included, especially in a
103 local language other than English, or longer yet common English words.
104 (passwdqc includes a list of a few thousand common English words of
105 lengths from 3 to 6 built in. Any word list possibly specified with
106 this option is used in addition to the built-in word list.)
107
108 Substring matching and discounting will be used if the "match" setting
109 above is non-zero. Please note that this is very inefficient, and isn't
110 to be used with large wordlists.
111
112 denylist=FILE []
113
114 Deny passwords or passphrases directly appearing in a tiny external text
115 file. That file can reasonably be e.g. a list of common passwords if
116 only a relaxed policy is desired and stricter checks are thus disabled
117 (using their separate options). Such policy would only be somewhat
118 effective against online/remote attacks, but not against offline attacks
119 on hashed passwords.
120
121 filter=FILE []
122
123 Deny passwords or passphrases directly appearing in a maybe huge binary
124 filter file created with pwqfilter. This is very efficient, needing at
125 most two random disk reads per query. A filter created from millions of
126 leaked passwords can reasonably be used on top of passwdqc's other
127 checks to further reduce the number of passing yet weak passwords
128 without causing unreasonable inconvenience (as e.g. higher minimum
129 lengths and character set requirements could).
130
131 random=N[,only] [random=47]
132
133 The size of randomly-generated passphrases in bits (24 to 136), or 0 to
134 disable this feature. Any passphrase that contains the offered
135 randomly-generated string will be allowed regardless of other possible
136 restrictions.
137
138 The "only" modifier can be used to disallow user-chosen passwords.
139
140 enforce=none|users|everyone [enforce=everyone]
141
142 The module can be configured to warn of weak passwords only, but not
143 actually enforce strong passwords. The "users" setting is like
144 "everyone" for all PAM services except "chpasswd" and "passwd".
145 For these two PAM services "users" will enforce strong passwords
146 for invocations by non-root users only.
147
148 non-unix []
149
150 Normally, the module uses getpwnam(3) to obtain the user's personal
151 login information and use that during the password strength checks.
152 This behavior can be disabled with the "non-unix" option.
153
154 retry=N [retry=3]
155
156 The number of times the module will ask for a new password if the user
157 fails to provide a sufficiently strong password and enter it twice the
158 first time.
159
160 ask_oldauthtok[=update] []
161
162 Ask for the old password as well. Normally, pam_passwdqc leaves this
163 task for subsequent modules. With no argument, the "ask_oldauthtok"
164 option will cause pam_passwdqc to ask for the old password during the
165 preliminary check phase. With "ask_oldauthtok=update", pam_passwdqc
166 will do that during the update phase.
167
168 check_oldauthtok []
169
170 This tells pam_passwdqc to validate the old password before giving a
171 new password prompt. Normally, this task is left for subsequent
172 modules.
173
174 The primary use for this option is when "ask_oldauthtok=update" is
175 also specified, in which case no other module gets a chance to ask
176 for and validate the password. Of course, this will only work with
177 Unix passwords.
178
179 use_first_pass []
180 use_authtok []
181
182 Use the new password obtained by modules stacked before pam_passwdqc.
183 This disables user interaction within pam_passwdqc. With this module,
184 the only difference between "use_first_pass" and "use_authtok" is that
185 the former is incompatible with "ask_oldauthtok".
186
187 noaudit []
188
189 If audit is enabled at build time, the PAM module logs audit events once
190 user tries to change their credentials. This option disables that audit
191 logging.