]> eyrie.org Git - kerberos/krb5-strength.git/blob - tools/heimdal-strength.1
Change CrackLib tests for system CrackLib
[kerberos/krb5-strength.git] / tools / heimdal-strength.1
1 .\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "HEIMDAL-STRENGTH 1"
132 .TH HEIMDAL-STRENGTH 1 "2016-12-25" "3.1" "krb5-strength"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 heimdal\-strength \- Heimdal password quality check embedding CrackLib
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 \&\fBheimdal-strength\fR [\fIprincipal\fR]
142 .SH "DESCRIPTION"
143 .IX Header "DESCRIPTION"
144 \&\fBheimdal-strength\fR is an external password quality check program for
145 Heimdal that verifies the strength of a password.  Passwords can be tested
146 with CrackLib, checked against a \s-1CDB\s0 database of known weak passwords,
147 checked for length, checked for non-printable or non-ASCII characters that
148 may be difficult to enter reproducibly, required to contain particular
149 character classes, or any combination of these tests.  It is normally run
150 via \fIkpasswdd\fR\|(8) using the Heimdal password quality check interface rather
151 than directly.
152 .PP
153 To use this program, it must be configured in \fIkrb5.conf\fR via settings
154 in \f(CW\*(C`[appdefaults]\*(C'\fR for the application name \f(CW\*(C`krb5\-strength\*(C'\fR.  A typical
155 setting would be:
156 .PP
157 .Vb 3
158 \&    krb5\-strength = {
159 \&        password_dictionary = /usr/local/lib/kadmind/dictionary
160 \&    }
161 .Ve
162 .PP
163 which says to check passwords with CrackLib using the given path as the
164 base path of the CrackLib dictionary.  See \*(L"\s-1CONFIGURATION\*(R"\s0 below for
165 details on the supported configuration options.
166 .PP
167 \&\fBheimdal-strength\fR then expects the Heimdal password quality check
168 information on standard input, specifically:
169 .PP
170 .Vb 3
171 \&    principal: <principal>
172 \&    new\-password: <password>
173 \&    end
174 .Ve
175 .PP
176 where <principal> is the principal whose password would be changed and
177 <password> is the new password.  If the password appears to be strong, it
178 prints \f(CW\*(C`APPROVED\*(C'\fR on standard output and exits with a status of 0.  If
179 the password is rejected as being too weak, it will print the reason for
180 rejecting the password on standard error and exit with a status of 0.  If
181 some fatal error occurs, it will print that error to standard error and
182 exit with a non-zero status.
183 .SH "CONFIGURATION"
184 .IX Header "CONFIGURATION"
185 The following \fIkrb5.conf\fR configuration options are supported:
186 .IP "cracklib_maxlen" 4
187 .IX Item "cracklib_maxlen"
188 Normally, all passwords are checked with CrackLib if a CrackLib dictionary
189 is defined.  However, CrackLib's rules were designed for a world in which
190 most passwords were four to eight characters long, and tends to spuriously
191 reject a lot of passphrases.  If this option is set to something other
192 than its default of 0, passwords longer than that length bypass CrackLib
193 checks.  (Using a SQLite dictionary for longer passwords is strongly
194 recommended.)
195 .IP "minimum_different" 4
196 .IX Item "minimum_different"
197 If set to a numeric value, passwords with fewer than this number of unique
198 characters will be rejected.  This can be used to reject, for example,
199 passwords that are long strings of the same character or repetitions of
200 small numbers of characters, which may be too easy to guess.
201 .IP "minimum_length" 4
202 .IX Item "minimum_length"
203 If set to a numeric value, passwords with fewer than that number of
204 characters will be rejected, independent of any length restrictions in
205 CrackLib.  Note that this setting does not bypass the minimum length
206 requirements in CrackLib itself.
207 .IP "password_dictionary" 4
208 .IX Item "password_dictionary"
209 Specifies the base path to a CrackLib dictionary and enables password
210 strength testing using CrackLib.  The provided path should be the full
211 path to the dictionary files, omitting the trailing \fI*.hwm\fR, \fI*.pwd\fR,
212 and \fI*.pwi\fR extensions for the CrackLib dictionary.
213 .IP "password_dictionary_cdb" 4
214 .IX Item "password_dictionary_cdb"
215 Specifies the base path to a \s-1CDB\s0 dictionary and enables \s-1CDB\s0 password
216 dictionary lookups.  The path must point to a CDB-format database whose
217 keys are the known passwords or dictionary words.  The values are ignored.
218 You can use the \fBkrb5\-strength\-wordlist\fR utility to generate the \s-1CDB\s0
219 database from a word list.
220 .Sp
221 The \s-1CDB\s0 dictionary lookups do not do the complex password mangling that
222 CrackLib does.  Instead, the password itself will be checked against the
223 dictionary, and then variations of the password formed by removing the
224 first character, the last character, the first and last characters, the
225 first two characters, and the last two characters.  If any of these
226 strings are found in the \s-1CDB\s0 database, the password will be rejected;
227 otherwise, it will be accepted, at least by this check.
228 .Sp
229 A CrackLib dictionary, a \s-1CDB\s0 dictionary, and a SQLite dictionary may all
230 be configured at the same time or in any combination, in which case
231 CrackLib will be run first, followed by \s-1CDB\s0 and then SQLite as
232 appropriate.
233 .IP "password_dictionary_sqlite" 4
234 .IX Item "password_dictionary_sqlite"
235 Specifies the base path to a SQLite dictionary and enables SQLite password
236 dictionary lookups.  The path must point to a SQLite 3 database with a
237 table named \f(CW\*(C`passwords\*(C'\fR.  This table should have two columns, \f(CW\*(C`password\*(C'\fR
238 and \f(CW\*(C`drowssap\*(C'\fR, which, for each dictionary word, holds the word and the
239 reversed form of the word.  You can use the \fBkrb5\-strength\-wordlist\fR
240 utility to generate the SQLite database from a word list.
241 .Sp
242 The SQLite dictionary lookups do not do the complex password mangling that
243 CrackLib does, but they will detect and reject any password that is within
244 edit distance one of a word in the dictionary, meaning that the dictionary
245 word can be formed from the password by adding, deleting, or modifying a
246 single character.
247 .Sp
248 A CrackLib dictionary, a \s-1CDB\s0 dictionary, and a SQLite dictionary may all
249 be configured at the same time or in any combination, in which case
250 CrackLib will be run first, followed by \s-1CDB\s0 and then SQLite as
251 appropriate.
252 .IP "require_ascii_printable" 4
253 .IX Item "require_ascii_printable"
254 If set to a true boolean value, rejects any password that contains
255 non-ASCII characters or \s-1ASCII\s0 control characters.  Spaces are allowed;
256 tabs are not (at least assuming the \s-1POSIX C\s0 locale).  No canonicalization
257 or character set is defined for Kerberos passwords in general, so you may
258 want to reject non-ASCII characters to avoid interoperability problems
259 with computers with different default character sets or Unicode
260 normalization forms.
261 .IP "require_classes" 4
262 .IX Item "require_classes"
263 This option allows specification of more complex character class
264 requirements.  The value of this parameter should be one or more
265 whitespace-separated rule.  Each rule has the syntax:
266 .Sp
267 .Vb 1
268 \&    [<min>\-<max>:]<class>[,<class>...]
269 .Ve
270 .Sp
271 where <class> is one of \f(CW\*(C`upper\*(C'\fR, \f(CW\*(C`lower\*(C'\fR, \f(CW\*(C`digit\*(C'\fR, or \f(CW\*(C`symbol\*(C'\fR.  The
272 symbol class includes all characters other than alphanumeric characters,
273 including space.  The listed classes must appear in the password.
274 Separate multiple required classes with a comma (and no space).
275 .Sp
276 The character class checks will be done in whatever locale the plugin or
277 password check program is run in, which will normally be the \s-1POSIX C\s0
278 locale but may be different depending on local configuration.
279 .Sp
280 A simple example:
281 .Sp
282 .Vb 1
283 \&    require_classes = upper,lower,digit
284 .Ve
285 .Sp
286 This requires all passwords contain at least one uppercase letter, at
287 least one lowercase letter, and at least one digit.
288 .Sp
289 If present, <min> and <max> specify the minimum password length and
290 maximum password length to which this rule applies.  This allows one to
291 specify character class requirements that change with password length.
292 So, for example:
293 .Sp
294 .Vb 1
295 \&    require_classes = 8\-19:upper,lower 8\-15:digit 8\-11:symbol
296 .Ve
297 .Sp
298 requires all passwords from 8 to 11 characters long contain all four
299 character classes, passwords from 12 to 15 characters long contain upper
300 and lower case and a digit, and passwords from 16 to 19 characters long
301 contain both upper and lower case.  Passwords longer than 20 characters
302 have no character class restrictions.  (This example is probably used in
303 conjunction with minimum_length = 8.)
304 .IP "require_non_letter" 4
305 .IX Item "require_non_letter"
306 If set to a true boolean value, the password must contain at least one
307 character that is not a letter (uppercase or lowercase) or a space.  This
308 may be helpful in combination with passphrases; users may choose a stock
309 English phrase, and this will force at least some additional complexity.
310 .SH "SEE ALSO"
311 .IX Header "SEE ALSO"
312 \&\fIkrb5\-strength\-wordlist\fR\|(1), \fIkadm5\-strength\fR\|(3), \fIkpasswdd\fR\|(8), \fIkrb5.conf\fR\|(5)
313 .PP
314 The \*(L"Password changing\*(R" section of the Heimdal info documentation
315 describes the interface that this program implements and how to configure
316 Heimdal to use it.
317 .PP
318 The current version of this program is available from its web page at
319 <https://www.eyrie.org/~eagle/software/krb5\-strength/> as part of the
320 krb5\-strength package.
321 .SH "AUTHOR"
322 .IX Header "AUTHOR"
323 Russ Allbery <eagle@eyrie.org>
324 .SH "COPYRIGHT AND LICENSE"
325 .IX Header "COPYRIGHT AND LICENSE"
326 Copyright 2016 Russ Allbery <eagle@eyrie.org>
327 .PP
328 Copyright 2010, 2013, 2014 The Board of Trustees of the Leland Stanford
329 Junior University
330 .PP
331 Copying and distribution of this file, with or without modification, are
332 permitted in any medium without royalty provided the copyright notice and
333 this notice are preserved.  This file is offered as-is, without any
334 warranty.