1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY cracklib-url "https://github.com/cracklib/cracklib/releases/download">
|
---|
8 |
|
---|
9 | <!ENTITY cracklib-download-http "&cracklib-url;/v&cracklib-version;/cracklib-&cracklib-version;.tar.xz">
|
---|
10 | <!ENTITY cracklib-download-ftp " ">
|
---|
11 | <!ENTITY cracklib-md5sum "a99e0aef4c677df7063624690b634988">
|
---|
12 | <!ENTITY cracklib-size "456 KB">
|
---|
13 | <!ENTITY cracklib-buildsize "5.0 MB">
|
---|
14 | <!ENTITY cracklib-time "less than 0.1 SBU">
|
---|
15 |
|
---|
16 | <!ENTITY crackdict-download "&cracklib-url;/v&cracklib-version;/cracklib-words-&cracklib-version;.xz">
|
---|
17 | <!ENTITY crackdict-size "4.0 MB">
|
---|
18 | <!ENTITY crackdict-md5sum "f27804022dbf2682a7f7c353317f9a53">
|
---|
19 | ]>
|
---|
20 |
|
---|
21 | <sect1 id="cracklib" xreflabel="CrackLib-&cracklib-version;">
|
---|
22 | <?dbhtml filename="cracklib.html"?>
|
---|
23 |
|
---|
24 |
|
---|
25 | <title>CrackLib-&cracklib-version;</title>
|
---|
26 |
|
---|
27 | <indexterm zone="cracklib">
|
---|
28 | <primary sortas="a-CrackLib">CrackLib</primary>
|
---|
29 | </indexterm>
|
---|
30 |
|
---|
31 | <sect2 role="package">
|
---|
32 | <title>Introduction to CrackLib</title>
|
---|
33 |
|
---|
34 | <para>
|
---|
35 | The <application>CrackLib</application> package contains a
|
---|
36 | library used to enforce strong passwords by comparing user selected
|
---|
37 | passwords to words in chosen word lists.
|
---|
38 | </para>
|
---|
39 |
|
---|
40 | &lfs122_checked;
|
---|
41 |
|
---|
42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
43 | <itemizedlist spacing="compact">
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (HTTP): <ulink url="&cracklib-download-http;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download (FTP): <ulink url="&cracklib-download-ftp;"/>
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download MD5 sum: &cracklib-md5sum;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Download size: &cracklib-size;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated disk space required: &cracklib-buildsize;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | <listitem>
|
---|
70 | <para>
|
---|
71 | Estimated build time: &cracklib-time;
|
---|
72 | </para>
|
---|
73 | </listitem>
|
---|
74 | </itemizedlist>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
77 | <itemizedlist spacing="compact">
|
---|
78 | <para>Recommended word list for English-speaking countries:</para>
|
---|
79 | <listitem>
|
---|
80 | <para>
|
---|
81 | Download (HTTP): <ulink url="&crackdict-download;"/>
|
---|
82 | </para>
|
---|
83 | </listitem>
|
---|
84 | <listitem>
|
---|
85 | <para>
|
---|
86 | Download MD5 sum: &crackdict-md5sum;
|
---|
87 | </para>
|
---|
88 | </listitem>
|
---|
89 | <listitem>
|
---|
90 | <para>
|
---|
91 | Download size: &crackdict-size;
|
---|
92 | </para>
|
---|
93 | </listitem>
|
---|
94 | </itemizedlist>
|
---|
95 |
|
---|
96 | <para>
|
---|
97 | There are additional word lists available for download, e.g., from
|
---|
98 | <ulink url="https://wiki.skullsecurity.org/index.php/Passwords"/>.
|
---|
99 | <application>CrackLib</application> can utilize as many, or as few word
|
---|
100 | lists you choose to install.
|
---|
101 | </para>
|
---|
102 |
|
---|
103 | <important>
|
---|
104 | <para>
|
---|
105 | Users tend to base their passwords on regular words of the spoken
|
---|
106 | language, and crackers know that. <application>CrackLib</application>
|
---|
107 | is intended to filter out such bad passwords at the source using a
|
---|
108 | dictionary created from word lists. To accomplish this, the word
|
---|
109 | list(s) for use with <application>CrackLib</application> must be an
|
---|
110 | exhaustive list of words and word-based keystroke combinations likely
|
---|
111 | to be chosen by users of the system as (guessable) passwords.
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <para>
|
---|
115 | The default word list recommended above for downloading mostly
|
---|
116 | satisfies this role in English-speaking countries. In other situations,
|
---|
117 | it may be necessary to download (or even create) additional word lists.
|
---|
118 | </para>
|
---|
119 |
|
---|
120 | <para>
|
---|
121 | Note that word lists suitable for spell-checking are not usable
|
---|
122 | as <application>CrackLib</application> word lists in countries with
|
---|
123 | non-Latin based alphabets, because of <quote>word-based keystroke
|
---|
124 | combinations</quote> that make bad passwords.
|
---|
125 | </para>
|
---|
126 | </important>
|
---|
127 |
|
---|
128 | </sect2>
|
---|
129 |
|
---|
130 | <sect2 role="installation">
|
---|
131 | <title>Installation of CrackLib</title>
|
---|
132 |
|
---|
133 | <para>
|
---|
134 | Install <application>CrackLib</application> by running the following
|
---|
135 | commands:
|
---|
136 | </para>
|
---|
137 |
|
---|
138 | <screen><userinput>./configure --prefix=/usr \
|
---|
139 | --disable-static \
|
---|
140 | --with-default-dict=/usr/lib/cracklib/pw_dict &&
|
---|
141 | make</userinput></screen>
|
---|
142 |
|
---|
143 | <para>
|
---|
144 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
145 | </para>
|
---|
146 |
|
---|
147 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
148 |
|
---|
149 | <para>
|
---|
150 | Issue the following commands as the
|
---|
151 | <systemitem class="username">root</systemitem> user to install the
|
---|
152 | recommended word list and create the <application>CrackLib</application>
|
---|
153 | dictionary. Other word lists (text based, one word per line) can also be
|
---|
154 | used by simply installing them into
|
---|
155 | <filename class="directory">/usr/share/dict</filename> and adding them
|
---|
156 | to the <command>create-cracklib-dict</command> command.
|
---|
157 | </para>
|
---|
158 |
|
---|
159 | <screen role="root"><userinput>install -v -m644 -D ../cracklib-words-&cracklib-version;.xz \
|
---|
160 | /usr/share/dict/cracklib-words.xz &&
|
---|
161 |
|
---|
162 | unxz -v /usr/share/dict/cracklib-words.xz &&
|
---|
163 | ln -v -sf cracklib-words /usr/share/dict/words &&
|
---|
164 | echo $(hostname) >> /usr/share/dict/cracklib-extra-words &&
|
---|
165 | install -v -m755 -d /usr/lib/cracklib &&
|
---|
166 |
|
---|
167 | create-cracklib-dict /usr/share/dict/cracklib-words \
|
---|
168 | /usr/share/dict/cracklib-extra-words</userinput></screen>
|
---|
169 |
|
---|
170 | <para>
|
---|
171 | If desired, check the proper operation of the library as an
|
---|
172 | unprivileged user by issuing the following command:
|
---|
173 | </para>
|
---|
174 |
|
---|
175 | <screen remap="test"><userinput>make test</userinput></screen>
|
---|
176 |
|
---|
177 | <important>
|
---|
178 | <para>
|
---|
179 | If you are installing <application>CrackLib</application> after
|
---|
180 | your LFS system has been completed and you have the
|
---|
181 | <application>Shadow</application> package installed, you must
|
---|
182 | reinstall <xref linkend="shadow"/> if you wish to provide strong
|
---|
183 | password support on your system. If you are now going to install the
|
---|
184 | <xref linkend="linux-pam"/> package, you may disregard this note as
|
---|
185 | <application>Shadow</application> will be reinstalled after the
|
---|
186 | <application>Linux-PAM</application> installation.
|
---|
187 | </para>
|
---|
188 | </important>
|
---|
189 |
|
---|
190 | </sect2>
|
---|
191 |
|
---|
192 | <sect2 role="commands">
|
---|
193 | <title>Command Explanations</title>
|
---|
194 |
|
---|
195 | <!-- not needed with 2.10.2
|
---|
196 | <para>
|
---|
197 | <command>autoreconf -fiv</command>: The configure script shipped with
|
---|
198 | the package is too old to get the right version string of Python
|
---|
199 | 3.10 or later. This command regenerates it with a more recent version
|
---|
200 | of autotools, which fixes the issue.
|
---|
201 | </para>
|
---|
202 |
|
---|
203 | <para>
|
---|
204 | <envar>PYTHON=python3</envar>: This forces the installation of
|
---|
205 | python bindings for Python 3, even if Python 2 is installed.
|
---|
206 | </para>
|
---|
207 | -->
|
---|
208 |
|
---|
209 | <para>
|
---|
210 | <parameter>--with-default-dict=/usr/lib/cracklib/pw_dict</parameter>:
|
---|
211 | This parameter forces the installation of the
|
---|
212 | <application>CrackLib</application> dictionary to the
|
---|
213 | <filename class="directory">/lib</filename> hierarchy.
|
---|
214 | </para>
|
---|
215 |
|
---|
216 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
217 | href="../../xincludes/static-libraries.xml"/>
|
---|
218 |
|
---|
219 | <para>
|
---|
220 | <command>install -v -m644 -D ...</command>: This command creates the
|
---|
221 | <filename class="directory">/usr/share/dict</filename> directory (if it
|
---|
222 | doesn't already exist) and installs the compressed word list there.
|
---|
223 | </para>
|
---|
224 |
|
---|
225 | <para>
|
---|
226 | <command>ln -v -s cracklib-words /usr/share/dict/words</command>: The
|
---|
227 | word list is linked to <filename>/usr/share/dict/words</filename> as
|
---|
228 | historically, <filename>words</filename> is the primary word list in the
|
---|
229 | <filename class="directory">/usr/share/dict</filename> directory. Omit
|
---|
230 | this command if you already have a
|
---|
231 | <filename>/usr/share/dict/words</filename> file installed on your system.
|
---|
232 | </para>
|
---|
233 |
|
---|
234 | <para>
|
---|
235 | <command>echo $(hostname) >>...</command>: The value of
|
---|
236 | <command>hostname</command> is echoed to a file called
|
---|
237 | <filename>cracklib-extra-words</filename>. This extra file is intended
|
---|
238 | to be a site specific list which includes easy to guess passwords such
|
---|
239 | as company or department names, user names, product names, computer
|
---|
240 | names, domain names, etc.
|
---|
241 | </para>
|
---|
242 |
|
---|
243 | <para>
|
---|
244 | <command>create-cracklib-dict ...</command>: This command creates the
|
---|
245 | <application>CrackLib</application> dictionary from the word lists.
|
---|
246 | Modify the command to add any additional word lists you have installed.
|
---|
247 | </para>
|
---|
248 |
|
---|
249 | </sect2>
|
---|
250 |
|
---|
251 | <sect2 role="content">
|
---|
252 | <title>Contents</title>
|
---|
253 |
|
---|
254 | <segmentedlist>
|
---|
255 | <segtitle>Installed Programs</segtitle>
|
---|
256 | <segtitle>Installed Libraries</segtitle>
|
---|
257 | <segtitle>Installed Directories</segtitle>
|
---|
258 |
|
---|
259 | <seglistitem>
|
---|
260 | <seg>cracklib-check, cracklib-format, cracklib-packer,
|
---|
261 | cracklib-unpacker, cracklib-update, and create-cracklib-dict</seg>
|
---|
262 |
|
---|
263 | <seg>libcrack.so and the _cracklib.so
|
---|
264 | (<application>Python</application> module)</seg>
|
---|
265 |
|
---|
266 | <seg>/usr/lib/cracklib, /usr/share/dict and /usr/share/cracklib</seg>
|
---|
267 | </seglistitem>
|
---|
268 | </segmentedlist>
|
---|
269 |
|
---|
270 | <variablelist>
|
---|
271 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
272 | <?dbfo list-presentation="list"?>
|
---|
273 | <?dbhtml list-presentation="table"?>
|
---|
274 |
|
---|
275 | <varlistentry id="cracklib-check">
|
---|
276 | <term><command>cracklib-check</command></term>
|
---|
277 | <listitem>
|
---|
278 | <para>
|
---|
279 | is used to determine if a password is strong
|
---|
280 | </para>
|
---|
281 | <indexterm zone="cracklib cracklib-check">
|
---|
282 | <primary sortas="b-cracklib-check">cracklib-check</primary>
|
---|
283 | </indexterm>
|
---|
284 | </listitem>
|
---|
285 | </varlistentry>
|
---|
286 |
|
---|
287 | <varlistentry id="cracklib-format">
|
---|
288 | <term><command>cracklib-format</command></term>
|
---|
289 | <listitem>
|
---|
290 | <para>
|
---|
291 | is used to format text files (lowercases all words,
|
---|
292 | removes control characters and sorts the lists)
|
---|
293 | </para>
|
---|
294 | <indexterm zone="cracklib cracklib-format">
|
---|
295 | <primary sortas="b-cracklib-format">cracklib-format</primary>
|
---|
296 | </indexterm>
|
---|
297 | </listitem>
|
---|
298 | </varlistentry>
|
---|
299 |
|
---|
300 | <varlistentry id="cracklib-packer">
|
---|
301 | <term><command>cracklib-packer</command></term>
|
---|
302 | <listitem>
|
---|
303 | <para>
|
---|
304 | creates a database with words read from standard input
|
---|
305 | </para>
|
---|
306 | <indexterm zone="cracklib cracklib-packer">
|
---|
307 | <primary sortas="b-cracklib-packer">cracklib-packer</primary>
|
---|
308 | </indexterm>
|
---|
309 | </listitem>
|
---|
310 | </varlistentry>
|
---|
311 |
|
---|
312 | <varlistentry id="cracklib-unpacker">
|
---|
313 | <term><command>cracklib-unpacker</command></term>
|
---|
314 | <listitem>
|
---|
315 | <para>
|
---|
316 | displays on standard output the database specified
|
---|
317 | </para>
|
---|
318 | <indexterm zone="cracklib cracklib-packer">
|
---|
319 | <primary sortas="b-cracklib-packer">cracklib-packer</primary>
|
---|
320 | </indexterm>
|
---|
321 | </listitem>
|
---|
322 | </varlistentry>
|
---|
323 |
|
---|
324 | <varlistentry id="create-cracklib-dict">
|
---|
325 | <term><command>create-cracklib-dict</command></term>
|
---|
326 | <listitem>
|
---|
327 | <para>
|
---|
328 | is used to create the <application>CrackLib</application>
|
---|
329 | dictionary from the given word list(s)
|
---|
330 | </para>
|
---|
331 | <indexterm zone="cracklib create-cracklib-dict">
|
---|
332 | <primary sortas="b-create-cracklib-dict">create-cracklib-dict</primary>
|
---|
333 | </indexterm>
|
---|
334 | </listitem>
|
---|
335 | </varlistentry>
|
---|
336 |
|
---|
337 | <varlistentry id="libcrack">
|
---|
338 | <term><filename class="libraryfile">libcrack.so</filename></term>
|
---|
339 | <listitem>
|
---|
340 | <para>
|
---|
341 | provides a fast dictionary lookup method for strong
|
---|
342 | password enforcement
|
---|
343 | </para>
|
---|
344 | <indexterm zone="cracklib libcrack">
|
---|
345 | <primary sortas="c-libcrack">libcrack.so</primary>
|
---|
346 | </indexterm>
|
---|
347 | </listitem>
|
---|
348 | </varlistentry>
|
---|
349 |
|
---|
350 | </variablelist>
|
---|
351 |
|
---|
352 | </sect2>
|
---|
353 |
|
---|
354 | </sect1>
|
---|