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