[b4b71892] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[b4b71892] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[1b6c879] | 7 | <!ENTITY cracklib-url "https://github.com/cracklib/cracklib/releases/download">
|
---|
[9912ce81] | 8 |
|
---|
[1b6c879] | 9 | <!ENTITY cracklib-download-http "&cracklib-url;/v&cracklib-version;/cracklib-&cracklib-version;.tar.bz2">
|
---|
[306fb0e] | 10 | <!ENTITY cracklib-download-ftp " ">
|
---|
[5cd7055] | 11 | <!ENTITY cracklib-md5sum "0d68de25332cee5660850528a385427f">
|
---|
| 12 | <!ENTITY cracklib-size "592 KB">
|
---|
| 13 | <!ENTITY cracklib-buildsize "4.2 MB">
|
---|
[9912ce81] | 14 | <!ENTITY cracklib-time "less than 0.1 SBU">
|
---|
[1f4d911] | 15 |
|
---|
[a754697b] | 16 | <!ENTITY crackdict-download "&cracklib-url;/v&cracklib-version;/cracklib-words-&cracklib-version;.bz2">
|
---|
[5cd7055] | 17 | <!ENTITY crackdict-size "6.7 MB">
|
---|
| 18 | <!ENTITY crackdict-md5sum "94e9963e4786294f7fb0f2efd7618551">
|
---|
[b4b71892] | 19 | ]>
|
---|
| 20 |
|
---|
[8b1b2dc7] | 21 | <sect1 id="cracklib" xreflabel="CrackLib-&cracklib-version;">
|
---|
[9623b6e8] | 22 | <?dbhtml filename="cracklib.html"?>
|
---|
| 23 |
|
---|
| 24 | <sect1info>
|
---|
| 25 | <date>$Date$</date>
|
---|
| 26 | </sect1info>
|
---|
| 27 |
|
---|
[8b1b2dc7] | 28 | <title>CrackLib-&cracklib-version;</title>
|
---|
[9623b6e8] | 29 |
|
---|
| 30 | <indexterm zone="cracklib">
|
---|
[8b1b2dc7] | 31 | <primary sortas="a-CrackLib">CrackLib</primary>
|
---|
[9623b6e8] | 32 | </indexterm>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="package">
|
---|
[8b1b2dc7] | 35 | <title>Introduction to CrackLib</title>
|
---|
[9623b6e8] | 36 |
|
---|
[47274444] | 37 | <para>
|
---|
| 38 | The <application>CrackLib</application> package contains a
|
---|
| 39 | library used to enforce strong passwords by comparing user selected
|
---|
| 40 | passwords to words in chosen word lists.
|
---|
| 41 | </para>
|
---|
[9623b6e8] | 42 |
|
---|
[de22bfa] | 43 | &lfs111_checked;
|
---|
[5f4181d] | 44 |
|
---|
[9623b6e8] | 45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem>
|
---|
[47274444] | 48 | <para>
|
---|
| 49 | Download (HTTP): <ulink url="&cracklib-download-http;"/>
|
---|
| 50 | </para>
|
---|
[9623b6e8] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[47274444] | 53 | <para>
|
---|
| 54 | Download (FTP): <ulink url="&cracklib-download-ftp;"/>
|
---|
| 55 | </para>
|
---|
[9623b6e8] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[47274444] | 58 | <para>
|
---|
| 59 | Download MD5 sum: &cracklib-md5sum;
|
---|
| 60 | </para>
|
---|
[9623b6e8] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[47274444] | 63 | <para>
|
---|
| 64 | Download size: &cracklib-size;
|
---|
| 65 | </para>
|
---|
[9623b6e8] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[47274444] | 68 | <para>
|
---|
| 69 | Estimated disk space required: &cracklib-buildsize;
|
---|
| 70 | </para>
|
---|
[9623b6e8] | 71 | </listitem>
|
---|
| 72 | <listitem>
|
---|
[47274444] | 73 | <para>
|
---|
| 74 | Estimated build time: &cracklib-time;
|
---|
| 75 | </para>
|
---|
[9623b6e8] | 76 | </listitem>
|
---|
| 77 | </itemizedlist>
|
---|
| 78 |
|
---|
| 79 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[8f1699f2] | 80 | <itemizedlist spacing="compact">
|
---|
[9623b6e8] | 81 | <listitem>
|
---|
[47274444] | 82 | <para>
|
---|
| 83 | Recommended word list for English-speaking countries (size:
|
---|
| 84 | &crackdict-size;; md5sum: &crackdict-md5sum;):
|
---|
| 85 | <ulink url="&crackdict-download;"/>
|
---|
| 86 | </para>
|
---|
[22861b3] | 87 | </listitem>
|
---|
[9623b6e8] | 88 | </itemizedlist>
|
---|
| 89 |
|
---|
[47274444] | 90 | <para>
|
---|
| 91 | There are additional word lists available for download, e.g., from
|
---|
| 92 | <ulink url="http://www.cotse.com/tools/wordlists.htm"/>.
|
---|
| 93 | <application>CrackLib</application> can utilize as many, or as few word
|
---|
| 94 | lists you choose to install.
|
---|
| 95 | </para>
|
---|
[62494cc] | 96 |
|
---|
[22861b3] | 97 | <important>
|
---|
[47274444] | 98 | <para>
|
---|
| 99 | Users tend to base their passwords on regular words of the spoken
|
---|
| 100 | language, and crackers know that. <application>CrackLib</application>
|
---|
| 101 | is intended to filter out such bad passwords at the source using a
|
---|
| 102 | dictionary created from word lists. To accomplish this, the word
|
---|
| 103 | list(s) for use with <application>CrackLib</application> must be an
|
---|
| 104 | exhaustive list of words and word-based keystroke combinations likely
|
---|
| 105 | to be chosen by users of the system as (guessable) passwords.
|
---|
| 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <para>
|
---|
| 109 | The default word list recommended above for downloading mostly
|
---|
| 110 | satisfies this role in English-speaking countries. In other situations,
|
---|
| 111 | it may be necessary to download (or even create) additional word lists.
|
---|
| 112 | </para>
|
---|
| 113 |
|
---|
| 114 | <para>
|
---|
| 115 | Note that word lists suitable for spell-checking are not usable
|
---|
| 116 | as <application>CrackLib</application> word lists in countries with
|
---|
| 117 | non-Latin based alphabets, because of <quote>word-based keystroke
|
---|
| 118 | combinations</quote> that make bad passwords.
|
---|
| 119 | </para>
|
---|
[22861b3] | 120 | </important>
|
---|
[5156197] | 121 |
|
---|
[3597eb6] | 122 | <para condition="html" role="usernotes">User Notes:
|
---|
[8f1699f2] | 123 | <ulink url="&blfs-wiki;/cracklib"/>
|
---|
| 124 | </para>
|
---|
[9623b6e8] | 125 | </sect2>
|
---|
| 126 |
|
---|
| 127 | <sect2 role="installation">
|
---|
[8b1b2dc7] | 128 | <title>Installation of CrackLib</title>
|
---|
[4f65b2f] | 129 |
|
---|
[47274444] | 130 | <para>
|
---|
| 131 | Install <application>CrackLib</application> by running the following
|
---|
| 132 | commands:
|
---|
| 133 | </para>
|
---|
[b4b71892] | 134 |
|
---|
[806e763] | 135 | <screen><userinput>sed -i '/skipping/d' util/packer.c &&
|
---|
| 136 |
|
---|
[97b8038] | 137 | sed -i '15209 s/.*/am_cv_python_version=&python3-majorver;/' configure &&
|
---|
| 138 |
|
---|
[0f0dc82] | 139 | PYTHON=python3 CPPFLAGS=-I/usr/include/python&python3-majorver; \
|
---|
[806e763] | 140 | ./configure --prefix=/usr \
|
---|
| 141 | --disable-static \
|
---|
[2eb2948] | 142 | --with-default-dict=/usr/lib/cracklib/pw_dict &&
|
---|
[8b1b2dc7] | 143 | make</userinput></screen>
|
---|
[b4b71892] | 144 |
|
---|
[47274444] | 145 | <para>
|
---|
| 146 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 147 | </para>
|
---|
[9623b6e8] | 148 |
|
---|
[2eb2948] | 149 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[22861b3] | 150 |
|
---|
[47274444] | 151 | <para>
|
---|
| 152 | Issue the following commands as the
|
---|
| 153 | <systemitem class="username">root</systemitem> user to install the
|
---|
| 154 | recommended word list and create the <application>CrackLib</application>
|
---|
| 155 | dictionary. Other word lists (text based, one word per line) can also be
|
---|
| 156 | used by simply installing them into
|
---|
| 157 | <filename class="directory">/usr/share/dict</filename> and adding them
|
---|
| 158 | to the <command>create-cracklib-dict</command> command.
|
---|
| 159 | </para>
|
---|
[22861b3] | 160 |
|
---|
[5cd7055] | 161 | <screen role="root"><userinput>install -v -m644 -D ../cracklib-words-&cracklib-version;.bz2 \
|
---|
| 162 | /usr/share/dict/cracklib-words.bz2 &&
|
---|
[806e763] | 163 |
|
---|
[5cd7055] | 164 | bunzip2 -v /usr/share/dict/cracklib-words.bz2 &&
|
---|
[efd93087] | 165 | ln -v -sf cracklib-words /usr/share/dict/words &&
|
---|
| 166 | echo $(hostname) >> /usr/share/dict/cracklib-extra-words &&
|
---|
[2eb2948] | 167 | install -v -m755 -d /usr/lib/cracklib &&
|
---|
[806e763] | 168 |
|
---|
| 169 | create-cracklib-dict /usr/share/dict/cracklib-words \
|
---|
[efd93087] | 170 | /usr/share/dict/cracklib-extra-words</userinput></screen>
|
---|
[8b1b2dc7] | 171 |
|
---|
[47274444] | 172 | <para>
|
---|
| 173 | If desired, check the proper operation of the library as an
|
---|
| 174 | unprivileged user by issuing the following command:
|
---|
| 175 | </para>
|
---|
[a4440544] | 176 |
|
---|
[e7d4e823] | 177 | <screen remap="test"><userinput>make test</userinput></screen>
|
---|
[9623b6e8] | 178 |
|
---|
[c6bdcb0] | 179 | <important>
|
---|
[47274444] | 180 | <para>
|
---|
| 181 | If you are installing <application>CrackLib</application> after
|
---|
| 182 | your LFS system has been completed and you have the
|
---|
| 183 | <application>Shadow</application> package installed, you must
|
---|
| 184 | reinstall <xref linkend="shadow"/> if you wish to provide strong
|
---|
| 185 | password support on your system. If you are now going to install the
|
---|
| 186 | <xref linkend="linux-pam"/> package, you may disregard this note as
|
---|
| 187 | <application>Shadow</application> will be reinstalled after the
|
---|
| 188 | <application>Linux-PAM</application> installation.
|
---|
| 189 | </para>
|
---|
[c6bdcb0] | 190 | </important>
|
---|
| 191 |
|
---|
[9623b6e8] | 192 | </sect2>
|
---|
| 193 |
|
---|
| 194 | <sect2 role="commands">
|
---|
| 195 | <title>Command Explanations</title>
|
---|
| 196 |
|
---|
[47274444] | 197 | <para>
|
---|
| 198 | <command>sed -i '/skipping/d' util/packer.c</command>:
|
---|
| 199 | Remove a meaningless warning.
|
---|
| 200 | </para>
|
---|
[806e763] | 201 |
|
---|
[0f0dc82] | 202 | <para>
|
---|
| 203 | <envar>PYTHON=python3</envar>: This forces the installation of
|
---|
| 204 | python bindings for Python 3, even if Python 2 is installed.
|
---|
| 205 | </para>
|
---|
| 206 |
|
---|
| 207 | <para>
|
---|
| 208 | <envar>CPPFLAGS=-I/usr/include/python&python3-majorver;</envar>:
|
---|
| 209 | This works around an issue caused by incorrect usage of Python 3
|
---|
| 210 | headers.
|
---|
| 211 | </para>
|
---|
| 212 |
|
---|
[47274444] | 213 | <para>
|
---|
| 214 | <parameter>--with-default-dict=/lib/cracklib/pw_dict</parameter>:
|
---|
| 215 | This parameter forces the installation of the
|
---|
| 216 | <application>CrackLib</application> dictionary to the
|
---|
| 217 | <filename class="directory">/lib</filename> hierarchy.
|
---|
| 218 | </para>
|
---|
[8f1699f2] | 219 |
|
---|
| 220 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 221 | href="../../xincludes/static-libraries.xml"/>
|
---|
[8b1b2dc7] | 222 |
|
---|
[2eb2948] | 223 | <!-- FIXME: No longer needed with merged-/usr configuration
|
---|
[47274444] | 224 | <para>
|
---|
| 225 | <command>mv -v /usr/lib/libcrack.so.2* /lib</command> and
|
---|
| 226 | <command>ln -v -sf ../../lib/libcrack.so.2.9.0 ...</command>: These two
|
---|
| 227 | commands move the <filename
|
---|
| 228 | class="libraryfile">libcrack.so.2.9.0</filename>
|
---|
| 229 | library and associated symlink from
|
---|
| 230 | <filename class="directory">/usr/lib</filename> to
|
---|
| 231 | <filename class="directory">/lib</filename>, then recreates the
|
---|
| 232 | <filename class="symlink">/usr/lib/libcrack.so</filename> symlink
|
---|
| 233 | pointing to the relocated file.
|
---|
| 234 | </para>
|
---|
[2eb2948] | 235 | -->
|
---|
[47274444] | 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>
|
---|
[9623b6e8] | 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>
|
---|
[d80152af] | 275 | <segtitle>Installed Directories</segtitle>
|
---|
[9623b6e8] | 276 |
|
---|
| 277 | <seglistitem>
|
---|
[8b1b2dc7] | 278 | <seg>cracklib-check, cracklib-format, cracklib-packer,
|
---|
| 279 | cracklib-unpacker and create-cracklib-dict</seg>
|
---|
[d456f78c] | 280 |
|
---|
[0f0dc82] | 281 | <seg>libcrack.so and the _cracklib.so
|
---|
| 282 | (<application>Python</application> module)</seg>
|
---|
[0d7900a] | 283 |
|
---|
[1976445] | 284 | <seg>/lib/cracklib, /usr/share/dict and /usr/share/cracklib</seg>
|
---|
[9623b6e8] | 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 |
|
---|
[efd93087] | 293 | <varlistentry id="cracklib-check">
|
---|
| 294 | <term><command>cracklib-check</command></term>
|
---|
| 295 | <listitem>
|
---|
[47274444] | 296 | <para>
|
---|
[4c24eb0a] | 297 | is used to determine if a password is strong
|
---|
[47274444] | 298 | </para>
|
---|
[efd93087] | 299 | <indexterm zone="cracklib cracklib-check">
|
---|
| 300 | <primary sortas="b-cracklib-check">cracklib-check</primary>
|
---|
| 301 | </indexterm>
|
---|
| 302 | </listitem>
|
---|
| 303 | </varlistentry>
|
---|
| 304 |
|
---|
[c2de366] | 305 | <varlistentry id="cracklib-format">
|
---|
| 306 | <term><command>cracklib-format</command></term>
|
---|
| 307 | <listitem>
|
---|
[47274444] | 308 | <para>
|
---|
| 309 | is used to format text files (lowercases all words,
|
---|
[4c24eb0a] | 310 | removes control characters and sorts the lists)
|
---|
[47274444] | 311 | </para>
|
---|
[c2de366] | 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>
|
---|
[47274444] | 321 | <para>
|
---|
[4c24eb0a] | 322 | creates a database with words read from standard input
|
---|
[47274444] | 323 | </para>
|
---|
[c2de366] | 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>
|
---|
[47274444] | 333 | <para>
|
---|
[4c24eb0a] | 334 | displays on standard output the database specified
|
---|
[47274444] | 335 | </para>
|
---|
[c2de366] | 336 | <indexterm zone="cracklib cracklib-packer">
|
---|
| 337 | <primary sortas="b-cracklib-packer">cracklib-packer</primary>
|
---|
| 338 | </indexterm>
|
---|
| 339 | </listitem>
|
---|
| 340 | </varlistentry>
|
---|
| 341 |
|
---|
[8b1b2dc7] | 342 | <varlistentry id="create-cracklib-dict">
|
---|
[0170790e] | 343 | <term><command>create-cracklib-dict</command></term>
|
---|
[8b1b2dc7] | 344 | <listitem>
|
---|
[47274444] | 345 | <para>
|
---|
| 346 | is used to create the <application>CrackLib</application>
|
---|
[4c24eb0a] | 347 | dictionary from the given word list(s)
|
---|
[47274444] | 348 | </para>
|
---|
[8b1b2dc7] | 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 |
|
---|
[9623b6e8] | 355 | <varlistentry id="libcrack">
|
---|
[8f1699f2] | 356 | <term><filename class="libraryfile">libcrack.so</filename></term>
|
---|
[9623b6e8] | 357 | <listitem>
|
---|
[47274444] | 358 | <para>
|
---|
| 359 | provides a fast dictionary lookup method for strong
|
---|
[4c24eb0a] | 360 | password enforcement
|
---|
[47274444] | 361 | </para>
|
---|
[9623b6e8] | 362 | <indexterm zone="cracklib libcrack">
|
---|
[d456f78c] | 363 | <primary sortas="c-libcrack">libcrack.so</primary>
|
---|
[9623b6e8] | 364 | </indexterm>
|
---|
| 365 | </listitem>
|
---|
| 366 | </varlistentry>
|
---|
| 367 |
|
---|
| 368 | </variablelist>
|
---|
| 369 |
|
---|
| 370 | </sect2>
|
---|
[fa48bf3] | 371 |
|
---|
| 372 | </sect1>
|
---|