[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 |
|
---|
[7eaa8018] | 7 | <!ENTITY linux-pam-download-http "https://github.com/linux-pam/linux-pam/releases/download/v&linux-pam-version;/Linux-PAM-&linux-pam-version;.tar.xz">
|
---|
[1ae6204] | 8 | <!ENTITY linux-pam-download-ftp " ">
|
---|
[e52afdd] | 9 | <!ENTITY linux-pam-md5sum "155f2a31d07077b2c63a1f135876c31b">
|
---|
[10bfa7e0] | 10 | <!ENTITY linux-pam-size "952 KB">
|
---|
[e52afdd] | 11 | <!ENTITY linux-pam-buildsize "37 MB (with tests)">
|
---|
[10bfa7e0] | 12 | <!ENTITY linux-pam-time "0.4 SBU (with tests)">
|
---|
[7eaa8018] | 13 |
|
---|
[c246bfab] | 14 | <!ENTITY linux-pam-docs-download "https://github.com/linux-pam/linux-pam/releases/download/v&linux-pam-version;/Linux-PAM-&linux-pam-docs-version;-docs.tar.xz">
|
---|
[e52afdd] | 15 | <!ENTITY linux-pam-docs-md5sum "eb03b8191fc886780411054115866ee2">
|
---|
[10bfa7e0] | 16 | <!ENTITY linux-pam-docs-size "432 KB">
|
---|
[7eaa8018] | 17 | <!--
|
---|
[1ae6204] | 18 | <!ENTITY debian-pam-docs "http://debian.securedservers.com/kernel/pub/linux/libs/pam">
|
---|
[7eaa8018] | 19 | -->
|
---|
[b4b71892] | 20 | ]>
|
---|
| 21 |
|
---|
[6603f8b] | 22 | <sect1 id="linux-pam" xreflabel="Linux-PAM-&linux-pam-version;">
|
---|
| 23 | <?dbhtml filename="linux-pam.html"?>
|
---|
[c7eb655] | 24 |
|
---|
| 25 | <sect1info>
|
---|
| 26 | <othername>$LastChangedBy$</othername>
|
---|
| 27 | <date>$Date$</date>
|
---|
| 28 | </sect1info>
|
---|
| 29 |
|
---|
[6603f8b] | 30 | <title>Linux-PAM-&linux-pam-version;</title>
|
---|
[c7eb655] | 31 |
|
---|
[6603f8b] | 32 | <indexterm zone="linux-pam">
|
---|
| 33 | <primary sortas="a-Linux-PAM">Linux-PAM</primary>
|
---|
[c7eb655] | 34 | </indexterm>
|
---|
| 35 |
|
---|
| 36 | <sect2 role="package">
|
---|
[db248d06] | 37 | <title>Introduction to Linux PAM</title>
|
---|
[c7eb655] | 38 |
|
---|
[db248d06] | 39 | <para>
|
---|
| 40 | The <application>Linux PAM</application> package contains
|
---|
| 41 | Pluggable Authentication Modules used to enable the local
|
---|
| 42 | system administrator to choose how applications authenticate
|
---|
| 43 | users.
|
---|
| 44 | </para>
|
---|
[c7eb655] | 45 |
|
---|
[87351a9] | 46 | &lfs10_checked;
|
---|
[f4797d2] | 47 |
|
---|
[c7eb655] | 48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 49 | <itemizedlist spacing="compact">
|
---|
| 50 | <listitem>
|
---|
[db248d06] | 51 | <para>
|
---|
| 52 | Download (HTTP): <ulink url="&linux-pam-download-http;"/>
|
---|
| 53 | </para>
|
---|
[c7eb655] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[db248d06] | 56 | <para>
|
---|
| 57 | Download (FTP): <ulink url="&linux-pam-download-ftp;"/>
|
---|
| 58 | </para>
|
---|
[c7eb655] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[db248d06] | 61 | <para>
|
---|
| 62 | Download MD5 sum: &linux-pam-md5sum;
|
---|
| 63 | </para>
|
---|
[c7eb655] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[db248d06] | 66 | <para>
|
---|
| 67 | Download size: &linux-pam-size;
|
---|
| 68 | </para>
|
---|
[c7eb655] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[db248d06] | 71 | <para>
|
---|
| 72 | Estimated disk space required: &linux-pam-buildsize;
|
---|
| 73 | </para>
|
---|
[c7eb655] | 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[db248d06] | 76 | <para>
|
---|
| 77 | Estimated build time: &linux-pam-time;
|
---|
| 78 | </para>
|
---|
[c7eb655] | 79 | </listitem>
|
---|
| 80 | </itemizedlist>
|
---|
| 81 |
|
---|
| 82 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[db248d06] | 83 | <itemizedlist spacing="compact">
|
---|
[07f0c976] | 84 | <title>Optional Documentation</title>
|
---|
[c7eb655] | 85 | <listitem>
|
---|
[db248d06] | 86 | <para>
|
---|
| 87 | Download (HTTP): <ulink url="&linux-pam-docs-download;"/>
|
---|
| 88 | </para>
|
---|
[903f671] | 89 | </listitem>
|
---|
| 90 | <listitem>
|
---|
[db248d06] | 91 | <para>
|
---|
| 92 | Download MD5 sum: &linux-pam-docs-md5sum;
|
---|
| 93 | </para>
|
---|
[903f671] | 94 | </listitem>
|
---|
| 95 | <listitem>
|
---|
[db248d06] | 96 | <para>
|
---|
| 97 | Download size &linux-pam-docs-size;
|
---|
| 98 | </para>
|
---|
[6576f3e] | 99 | </listitem>
|
---|
| 100 | </itemizedlist>
|
---|
| 101 |
|
---|
[db248d06] | 102 | <bridgehead renderas="sect3">Linux PAM Dependencies</bridgehead>
|
---|
[c7eb655] | 103 |
|
---|
| 104 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[db248d06] | 105 | <para role="optional">
|
---|
| 106 | <xref linkend="db"/>,
|
---|
[7e11b83c] | 107 | <xref linkend="libnsl"/>,
|
---|
| 108 | <xref linkend="libtirpc"/>,
|
---|
| 109 | <ulink url="https://github.com/linux-audit/audit-userspace">libaudit</ulink>, and
|
---|
[18f18c2] | 110 | <ulink url="http://www.prelude-siem.org">Prelude</ulink>
|
---|
[db248d06] | 111 | </para>
|
---|
| 112 |
|
---|
| 113 | <bridgehead renderas="sect4">Optional (To Rebuild the Documentation)</bridgehead>
|
---|
| 114 | <para role="optional">
|
---|
| 115 | <xref linkend="DocBook"/>,
|
---|
| 116 | <xref linkend="docbook-xsl"/>,
|
---|
| 117 | <xref linkend="fop"/>,
|
---|
[5ffb9f5] | 118 | <xref linkend="libxslt"/> and either
|
---|
[1eac9eb] | 119 | <xref linkend="lynx"/> or
|
---|
| 120 | <ulink url="&w3m-url;">W3m</ulink>
|
---|
[db248d06] | 121 | </para>
|
---|
[c7eb655] | 122 |
|
---|
[58dfbe3] | 123 | <note>
|
---|
| 124 | <para role="required">
|
---|
| 125 | <xref role="runtime" linkend="shadow"/>
|
---|
| 126 | <phrase revision="systemd"> and <xref role="runtime" linkend="systemd"/>
|
---|
| 127 | need</phrase><phrase revision="sysv">needs</phrase> to be reinstalled
|
---|
| 128 | after installing and configuring <application>Linux PAM</application>.
|
---|
| 129 | </para>
|
---|
[19d6c39] | 130 |
|
---|
| 131 | <para role="recommended">
|
---|
| 132 | With Linux-PAM-1.4.0 and higher, the pam_cracklib module is not
|
---|
| 133 | installed by default. To enforce strong passwords, it is recommended
|
---|
| 134 | to use <xref role="runtime" linkend="libpwquality"/>.
|
---|
| 135 | </para>
|
---|
[58dfbe3] | 136 | </note>
|
---|
| 137 |
|
---|
[3597eb6] | 138 | <para condition="html" role="usernotes">User Notes:
|
---|
[db248d06] | 139 | <ulink url="&blfs-wiki;/linux-pam"/>
|
---|
| 140 | </para>
|
---|
[c7eb655] | 141 | </sect2>
|
---|
| 142 |
|
---|
| 143 | <sect2 role="installation">
|
---|
[db248d06] | 144 | <title>Installation of Linux PAM</title>
|
---|
[c7eb655] | 145 |
|
---|
[ad539dbe] | 146 | <para revision="sysv">
|
---|
| 147 | First prevent the installation of an unneeded systemd file:
|
---|
| 148 | </para>
|
---|
| 149 |
|
---|
| 150 | <screen revision="sysv"><userinput>sed -e /service_DATA/d \
|
---|
| 151 | -i modules/pam_namespace/Makefile.am &&
|
---|
| 152 | autoreconf</userinput></screen>
|
---|
| 153 |
|
---|
[db248d06] | 154 | <para>
|
---|
| 155 | If you downloaded the documentation, unpack the tarball by issuing
|
---|
| 156 | the following command.
|
---|
| 157 | </para>
|
---|
[903f671] | 158 |
|
---|
[f330e62] | 159 | <screen><userinput>tar -xf ../Linux-PAM-&linux-pam-docs-version;-docs.tar.xz --strip-components=1</userinput></screen>
|
---|
[ccb8b2d] | 160 |
|
---|
[1eac9eb] | 161 | <para>
|
---|
| 162 | If you instead want to regenerate the documentation, fix the
|
---|
| 163 | <command>configure</command> script so that it detects lynx if installed:
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
[ad539dbe] | 166 | <screen><userinput>sed -e 's/dummy elinks/dummy lynx/' \
|
---|
[1eac9eb] | 167 | -e 's/-no-numbering -no-references/-force-html -nonumbers -stdin/' \
|
---|
| 168 | -i configure</userinput></screen>
|
---|
| 169 |
|
---|
[db248d06] | 170 | <para>
|
---|
| 171 | Install <application>Linux PAM</application> by
|
---|
| 172 | running the following commands:
|
---|
| 173 | </para>
|
---|
[c7eb655] | 174 |
|
---|
[5ffb9f5] | 175 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 176 | --sysconfdir=/etc \
|
---|
| 177 | --libdir=/usr/lib \
|
---|
[5ae7a99] | 178 | --enable-securedir=/lib/security \
|
---|
[7cadfea] | 179 | --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; &&
|
---|
[c7eb655] | 180 | make</userinput></screen>
|
---|
[17fb537e] | 181 |
|
---|
[db248d06] | 182 | <para>
|
---|
[5c6a906] | 183 | To test the results, a suitable <filename>/etc/pam.d/other</filename>
|
---|
| 184 | configuration file must exist.
|
---|
| 185 | </para>
|
---|
| 186 |
|
---|
| 187 | <caution>
|
---|
| 188 | <title>Reinstallation or upgrade of Linux PAM</title>
|
---|
| 189 | <para>
|
---|
| 190 | If you have a system with Linux PAM installed and working, be careful
|
---|
| 191 | when modifying the files in
|
---|
| 192 | <filename class="directory">/etc/pam.d</filename>, since your system
|
---|
| 193 | may become totally unusable. If you want to run the tests, you do not
|
---|
| 194 | need to create another <filename>/etc/pam.d/other</filename> file. The
|
---|
| 195 | installed one can be used for that purpose.
|
---|
| 196 | </para>
|
---|
| 197 |
|
---|
| 198 | <para>
|
---|
| 199 | You should also be aware that <command>make install</command>
|
---|
| 200 | overwrites the configuration files in
|
---|
| 201 | <filename class="directory">/etc/security</filename> as well as
|
---|
[af5d034] | 202 | <filename>/etc/environment</filename>. In case you
|
---|
[7f92f72] | 203 | have modified those files, be sure to back them up.
|
---|
[5c6a906] | 204 | </para>
|
---|
| 205 | </caution>
|
---|
| 206 |
|
---|
| 207 | <para>
|
---|
| 208 | For a first installation, create the configuration file by issuing the
|
---|
| 209 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 210 | user:
|
---|
[db248d06] | 211 | </para>
|
---|
[903f671] | 212 |
|
---|
| 213 | <screen role="root"><userinput>install -v -m755 -d /etc/pam.d &&
|
---|
[c03a8bd] | 214 |
|
---|
[903f671] | 215 | cat > /etc/pam.d/other << "EOF"
|
---|
[51dfb3e] | 216 | <literal>auth required pam_deny.so
|
---|
[903f671] | 217 | account required pam_deny.so
|
---|
| 218 | password required pam_deny.so
|
---|
[51dfb3e] | 219 | session required pam_deny.so</literal>
|
---|
[903f671] | 220 | EOF</userinput></screen>
|
---|
[1ad238d8] | 221 |
|
---|
[db248d06] | 222 | <para>
|
---|
| 223 | Now run the tests by issuing <command>make check</command>.
|
---|
[5c6a906] | 224 | Ensure there are no errors produced by the tests before continuing the
|
---|
[f3429309] | 225 | installation. Note that the checks are quite long. It may be useful to
|
---|
[faee06a] | 226 | redirect the output to a log file in order to inspect it thoroughly.
|
---|
[db248d06] | 227 | </para>
|
---|
[903f671] | 228 |
|
---|
[db248d06] | 229 | <para>
|
---|
[5c6a906] | 230 | Only in case of a first installation, remove the configuration file
|
---|
| 231 | created earlier by issuing the following command as the
|
---|
[db248d06] | 232 | <systemitem class="username">root</systemitem> user:
|
---|
| 233 | </para>
|
---|
[903f671] | 234 |
|
---|
[8d9c3ed] | 235 | <screen role="root"><userinput>rm -fv /etc/pam.d/other</userinput></screen>
|
---|
[f691f2b] | 236 |
|
---|
[db248d06] | 237 | <para>
|
---|
| 238 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 239 | user:
|
---|
| 240 | </para>
|
---|
[17fb537e] | 241 |
|
---|
[c7eb655] | 242 | <screen role="root"><userinput>make install &&
|
---|
[5ae7a99] | 243 | chmod -v 4755 /sbin/unix_chkpwd &&
|
---|
| 244 |
|
---|
| 245 | for file in pam pam_misc pamc
|
---|
| 246 | do
|
---|
| 247 | mv -v /usr/lib/lib${file}.so.* /lib &&
|
---|
| 248 | ln -sfv ../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so
|
---|
| 249 | done</userinput></screen>
|
---|
| 250 |
|
---|
[c7eb655] | 251 | </sect2>
|
---|
[b4b71892] | 252 |
|
---|
[c7eb655] | 253 | <sect2 role="commands">
|
---|
| 254 | <title>Command Explanations</title>
|
---|
[b4b71892] | 255 |
|
---|
[db248d06] | 256 | <para>
|
---|
[5ae7a99] | 257 | <parameter>--enable-securedir=/lib/security</parameter>:
|
---|
[e52afdd] | 258 | This switch sets the installation location for the
|
---|
[5ae7a99] | 259 | <application>PAM</application> modules.
|
---|
| 260 | </para>
|
---|
| 261 |
|
---|
[5ffb9f5] | 262 | <para>
|
---|
[1eac9eb] | 263 | <option>--disable-regenerate-docu</option> : If the needed dependencies
|
---|
| 264 | (<xref linkend="DocBook"/>, <xref linkend="docbook-xsl"/>, <xref
|
---|
| 265 | linkend="libxslt"/>, and <xref linkend="lynx"/> or <ulink
|
---|
| 266 | url="&w3m-url;">W3m</ulink>) are installed, the manual pages, and the
|
---|
| 267 | html and text documentations are (re)generated and installed.
|
---|
| 268 | Furthermore, if <xref linkend="fop"/> is installed, the PDF
|
---|
| 269 | documentation is generated and installed. Use this switch if you do not
|
---|
| 270 | want to rebuild the documentation.
|
---|
[5ffb9f5] | 271 | </para>
|
---|
| 272 |
|
---|
[db248d06] | 273 | <para>
|
---|
[30004ce9] | 274 | <command>chmod -v 4755 /sbin/unix_chkpwd</command>:
|
---|
[db248d06] | 275 | The <command>unix_chkpwd</command> helper program must be setuid
|
---|
| 276 | so that non-<systemitem class="username">root</systemitem>
|
---|
| 277 | processes can access the shadow file.
|
---|
| 278 | </para>
|
---|
| 279 |
|
---|
[c7eb655] | 280 | </sect2>
|
---|
[b4b71892] | 281 |
|
---|
[c7eb655] | 282 | <sect2 role="configuration">
|
---|
| 283 | <title>Configuring Linux-PAM</title>
|
---|
[b4b71892] | 284 |
|
---|
[c7eb655] | 285 | <sect3 id="pam-config">
|
---|
| 286 | <title>Config Files</title>
|
---|
[b4b71892] | 287 |
|
---|
[db248d06] | 288 | <para>
|
---|
| 289 | <filename>/etc/security/*</filename> and
|
---|
| 290 | <filename>/etc/pam.d/*</filename>
|
---|
| 291 | </para>
|
---|
[b4b71892] | 292 |
|
---|
[6603f8b] | 293 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 294 | <primary sortas="e-etc-security">/etc/security/*</primary>
|
---|
| 295 | </indexterm>
|
---|
[b4b71892] | 296 |
|
---|
[6603f8b] | 297 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 298 | <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
|
---|
| 299 | </indexterm>
|
---|
| 300 |
|
---|
| 301 | </sect3>
|
---|
| 302 |
|
---|
| 303 | <sect3>
|
---|
| 304 | <title>Configuration Information</title>
|
---|
| 305 |
|
---|
[db248d06] | 306 | <para>
|
---|
| 307 | Configuration information is placed in
|
---|
| 308 | <filename class="directory">/etc/pam.d/</filename>.
|
---|
| 309 | Below is an example file:
|
---|
| 310 | </para>
|
---|
[c7eb655] | 311 |
|
---|
| 312 | <screen><literal># Begin /etc/pam.d/other
|
---|
[b4b71892] | 313 |
|
---|
| 314 | auth required pam_unix.so nullok
|
---|
| 315 | account required pam_unix.so
|
---|
| 316 | session required pam_unix.so
|
---|
| 317 | password required pam_unix.so nullok
|
---|
| 318 |
|
---|
[db248d06] | 319 | # End /etc/pam.d/other</literal></screen>
|
---|
[b4b71892] | 320 |
|
---|
[47274444] | 321 | <para>
|
---|
[e52afdd] | 322 | Now set up some generic files. As the
|
---|
| 323 | <systemitem class="username">root:</systemitem> user
|
---|
[47274444] | 324 | </para>
|
---|
[78b5501] | 325 |
|
---|
[2ec7beca] | 326 | <screen role="root"><userinput>install -vdm755 /etc/pam.d &&
|
---|
| 327 | cat > /etc/pam.d/system-account << "EOF" &&
|
---|
[78b5501] | 328 | <literal># Begin /etc/pam.d/system-account
|
---|
| 329 |
|
---|
| 330 | account required pam_unix.so
|
---|
| 331 |
|
---|
| 332 | # End /etc/pam.d/system-account</literal>
|
---|
| 333 | EOF
|
---|
| 334 |
|
---|
[2ec7beca] | 335 | cat > /etc/pam.d/system-auth << "EOF" &&
|
---|
[78b5501] | 336 | <literal># Begin /etc/pam.d/system-auth
|
---|
| 337 |
|
---|
| 338 | auth required pam_unix.so
|
---|
| 339 |
|
---|
| 340 | # End /etc/pam.d/system-auth</literal>
|
---|
| 341 | EOF
|
---|
| 342 |
|
---|
| 343 | cat > /etc/pam.d/system-session << "EOF"
|
---|
| 344 | <literal># Begin /etc/pam.d/system-session
|
---|
| 345 |
|
---|
| 346 | session required pam_unix.so
|
---|
| 347 |
|
---|
| 348 | # End /etc/pam.d/system-session</literal>
|
---|
[7e11b83c] | 349 | EOF
|
---|
| 350 | cat > /etc/pam.d/system-password << "EOF"
|
---|
| 351 | <literal># Begin /etc/pam.d/system-password
|
---|
[78b5501] | 352 |
|
---|
[7e11b83c] | 353 | # use sha512 hash for encryption, use shadow, and try to use any previously
|
---|
| 354 | # defined authentication token (chosen password) set by any prior module
|
---|
| 355 | password required pam_unix.so sha512 shadow try_first_pass
|
---|
| 356 |
|
---|
| 357 | # End /etc/pam.d/system-password</literal>
|
---|
| 358 | EOF
|
---|
| 359 | </userinput></screen>
|
---|
| 360 |
|
---|
| 361 | <para>
|
---|
| 362 | If you wish to enable strong password support, install
|
---|
| 363 | <xref linkend="libpwquality"/>, and follow the
|
---|
| 364 | instructions in that page to configure the pam_pwquality
|
---|
| 365 | PAM module with strong password support.
|
---|
| 366 | </para>
|
---|
| 367 |
|
---|
| 368 | <!-- With the removal of the pam_cracklib module, we're supposed to be using
|
---|
| 369 | libpwquality. That already includes instructions in it's configuration
|
---|
| 370 | information page, so we'll use those instead.
|
---|
| 371 |
|
---|
| 372 | Linux-PAM must be installed prior to libpwquality so that PAM support
|
---|
| 373 | is built in, and the PAM module is built.
|
---|
| 374 | -->
|
---|
| 375 | <!--
|
---|
[47274444] | 376 | <para>
|
---|
| 377 | The remaining generic file depends on whether <xref
|
---|
| 378 | linkend="cracklib"/> is installed. If it is installed, use:
|
---|
| 379 | </para>
|
---|
[78b5501] | 380 |
|
---|
| 381 | <screen role="root"><userinput>cat > /etc/pam.d/system-password << "EOF"
|
---|
| 382 | <literal># Begin /etc/pam.d/system-password
|
---|
| 383 |
|
---|
| 384 | # check new passwords for strength (man pam_cracklib)
|
---|
[62066a54] | 385 | password required pam_cracklib.so authtok_type=UNIX retry=1 difok=5 \
|
---|
| 386 | minlen=9 dcredit=1 ucredit=1 \
|
---|
| 387 | lcredit=1 ocredit=1 minclass=0 \
|
---|
[a5660ad] | 388 | maxrepeat=0 maxsequence=0 \
|
---|
[62066a54] | 389 | maxclassrepeat=0 \
|
---|
| 390 | dictpath=/lib/cracklib/pw_dict
|
---|
[78b5501] | 391 | # use sha512 hash for encryption, use shadow, and use the
|
---|
| 392 | # authentication token (chosen password) set by pam_cracklib
|
---|
| 393 | # above (or any previous modules)
|
---|
[62066a54] | 394 | password required pam_unix.so sha512 shadow use_authtok
|
---|
[78b5501] | 395 |
|
---|
| 396 | # End /etc/pam.d/system-password</literal>
|
---|
| 397 | EOF</userinput></screen>
|
---|
[f3429309] | 398 |
|
---|
[47274444] | 399 | <note>
|
---|
| 400 | <para>
|
---|
| 401 | In its default configuration, pam_cracklib will
|
---|
| 402 | allow multiple case passwords as short as 6 characters, even with
|
---|
| 403 | the <parameter>minlen</parameter> value set to 11. You should review
|
---|
| 404 | the pam_cracklib(8) man page and determine if these default values
|
---|
| 405 | are acceptable for the security of your system.
|
---|
| 406 | </para>
|
---|
| 407 | </note>
|
---|
[78b5501] | 408 |
|
---|
[47274444] | 409 | <para>
|
---|
| 410 | If <xref linkend="cracklib"/> is <emphasis>NOT</emphasis> installed,
|
---|
| 411 | use:
|
---|
| 412 | </para>
|
---|
[78b5501] | 413 |
|
---|
[58dfbe3] | 414 | <screen role="nodump"><userinput>cat > /etc/pam.d/system-password << "EOF"
|
---|
[78b5501] | 415 | <literal># Begin /etc/pam.d/system-password
|
---|
| 416 |
|
---|
| 417 | # use sha512 hash for encryption, use shadow, and try to use any previously
|
---|
| 418 | # defined authentication token (chosen password) set by any prior module
|
---|
| 419 | password required pam_unix.so sha512 shadow try_first_pass
|
---|
| 420 |
|
---|
| 421 | # End /etc/pam.d/system-password</literal>
|
---|
[74f20a1] | 422 | EOF</userinput></screen>
|
---|
[7e11b83c] | 423 | -->
|
---|
[47274444] | 424 | <para>
|
---|
| 425 | Now add a restrictive <filename>/etc/pam.d/other</filename>
|
---|
| 426 | configuration file. With this file, programs that are PAM aware will
|
---|
| 427 | not run unless a configuration file specifically for that application
|
---|
| 428 | is created.
|
---|
| 429 | </para>
|
---|
[74f20a1] | 430 |
|
---|
| 431 | <screen role="root"><userinput>cat > /etc/pam.d/other << "EOF"
|
---|
| 432 | <literal># Begin /etc/pam.d/other
|
---|
| 433 |
|
---|
| 434 | auth required pam_warn.so
|
---|
| 435 | auth required pam_deny.so
|
---|
| 436 | account required pam_warn.so
|
---|
| 437 | account required pam_deny.so
|
---|
| 438 | password required pam_warn.so
|
---|
| 439 | password required pam_deny.so
|
---|
| 440 | session required pam_warn.so
|
---|
| 441 | session required pam_deny.so
|
---|
| 442 |
|
---|
| 443 | # End /etc/pam.d/other</literal>
|
---|
[78b5501] | 444 | EOF</userinput></screen>
|
---|
| 445 |
|
---|
[db248d06] | 446 | <para>
|
---|
| 447 | The <application>PAM</application> man page (<command>man
|
---|
| 448 | pam</command>) provides a good starting point for descriptions
|
---|
[47274444] | 449 | of fields and allowable entries. The
|
---|
| 450 | <ulink url="http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html">
|
---|
| 451 | Linux-PAM System Administrators' Guide
|
---|
| 452 | </ulink> is recommended for additional information.
|
---|
[db248d06] | 453 | </para>
|
---|
[47274444] | 454 |
|
---|
[ccb8b2d] | 455 | <important>
|
---|
[db248d06] | 456 | <para>
|
---|
| 457 | You should now reinstall the <xref linkend="shadow"/>
|
---|
[f586237] | 458 | <phrase revision="sysv">package.</phrase>
|
---|
| 459 | <phrase revision="systemd"> and <xref linkend="systemd"/>
|
---|
| 460 | packages.</phrase>
|
---|
[db248d06] | 461 | </para>
|
---|
[ccb8b2d] | 462 | </important>
|
---|
[db248d06] | 463 |
|
---|
[c7eb655] | 464 | </sect3>
|
---|
[db248d06] | 465 |
|
---|
[c7eb655] | 466 | </sect2>
|
---|
| 467 |
|
---|
| 468 | <sect2 role="content">
|
---|
| 469 | <title>Contents</title>
|
---|
| 470 |
|
---|
| 471 | <segmentedlist>
|
---|
[ccb8b2d] | 472 | <segtitle>Installed Program</segtitle>
|
---|
[c7eb655] | 473 | <segtitle>Installed Libraries</segtitle>
|
---|
| 474 | <segtitle>Installed Directories</segtitle>
|
---|
| 475 |
|
---|
| 476 | <seglistitem>
|
---|
[db248d06] | 477 | <seg>
|
---|
[e52afdd] | 478 | faillock, mkhomedir_helper, pam_namespace_helper,
|
---|
| 479 | pam_timestamp_check, pwhistory_helper, unix_chkpwd and
|
---|
[db248d06] | 480 | unix_update
|
---|
| 481 | </seg>
|
---|
| 482 | <seg>
|
---|
| 483 | libpam.so, libpamc.so and libpam_misc.so
|
---|
| 484 | </seg>
|
---|
| 485 | <seg>
|
---|
| 486 | /etc/security,
|
---|
| 487 | /lib/security,
|
---|
| 488 | /usr/include/security and
|
---|
| 489 | /usr/share/doc/Linux-PAM-&linux-pam-version;
|
---|
| 490 | </seg>
|
---|
[c7eb655] | 491 | </seglistitem>
|
---|
| 492 | </segmentedlist>
|
---|
| 493 |
|
---|
| 494 | <variablelist>
|
---|
| 495 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 496 | <?dbfo list-presentation="list"?>
|
---|
| 497 | <?dbhtml list-presentation="table"?>
|
---|
| 498 |
|
---|
[7e11b83c] | 499 | <varlistentry id="faillock">
|
---|
| 500 | <term><command>faillock</command></term>
|
---|
| 501 | <listitem>
|
---|
| 502 | <para>
|
---|
| 503 | displays and modifies the authentication failure record files.
|
---|
| 504 | </para>
|
---|
| 505 | <indexterm zone="linux-pam faillock">
|
---|
| 506 | <primary sortas="b-faillock">faillock</primary>
|
---|
| 507 | </indexterm>
|
---|
| 508 | </listitem>
|
---|
| 509 | </varlistentry>
|
---|
| 510 |
|
---|
[db248d06] | 511 | <varlistentry id="mkhomedir_helper">
|
---|
| 512 | <term><command>mkhomedir_helper</command></term>
|
---|
| 513 | <listitem>
|
---|
| 514 | <para>
|
---|
| 515 | is a helper binary that creates home directories.
|
---|
| 516 | </para>
|
---|
| 517 | <indexterm zone="linux-pam mkhomedir_helper">
|
---|
| 518 | <primary sortas="b-mkhomedir_helper">mkhomedir_helper</primary>
|
---|
| 519 | </indexterm>
|
---|
| 520 | </listitem>
|
---|
| 521 | </varlistentry>
|
---|
| 522 |
|
---|
[e52afdd] | 523 | <varlistentry id="pam_namespace_helper">
|
---|
| 524 | <term><command>pam_namespace_helper</command></term>
|
---|
| 525 | <listitem>
|
---|
| 526 | <para>
|
---|
| 527 | is a helper program used to configure a private namespace for a
|
---|
| 528 | user session.
|
---|
| 529 | </para>
|
---|
| 530 | <indexterm zone="linux-pam pam_namespace_helper">
|
---|
| 531 | <primary sortas="b-pam_namespace_helper">pam_namespace_helper</primary>
|
---|
| 532 | </indexterm>
|
---|
| 533 | </listitem>
|
---|
| 534 | </varlistentry>
|
---|
| 535 |
|
---|
| 536 | <varlistentry id="pwhistory_helper">
|
---|
| 537 | <term><command>pwhistory_helper</command></term>
|
---|
| 538 | <listitem>
|
---|
| 539 | <para>
|
---|
| 540 | is a helper program that transfers password hashes from passwd or
|
---|
| 541 | shadow to opasswd.
|
---|
| 542 | </para>
|
---|
| 543 | <indexterm zone="linux-pam pwhistory_helper">
|
---|
| 544 | <primary sortas="b-pwhistory_helper">pwhistory_helper</primary>
|
---|
| 545 | </indexterm>
|
---|
| 546 | </listitem>
|
---|
| 547 | </varlistentry>
|
---|
[7e11b83c] | 548 | <!-- Removed with the removal of the pam_tally{,2} module
|
---|
[c7eb655] | 549 | <varlistentry id="pam_tally">
|
---|
| 550 | <term><command>pam_tally</command></term>
|
---|
| 551 | <listitem>
|
---|
[db248d06] | 552 | <para>
|
---|
| 553 | is used to interrogate and manipulate the login counter file.
|
---|
| 554 | </para>
|
---|
[6603f8b] | 555 | <indexterm zone="linux-pam pam_tally">
|
---|
[c7eb655] | 556 | <primary sortas="b-pam_tally">pam_tally</primary>
|
---|
| 557 | </indexterm>
|
---|
| 558 | </listitem>
|
---|
| 559 | </varlistentry>
|
---|
| 560 |
|
---|
[db248d06] | 561 | <varlistentry id="pam_tally2">
|
---|
| 562 | <term><command>pam_tally2</command></term>
|
---|
| 563 | <listitem>
|
---|
| 564 | <para>
|
---|
| 565 | is used to interrogate and manipulate the login counter file, but
|
---|
| 566 | does not have some limitations that <command>pam_tally</command>
|
---|
| 567 | does.
|
---|
| 568 | </para>
|
---|
| 569 | <indexterm zone="linux-pam pam_tally2">
|
---|
| 570 | <primary sortas="b-pam_tally2">pam_tally2</primary>
|
---|
| 571 | </indexterm>
|
---|
| 572 | </listitem>
|
---|
| 573 | </varlistentry>
|
---|
[7e11b83c] | 574 | -->
|
---|
[db248d06] | 575 |
|
---|
| 576 | <varlistentry id="pam_timestamp_check">
|
---|
| 577 | <term><command>pam_timestamp_check</command></term>
|
---|
| 578 | <listitem>
|
---|
| 579 | <para>
|
---|
| 580 | is used to check if the default timestamp is valid
|
---|
| 581 | </para>
|
---|
| 582 | <indexterm zone="linux-pam pam_timestamp_check">
|
---|
| 583 | <primary sortas="b-pam_timestamp_check">pam_timestamp_check</primary>
|
---|
| 584 | </indexterm>
|
---|
| 585 | </listitem>
|
---|
| 586 | </varlistentry>
|
---|
| 587 |
|
---|
| 588 | <varlistentry id="unix_chkpwd">
|
---|
| 589 | <term><command>unix_chkpwd</command></term>
|
---|
| 590 | <listitem>
|
---|
| 591 | <para>
|
---|
| 592 | is a helper binary that verifies the password of the current user.
|
---|
| 593 | </para>
|
---|
| 594 | <indexterm zone="linux-pam unix_chkpwd">
|
---|
| 595 | <primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
|
---|
| 596 | </indexterm>
|
---|
| 597 | </listitem>
|
---|
| 598 | </varlistentry>
|
---|
| 599 |
|
---|
| 600 | <varlistentry id="unix_update">
|
---|
| 601 | <term><command>unix_update</command></term>
|
---|
| 602 | <listitem>
|
---|
| 603 | <para>
|
---|
| 604 | is a helper binary that updates the password of a given user.
|
---|
| 605 | </para>
|
---|
| 606 | <indexterm zone="linux-pam unix_update">
|
---|
| 607 | <primary sortas="b-unix_update">unix_update</primary>
|
---|
| 608 | </indexterm>
|
---|
| 609 | </listitem>
|
---|
| 610 | </varlistentry>
|
---|
| 611 |
|
---|
[c7eb655] | 612 | <varlistentry id="libpam">
|
---|
[db248d06] | 613 | <term><filename class="libraryfile">libpam.so</filename></term>
|
---|
[c7eb655] | 614 | <listitem>
|
---|
[db248d06] | 615 | <para>
|
---|
| 616 | provides the interfaces between applications and the
|
---|
| 617 | PAM modules.
|
---|
| 618 | </para>
|
---|
[6603f8b] | 619 | <indexterm zone="linux-pam libpam">
|
---|
[db248d06] | 620 | <primary sortas="c-libpam">libpam.so</primary>
|
---|
[c7eb655] | 621 | </indexterm>
|
---|
| 622 | </listitem>
|
---|
| 623 | </varlistentry>
|
---|
[db248d06] | 624 |
|
---|
[c7eb655] | 625 | </variablelist>
|
---|
[db248d06] | 626 |
|
---|
[c7eb655] | 627 | </sect2>
|
---|
[db248d06] | 628 |
|
---|
[3c52f859] | 629 | </sect1>
|
---|