source: postlfs/security/cracklib.xml@ 7b66ed2

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7b66ed2 was 7b66ed2, checked in by Pierre Labastie <pieere@…>, 3 years ago

Fix a header file in python for certain use cases;
For usage of python3 for cracklib python bindings

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24326 af4574ff-66df-0310-9fd7-8a98e5e911e0

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