[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 " ">
|
---|
[7e11b83c] | 9 | <!ENTITY linux-pam-md5sum "39fca0523bccec6af4b63b5322276c84">
|
---|
| 10 | <!ENTITY linux-pam-size "968 KB">
|
---|
| 11 | <!ENTITY linux-pam-buildsize "37 MB (with tests)">
|
---|
[7eaa8018] | 12 | <!ENTITY linux-pam-time "0.3 SBU (with tests)">
|
---|
| 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">
|
---|
[7e11b83c] | 15 | <!ENTITY linux-pam-docs-md5sum "3440e619ff29074eb977a2ca6e34525a">
|
---|
| 16 | <!ENTITY linux-pam-docs-size "468 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 |
|
---|
[66c4901f] | 46 | &lfs91_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 |
|
---|
[db248d06] | 146 | <para>
|
---|
| 147 | If you downloaded the documentation, unpack the tarball by issuing
|
---|
| 148 | the following command.
|
---|
| 149 | </para>
|
---|
[903f671] | 150 |
|
---|
[f330e62] | 151 | <screen><userinput>tar -xf ../Linux-PAM-&linux-pam-docs-version;-docs.tar.xz --strip-components=1</userinput></screen>
|
---|
[ccb8b2d] | 152 |
|
---|
[1eac9eb] | 153 | <para>
|
---|
| 154 | If you instead want to regenerate the documentation, fix the
|
---|
| 155 | <command>configure</command> script so that it detects lynx if installed:
|
---|
| 156 | </para>
|
---|
| 157 |
|
---|
[7e11b83c] | 158 | <screen><userinput>sed -e 's/dummy elinks/dummy lynx/' \
|
---|
[1eac9eb] | 159 | -e 's/-no-numbering -no-references/-force-html -nonumbers -stdin/' \
|
---|
| 160 | -i configure</userinput></screen>
|
---|
| 161 |
|
---|
[db248d06] | 162 | <para>
|
---|
| 163 | Install <application>Linux PAM</application> by
|
---|
| 164 | running the following commands:
|
---|
| 165 | </para>
|
---|
[c7eb655] | 166 |
|
---|
[5ffb9f5] | 167 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 168 | --sysconfdir=/etc \
|
---|
| 169 | --libdir=/usr/lib \
|
---|
[5ae7a99] | 170 | --enable-securedir=/lib/security \
|
---|
[7cadfea] | 171 | --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; &&
|
---|
[c7eb655] | 172 | make</userinput></screen>
|
---|
[17fb537e] | 173 |
|
---|
[db248d06] | 174 | <para>
|
---|
[5c6a906] | 175 | To test the results, a suitable <filename>/etc/pam.d/other</filename>
|
---|
| 176 | configuration file must exist.
|
---|
| 177 | </para>
|
---|
| 178 |
|
---|
| 179 | <caution>
|
---|
| 180 | <title>Reinstallation or upgrade of Linux PAM</title>
|
---|
| 181 | <para>
|
---|
| 182 | If you have a system with Linux PAM installed and working, be careful
|
---|
| 183 | when modifying the files in
|
---|
| 184 | <filename class="directory">/etc/pam.d</filename>, since your system
|
---|
| 185 | may become totally unusable. If you want to run the tests, you do not
|
---|
| 186 | need to create another <filename>/etc/pam.d/other</filename> file. The
|
---|
| 187 | installed one can be used for that purpose.
|
---|
| 188 | </para>
|
---|
| 189 |
|
---|
| 190 | <para>
|
---|
| 191 | You should also be aware that <command>make install</command>
|
---|
| 192 | overwrites the configuration files in
|
---|
| 193 | <filename class="directory">/etc/security</filename> as well as
|
---|
[af5d034] | 194 | <filename>/etc/environment</filename>. In case you
|
---|
[7f92f72] | 195 | have modified those files, be sure to back them up.
|
---|
[5c6a906] | 196 | </para>
|
---|
| 197 | </caution>
|
---|
| 198 |
|
---|
| 199 | <para>
|
---|
| 200 | For a first installation, create the configuration file by issuing the
|
---|
| 201 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 202 | user:
|
---|
[db248d06] | 203 | </para>
|
---|
[903f671] | 204 |
|
---|
| 205 | <screen role="root"><userinput>install -v -m755 -d /etc/pam.d &&
|
---|
[c03a8bd] | 206 |
|
---|
[903f671] | 207 | cat > /etc/pam.d/other << "EOF"
|
---|
[51dfb3e] | 208 | <literal>auth required pam_deny.so
|
---|
[903f671] | 209 | account required pam_deny.so
|
---|
| 210 | password required pam_deny.so
|
---|
[51dfb3e] | 211 | session required pam_deny.so</literal>
|
---|
[903f671] | 212 | EOF</userinput></screen>
|
---|
[1ad238d8] | 213 |
|
---|
[db248d06] | 214 | <para>
|
---|
| 215 | Now run the tests by issuing <command>make check</command>.
|
---|
[5c6a906] | 216 | Ensure there are no errors produced by the tests before continuing the
|
---|
[f3429309] | 217 | installation. Note that the checks are quite long. It may be useful to
|
---|
[faee06a] | 218 | redirect the output to a log file in order to inspect it thoroughly.
|
---|
[db248d06] | 219 | </para>
|
---|
[903f671] | 220 |
|
---|
[db248d06] | 221 | <para>
|
---|
[5c6a906] | 222 | Only in case of a first installation, remove the configuration file
|
---|
| 223 | created earlier by issuing the following command as the
|
---|
[db248d06] | 224 | <systemitem class="username">root</systemitem> user:
|
---|
| 225 | </para>
|
---|
[903f671] | 226 |
|
---|
[8d9c3ed] | 227 | <screen role="root"><userinput>rm -fv /etc/pam.d/other</userinput></screen>
|
---|
[f691f2b] | 228 |
|
---|
[db248d06] | 229 | <para>
|
---|
| 230 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 231 | user:
|
---|
| 232 | </para>
|
---|
[17fb537e] | 233 |
|
---|
[c7eb655] | 234 | <screen role="root"><userinput>make install &&
|
---|
[5ae7a99] | 235 | chmod -v 4755 /sbin/unix_chkpwd &&
|
---|
| 236 |
|
---|
| 237 | for file in pam pam_misc pamc
|
---|
| 238 | do
|
---|
| 239 | mv -v /usr/lib/lib${file}.so.* /lib &&
|
---|
| 240 | ln -sfv ../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so
|
---|
| 241 | done</userinput></screen>
|
---|
| 242 |
|
---|
[c7eb655] | 243 | </sect2>
|
---|
[b4b71892] | 244 |
|
---|
[c7eb655] | 245 | <sect2 role="commands">
|
---|
| 246 | <title>Command Explanations</title>
|
---|
[b4b71892] | 247 |
|
---|
[db248d06] | 248 | <para>
|
---|
[5ae7a99] | 249 | <parameter>--enable-securedir=/lib/security</parameter>:
|
---|
| 250 | This switch sets install location for the
|
---|
| 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
|
---|
| 259 | html and text documentations are (re)generated and installed.
|
---|
| 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>
|
---|
[30004ce9] | 266 | <command>chmod -v 4755 /sbin/unix_chkpwd</command>:
|
---|
[db248d06] | 267 | The <command>unix_chkpwd</command> helper program must be setuid
|
---|
| 268 | so that non-<systemitem class="username">root</systemitem>
|
---|
| 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">
|
---|
| 278 | <title>Config 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>.
|
---|
| 301 | Below is an example file:
|
---|
| 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>
|
---|
| 314 | Now set up some generic files. As root:
|
---|
| 315 | </para>
|
---|
[78b5501] | 316 |
|
---|
[2ec7beca] | 317 | <screen role="root"><userinput>install -vdm755 /etc/pam.d &&
|
---|
| 318 | cat > /etc/pam.d/system-account << "EOF" &&
|
---|
[78b5501] | 319 | <literal># Begin /etc/pam.d/system-account
|
---|
| 320 |
|
---|
| 321 | account required pam_unix.so
|
---|
| 322 |
|
---|
| 323 | # End /etc/pam.d/system-account</literal>
|
---|
| 324 | EOF
|
---|
| 325 |
|
---|
[2ec7beca] | 326 | cat > /etc/pam.d/system-auth << "EOF" &&
|
---|
[78b5501] | 327 | <literal># Begin /etc/pam.d/system-auth
|
---|
| 328 |
|
---|
| 329 | auth required pam_unix.so
|
---|
| 330 |
|
---|
| 331 | # End /etc/pam.d/system-auth</literal>
|
---|
| 332 | EOF
|
---|
| 333 |
|
---|
| 334 | cat > /etc/pam.d/system-session << "EOF"
|
---|
| 335 | <literal># Begin /etc/pam.d/system-session
|
---|
| 336 |
|
---|
| 337 | session required pam_unix.so
|
---|
| 338 |
|
---|
| 339 | # End /etc/pam.d/system-session</literal>
|
---|
[7e11b83c] | 340 | EOF
|
---|
| 341 | cat > /etc/pam.d/system-password << "EOF"
|
---|
| 342 | <literal># Begin /etc/pam.d/system-password
|
---|
[78b5501] | 343 |
|
---|
[7e11b83c] | 344 | # use sha512 hash for encryption, use shadow, and try to use any previously
|
---|
| 345 | # defined authentication token (chosen password) set by any prior module
|
---|
| 346 | password required pam_unix.so sha512 shadow try_first_pass
|
---|
| 347 |
|
---|
| 348 | # End /etc/pam.d/system-password</literal>
|
---|
| 349 | EOF
|
---|
| 350 | </userinput></screen>
|
---|
| 351 |
|
---|
| 352 | <para>
|
---|
| 353 | If you wish to enable strong password support, install
|
---|
| 354 | <xref linkend="libpwquality"/>, and follow the
|
---|
| 355 | instructions in that page to configure the pam_pwquality
|
---|
| 356 | PAM module with strong password support.
|
---|
| 357 | </para>
|
---|
| 358 |
|
---|
| 359 | <!-- With the removal of the pam_cracklib module, we're supposed to be using
|
---|
| 360 | libpwquality. That already includes instructions in it's configuration
|
---|
| 361 | information page, so we'll use those instead.
|
---|
| 362 |
|
---|
| 363 | Linux-PAM must be installed prior to libpwquality so that PAM support
|
---|
| 364 | is built in, and the PAM module is built.
|
---|
| 365 | -->
|
---|
| 366 | <!--
|
---|
[47274444] | 367 | <para>
|
---|
| 368 | The remaining generic file depends on whether <xref
|
---|
| 369 | linkend="cracklib"/> is installed. If it is installed, use:
|
---|
| 370 | </para>
|
---|
[78b5501] | 371 |
|
---|
| 372 | <screen role="root"><userinput>cat > /etc/pam.d/system-password << "EOF"
|
---|
| 373 | <literal># Begin /etc/pam.d/system-password
|
---|
| 374 |
|
---|
| 375 | # check new passwords for strength (man pam_cracklib)
|
---|
[62066a54] | 376 | password required pam_cracklib.so authtok_type=UNIX retry=1 difok=5 \
|
---|
| 377 | minlen=9 dcredit=1 ucredit=1 \
|
---|
| 378 | lcredit=1 ocredit=1 minclass=0 \
|
---|
[a5660ad] | 379 | maxrepeat=0 maxsequence=0 \
|
---|
[62066a54] | 380 | maxclassrepeat=0 \
|
---|
| 381 | dictpath=/lib/cracklib/pw_dict
|
---|
[78b5501] | 382 | # use sha512 hash for encryption, use shadow, and use the
|
---|
| 383 | # authentication token (chosen password) set by pam_cracklib
|
---|
| 384 | # above (or any previous modules)
|
---|
[62066a54] | 385 | password required pam_unix.so sha512 shadow use_authtok
|
---|
[78b5501] | 386 |
|
---|
| 387 | # End /etc/pam.d/system-password</literal>
|
---|
| 388 | EOF</userinput></screen>
|
---|
[f3429309] | 389 |
|
---|
[47274444] | 390 | <note>
|
---|
| 391 | <para>
|
---|
| 392 | In its default configuration, pam_cracklib will
|
---|
| 393 | allow multiple case passwords as short as 6 characters, even with
|
---|
| 394 | the <parameter>minlen</parameter> value set to 11. You should review
|
---|
| 395 | the pam_cracklib(8) man page and determine if these default values
|
---|
| 396 | are acceptable for the security of your system.
|
---|
| 397 | </para>
|
---|
| 398 | </note>
|
---|
[78b5501] | 399 |
|
---|
[47274444] | 400 | <para>
|
---|
| 401 | If <xref linkend="cracklib"/> is <emphasis>NOT</emphasis> installed,
|
---|
| 402 | use:
|
---|
| 403 | </para>
|
---|
[78b5501] | 404 |
|
---|
[58dfbe3] | 405 | <screen role="nodump"><userinput>cat > /etc/pam.d/system-password << "EOF"
|
---|
[78b5501] | 406 | <literal># Begin /etc/pam.d/system-password
|
---|
| 407 |
|
---|
| 408 | # use sha512 hash for encryption, use shadow, and try to use any previously
|
---|
| 409 | # defined authentication token (chosen password) set by any prior module
|
---|
| 410 | password required pam_unix.so sha512 shadow try_first_pass
|
---|
| 411 |
|
---|
| 412 | # End /etc/pam.d/system-password</literal>
|
---|
[74f20a1] | 413 | EOF</userinput></screen>
|
---|
[7e11b83c] | 414 | -->
|
---|
[47274444] | 415 | <para>
|
---|
| 416 | Now add a restrictive <filename>/etc/pam.d/other</filename>
|
---|
| 417 | configuration file. With this file, programs that are PAM aware will
|
---|
| 418 | not run unless a configuration file specifically for that application
|
---|
| 419 | is created.
|
---|
| 420 | </para>
|
---|
[74f20a1] | 421 |
|
---|
| 422 | <screen role="root"><userinput>cat > /etc/pam.d/other << "EOF"
|
---|
| 423 | <literal># Begin /etc/pam.d/other
|
---|
| 424 |
|
---|
| 425 | auth required pam_warn.so
|
---|
| 426 | auth required pam_deny.so
|
---|
| 427 | account required pam_warn.so
|
---|
| 428 | account required pam_deny.so
|
---|
| 429 | password required pam_warn.so
|
---|
| 430 | password required pam_deny.so
|
---|
| 431 | session required pam_warn.so
|
---|
| 432 | session required pam_deny.so
|
---|
| 433 |
|
---|
| 434 | # End /etc/pam.d/other</literal>
|
---|
[78b5501] | 435 | EOF</userinput></screen>
|
---|
| 436 |
|
---|
[db248d06] | 437 | <para>
|
---|
| 438 | The <application>PAM</application> man page (<command>man
|
---|
| 439 | pam</command>) provides a good starting point for descriptions
|
---|
[47274444] | 440 | of fields and allowable entries. The
|
---|
| 441 | <ulink url="http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html">
|
---|
| 442 | Linux-PAM System Administrators' Guide
|
---|
| 443 | </ulink> is recommended for additional information.
|
---|
[db248d06] | 444 | </para>
|
---|
[47274444] | 445 |
|
---|
[ccb8b2d] | 446 | <important>
|
---|
[db248d06] | 447 | <para>
|
---|
| 448 | You should now reinstall the <xref linkend="shadow"/>
|
---|
[f586237] | 449 | <phrase revision="sysv">package.</phrase>
|
---|
| 450 | <phrase revision="systemd"> and <xref linkend="systemd"/>
|
---|
| 451 | packages.</phrase>
|
---|
[db248d06] | 452 | </para>
|
---|
[ccb8b2d] | 453 | </important>
|
---|
[db248d06] | 454 |
|
---|
[c7eb655] | 455 | </sect3>
|
---|
[db248d06] | 456 |
|
---|
[c7eb655] | 457 | </sect2>
|
---|
| 458 |
|
---|
| 459 | <sect2 role="content">
|
---|
| 460 | <title>Contents</title>
|
---|
| 461 |
|
---|
| 462 | <segmentedlist>
|
---|
[ccb8b2d] | 463 | <segtitle>Installed Program</segtitle>
|
---|
[c7eb655] | 464 | <segtitle>Installed Libraries</segtitle>
|
---|
| 465 | <segtitle>Installed Directories</segtitle>
|
---|
| 466 |
|
---|
| 467 | <seglistitem>
|
---|
[db248d06] | 468 | <seg>
|
---|
[7e11b83c] | 469 | faillock, mkhomedir_helper,
|
---|
[db248d06] | 470 | pam_timestamp_check, unix_chkpwd and
|
---|
| 471 | unix_update
|
---|
| 472 | </seg>
|
---|
| 473 | <seg>
|
---|
| 474 | libpam.so, libpamc.so and libpam_misc.so
|
---|
| 475 | </seg>
|
---|
| 476 | <seg>
|
---|
| 477 | /etc/security,
|
---|
| 478 | /lib/security,
|
---|
| 479 | /usr/include/security and
|
---|
| 480 | /usr/share/doc/Linux-PAM-&linux-pam-version;
|
---|
| 481 | </seg>
|
---|
[c7eb655] | 482 | </seglistitem>
|
---|
| 483 | </segmentedlist>
|
---|
| 484 |
|
---|
| 485 | <variablelist>
|
---|
| 486 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 487 | <?dbfo list-presentation="list"?>
|
---|
| 488 | <?dbhtml list-presentation="table"?>
|
---|
| 489 |
|
---|
[7e11b83c] | 490 | <varlistentry id="faillock">
|
---|
| 491 | <term><command>faillock</command></term>
|
---|
| 492 | <listitem>
|
---|
| 493 | <para>
|
---|
| 494 | displays and modifies the authentication failure record files.
|
---|
| 495 | </para>
|
---|
| 496 | <indexterm zone="linux-pam faillock">
|
---|
| 497 | <primary sortas="b-faillock">faillock</primary>
|
---|
| 498 | </indexterm>
|
---|
| 499 | </listitem>
|
---|
| 500 | </varlistentry>
|
---|
| 501 |
|
---|
[db248d06] | 502 | <varlistentry id="mkhomedir_helper">
|
---|
| 503 | <term><command>mkhomedir_helper</command></term>
|
---|
| 504 | <listitem>
|
---|
| 505 | <para>
|
---|
| 506 | is a helper binary that creates home directories.
|
---|
| 507 | </para>
|
---|
| 508 | <indexterm zone="linux-pam mkhomedir_helper">
|
---|
| 509 | <primary sortas="b-mkhomedir_helper">mkhomedir_helper</primary>
|
---|
| 510 | </indexterm>
|
---|
| 511 | </listitem>
|
---|
| 512 | </varlistentry>
|
---|
| 513 |
|
---|
[7e11b83c] | 514 | <!-- Removed with the removal of the pam_tally{,2} module
|
---|
[c7eb655] | 515 | <varlistentry id="pam_tally">
|
---|
| 516 | <term><command>pam_tally</command></term>
|
---|
| 517 | <listitem>
|
---|
[db248d06] | 518 | <para>
|
---|
| 519 | is used to interrogate and manipulate the login counter file.
|
---|
| 520 | </para>
|
---|
[6603f8b] | 521 | <indexterm zone="linux-pam pam_tally">
|
---|
[c7eb655] | 522 | <primary sortas="b-pam_tally">pam_tally</primary>
|
---|
| 523 | </indexterm>
|
---|
| 524 | </listitem>
|
---|
| 525 | </varlistentry>
|
---|
| 526 |
|
---|
[db248d06] | 527 | <varlistentry id="pam_tally2">
|
---|
| 528 | <term><command>pam_tally2</command></term>
|
---|
| 529 | <listitem>
|
---|
| 530 | <para>
|
---|
| 531 | is used to interrogate and manipulate the login counter file, but
|
---|
| 532 | does not have some limitations that <command>pam_tally</command>
|
---|
| 533 | does.
|
---|
| 534 | </para>
|
---|
| 535 | <indexterm zone="linux-pam pam_tally2">
|
---|
| 536 | <primary sortas="b-pam_tally2">pam_tally2</primary>
|
---|
| 537 | </indexterm>
|
---|
| 538 | </listitem>
|
---|
| 539 | </varlistentry>
|
---|
[7e11b83c] | 540 | -->
|
---|
[db248d06] | 541 |
|
---|
| 542 | <varlistentry id="pam_timestamp_check">
|
---|
| 543 | <term><command>pam_timestamp_check</command></term>
|
---|
| 544 | <listitem>
|
---|
| 545 | <para>
|
---|
| 546 | is used to check if the default timestamp is valid
|
---|
| 547 | </para>
|
---|
| 548 | <indexterm zone="linux-pam pam_timestamp_check">
|
---|
| 549 | <primary sortas="b-pam_timestamp_check">pam_timestamp_check</primary>
|
---|
| 550 | </indexterm>
|
---|
| 551 | </listitem>
|
---|
| 552 | </varlistentry>
|
---|
| 553 |
|
---|
| 554 | <varlistentry id="unix_chkpwd">
|
---|
| 555 | <term><command>unix_chkpwd</command></term>
|
---|
| 556 | <listitem>
|
---|
| 557 | <para>
|
---|
| 558 | is a helper binary that verifies the password of the current user.
|
---|
| 559 | </para>
|
---|
| 560 | <indexterm zone="linux-pam unix_chkpwd">
|
---|
| 561 | <primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
|
---|
| 562 | </indexterm>
|
---|
| 563 | </listitem>
|
---|
| 564 | </varlistentry>
|
---|
| 565 |
|
---|
| 566 | <varlistentry id="unix_update">
|
---|
| 567 | <term><command>unix_update</command></term>
|
---|
| 568 | <listitem>
|
---|
| 569 | <para>
|
---|
| 570 | is a helper binary that updates the password of a given user.
|
---|
| 571 | </para>
|
---|
| 572 | <indexterm zone="linux-pam unix_update">
|
---|
| 573 | <primary sortas="b-unix_update">unix_update</primary>
|
---|
| 574 | </indexterm>
|
---|
| 575 | </listitem>
|
---|
| 576 | </varlistentry>
|
---|
| 577 |
|
---|
[c7eb655] | 578 | <varlistentry id="libpam">
|
---|
[db248d06] | 579 | <term><filename class="libraryfile">libpam.so</filename></term>
|
---|
[c7eb655] | 580 | <listitem>
|
---|
[db248d06] | 581 | <para>
|
---|
| 582 | provides the interfaces between applications and the
|
---|
| 583 | PAM modules.
|
---|
| 584 | </para>
|
---|
[6603f8b] | 585 | <indexterm zone="linux-pam libpam">
|
---|
[db248d06] | 586 | <primary sortas="c-libpam">libpam.so</primary>
|
---|
[c7eb655] | 587 | </indexterm>
|
---|
| 588 | </listitem>
|
---|
| 589 | </varlistentry>
|
---|
[db248d06] | 590 |
|
---|
[c7eb655] | 591 | </variablelist>
|
---|
[db248d06] | 592 |
|
---|
[c7eb655] | 593 | </sect2>
|
---|
[db248d06] | 594 |
|
---|
[3c52f859] | 595 | </sect1>
|
---|