Debian Codegraph @

doc/man/pwquality.conf.5.pod

raw
1 =pod
2
3 =head1 NAME
4
5 pwquality.conf - configuration for the libpwquality library
6
7 =head1 SYNOPSIS
8
9 F</etc/security/pwquality.conf>
10
11 F</etc/security/pwquality.conf.d/*.conf>
12
13 =head1 DESCRIPTION
14
15 B<pwquality.conf> provides a way to configure the default password
16 quality requirements for the system passwords. This file is read by the
17 libpwquality library and utilities that use this library for checking
18 and generating passwords.
19
20 The file has a very simple I<name = value> format with possible comments
21 starting with C<#> character. The whitespace at the beginning of line, end
22 of line, and around the C<=> sign is ignored.
23
24 The libpwquality library also first reads all F<*.conf> files from the
25 F</etc/security/pwquality.conf.d> directory in ASCII sorted order. The
26 values of the same settings are overridden in the order the files are parsed.
27
28 =head1 OPTIONS
29
30 The possible options in the file are:
31
32 =over 4
33
34 =item B<difok>
35
36 Number of characters in the new password that must not be present in the
37 old password. (default 1)
38
39 The special value of 0 disables all checks of similarity of the new password
40 with the old password except the new password being exactly the same as
41 the old one.
42
43 =item B<minlen>
44
45 Minimum acceptable size for the new password (plus one if credits are not
46 disabled which is the default). (See L<pam_pwquality(8)>.)
47 Cannot be set to lower value than 6. (default 8)
48
49 =item B<dcredit>
50
51 The maximum credit for having digits in the new password. If less than 0
52 it is the minimum number of digits in the new password. (default 0)
53
54 =item B<ucredit>
55
56 The maximum credit for having uppercase characters in the new password.
57 If less than 0 it is the minimum number of uppercase characters in the new
58 password. (default 0)
59
60 =item B<lcredit>
61
62 The maximum credit for having lowercase characters in the new password.
63 If less than 0 it is the minimum number of lowercase characters in the new
64 password. (default 0)
65
66 =item B<ocredit>
67
68 The maximum credit for having other characters in the new password.
69 If less than 0 it is the minimum number of other characters in the new
70 password. (default 0)
71
72 =item B<minclass>
73
74 The minimum number of required classes of characters for the new
75 password (digits, uppercase, lowercase, others). (default 0)
76
77 =item B<maxrepeat>
78
79 The maximum number of allowed same consecutive characters in the new password.
80 The check is disabled if the value is 0. (default 0)
81
82 =item B<maxsequence>
83
84 The maximum length of monotonic character sequences in the new password.
85 Examples of such sequence are '12345' or 'fedcb'. Note
86 that most such passwords will not pass the simplicity check unless
87 the sequence is only a minor part of the password.
88 The check is disabled if the value is 0. (default 0)
89
90 =item B<maxclassrepeat>
91
92 The maximum number of allowed consecutive characters of the same class in the
93 new password.
94 The check is disabled if the value is 0. (default 0)
95
96 =item B<gecoscheck>
97
98 If nonzero, check whether the words longer than 3 characters from the I<GECOS>
99 field of the user's L<passwd(5)> entry are contained in the new password.
100 The check is disabled if the value is 0. (default 0)
101
102 =item B<dictcheck>
103
104 If nonzero, check whether the password (with possible modifications)
105 matches a word in a dictionary. Currently the dictionary check is performed
106 using the cracklib library. (default 1)
107
108 =item B<usercheck=>I<N>
109
110 If nonzero, check whether the password (with possible modifications)
111 contains the user name in some form. It is not performed for user names shorter
112 than 3 characters. (default 1)
113
114 =item B<usersubstr=>I<N>
115
116 If greater than 3 (due to the minimum length in usercheck), check whether the
117 password contains a substring of at least I<N> length in some form.
118 (default 0)
119
120 =item B<enforcing=>I<N>
121
122 If nonzero, reject the password if it fails the checks, otherwise
123 only print the warning. This setting applies only to the pam_pwquality module
124 and possibly other applications that explicitly change their behavior
125 based on it. It does not affect L<pwmake(1)> and L<pwscore(1)>. (default 1)
126
127 =item B<badwords>
128
129 Space separated list of words that must not be contained in the password. These
130 are additional words to the cracklib dictionary check. This setting can be
131 also used by applications to emulate the gecos check for user accounts that are
132 not created yet.
133
134 =item B<dictpath>
135
136 Path to the cracklib dictionaries. Default is to use the cracklib default.
137
138 =item B<retry=>I<N>
139
140 Prompt user at most I<N> times before returning with error. The default is
141 I<1>.
142
143 =item B<enforce_for_root>
144
145 The module will return error on failed check even if the user changing the
146 password is root. This option is off by default which means that just
147 the message about the failed check is printed but root can change
148 the password anyway. Note that root is not asked for an old password
149 so the checks that compare the old and new password are not performed.
150
151 =item B<local_users_only>
152
153 The module will not test the password quality for users that are not present
154 in the F</etc/passwd> file. The module still asks for the password so
155 the following modules in the stack can use the B<use_authtok> option.
156 This option is off by default.
157
158 =back
159
160 =head1 SEE ALSO
161
162 L<pwscore(1)>, L<pwmake(1)>, L<pam_pwquality(8)>
163
164 =head1 AUTHORS
165
166 Tomas Mraz <[email protected]>