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