[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[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 " ">
|
---|
[3dcc5df] | 9 | <!ENTITY linux-pam-md5sum "8ad1e72d1ff6480d8e0af658e2d7b768">
|
---|
[3c1cfcf7] | 10 | <!ENTITY linux-pam-size "1.0 MB">
|
---|
[d732663] | 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">
|
---|
[3dcc5df] | 15 | <!ENTITY linux-pam-docs-md5sum "46dc9f9a27ef73a2fbe3b667877e88da">
|
---|
| 16 | <!ENTITY linux-pam-docs-size "455 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 |
|
---|
[d4dc5bae] | 42 | &lfs122_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>
|
---|
[090bbb9] | 93 | Download size: &linux-pam-docs-size;
|
---|
[db248d06] | 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">
|
---|
[7e11b83c] | 102 | <xref linkend="libnsl"/>,
|
---|
[8558044] | 103 | <xref linkend="libtirpc"/>,
|
---|
[3c1cfcf7] | 104 | <xref linkend="rpcsvc-proto"/>,
|
---|
[a105c5c] | 105 | &berkeley-db;,
|
---|
[3c1cfcf7] | 106 | <ulink url="https://github.com/linux-audit/audit-userspace">libaudit</ulink>,
|
---|
| 107 | <ulink url="https://github.com/openSUSE/libeconf">libeconf</ulink>, and
|
---|
[cd29bc9] | 108 | <ulink url="https://www.prelude-siem.org">Prelude</ulink>
|
---|
[db248d06] | 109 | </para>
|
---|
[f8dd4ec] | 110 | <!-- With 1.5.3, building the doc requires the namespaced version of
|
---|
| 111 | docbook-xsl, which is beyond BLFS.
|
---|
[db248d06] | 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>
|
---|
[f8dd4ec] | 122 | -->
|
---|
[58dfbe3] | 123 | <note>
|
---|
| 124 | <para role="required">
|
---|
| 125 | <xref role="runtime" linkend="shadow"/>
|
---|
| 126 | <phrase revision="systemd"> and <xref role="runtime" linkend="systemd"/>
|
---|
[7f70be6] | 127 | must</phrase><phrase revision="sysv">must</phrase> be reinstalled
|
---|
| 128 | and reconfigured
|
---|
[58dfbe3] | 129 | after installing and configuring <application>Linux PAM</application>.
|
---|
| 130 | </para>
|
---|
[19d6c39] | 131 |
|
---|
| 132 | <para role="recommended">
|
---|
| 133 | With Linux-PAM-1.4.0 and higher, the pam_cracklib module is not
|
---|
[7f70be6] | 134 | installed by default. Use <xref role="runtime" linkend="libpwquality"/>
|
---|
| 135 | to enforce strong passwords.
|
---|
[19d6c39] | 136 | </para>
|
---|
[58dfbe3] | 137 | </note>
|
---|
| 138 |
|
---|
[c7eb655] | 139 | </sect2>
|
---|
| 140 |
|
---|
[5150d54] | 141 | <sect2 role="kernel" id="linux-pam-kernel">
|
---|
| 142 | <title>Kernel Configuration</title>
|
---|
| 143 |
|
---|
| 144 | <para>
|
---|
| 145 | For the PAM module <filename
|
---|
| 146 | class='libraryfile'>pam_loginuid.so</filename> (referred by
|
---|
| 147 | the PAM configuration file <filename>system-session</filename> if
|
---|
| 148 | <phrase revision='sysv'><xref linkend='elogind'/> is
|
---|
| 149 | built</phrase><phrase revision='systemd'><xref linkend='systemd'/> is
|
---|
| 150 | rebuilt with PAM support</phrase> later) to work,
|
---|
| 151 | a kernel configuration parameter need to be set or the module will
|
---|
| 152 | just do nothing:
|
---|
| 153 | </para>
|
---|
| 154 |
|
---|
| 155 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 156 | href="linux-pam-kernel.xml"/>
|
---|
| 157 |
|
---|
| 158 | <indexterm zone="linux-pam linux-pam-kernel">
|
---|
| 159 | <primary sortas="d-linux-pam">Linux-PAM</primary>
|
---|
| 160 | </indexterm>
|
---|
| 161 |
|
---|
| 162 | </sect2>
|
---|
| 163 |
|
---|
[c7eb655] | 164 | <sect2 role="installation">
|
---|
[db248d06] | 165 | <title>Installation of Linux PAM</title>
|
---|
[c7eb655] | 166 |
|
---|
[ad539dbe] | 167 | <para revision="sysv">
|
---|
[7f70be6] | 168 | First, prevent the installation of an unneeded systemd file:
|
---|
[ad539dbe] | 169 | </para>
|
---|
| 170 |
|
---|
| 171 | <screen revision="sysv"><userinput>sed -e /service_DATA/d \
|
---|
[2773977] | 172 | -i modules/pam_namespace/Makefile.am</userinput></screen>
|
---|
| 173 |
|
---|
| 174 | <!-- https://github.com/linux-pam/linux-pam/issues/809 -->
|
---|
| 175 | <para>
|
---|
| 176 | The shipped <filename>libtool.m4</filename> file has a configuration
|
---|
| 177 | inconsistent with LFS <filename class='directory'>/usr</filename>
|
---|
| 178 | hierarchy. This issue would cause
|
---|
| 179 | <filename class='libraryfile'>libpam_misc.so</filename> linked with
|
---|
| 180 | an rpath flag which may sometimes cause troubles or even security
|
---|
| 181 | issues. Regenerate the building system to fix the inconsistency:
|
---|
| 182 | </para>
|
---|
| 183 |
|
---|
| 184 | <screen><userinput>autoreconf -fi</userinput></screen>
|
---|
[ad539dbe] | 185 |
|
---|
[db248d06] | 186 | <para>
|
---|
| 187 | If you downloaded the documentation, unpack the tarball by issuing
|
---|
| 188 | the following command.
|
---|
| 189 | </para>
|
---|
[903f671] | 190 |
|
---|
[f330e62] | 191 | <screen><userinput>tar -xf ../Linux-PAM-&linux-pam-docs-version;-docs.tar.xz --strip-components=1</userinput></screen>
|
---|
[f8dd4ec] | 192 | <!--
|
---|
[1eac9eb] | 193 | <para>
|
---|
[7f70be6] | 194 | If you want to regenerate the documentation yourself, fix the
|
---|
| 195 | <command>configure</command> script so it will detect lynx:
|
---|
[1eac9eb] | 196 | </para>
|
---|
| 197 |
|
---|
[ad539dbe] | 198 | <screen><userinput>sed -e 's/dummy elinks/dummy lynx/' \
|
---|
[1eac9eb] | 199 | -e 's/-no-numbering -no-references/-force-html -nonumbers -stdin/' \
|
---|
| 200 | -i configure</userinput></screen>
|
---|
[f8dd4ec] | 201 | -->
|
---|
[db248d06] | 202 | <para>
|
---|
[7f70be6] | 203 | Compile and link <application>Linux PAM</application> by
|
---|
[db248d06] | 204 | running the following commands:
|
---|
| 205 | </para>
|
---|
[c7eb655] | 206 |
|
---|
[2a77179] | 207 | <screen><userinput>./configure --prefix=/usr \
|
---|
[bf1e213] | 208 | --sbindir=/usr/sbin \
|
---|
| 209 | --sysconfdir=/etc \
|
---|
| 210 | --libdir=/usr/lib \
|
---|
| 211 | --enable-securedir=/usr/lib/security \
|
---|
[7cadfea] | 212 | --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; &&
|
---|
[c7eb655] | 213 | make</userinput></screen>
|
---|
[17fb537e] | 214 |
|
---|
[db248d06] | 215 | <para>
|
---|
[5c6a906] | 216 | To test the results, a suitable <filename>/etc/pam.d/other</filename>
|
---|
| 217 | configuration file must exist.
|
---|
| 218 | </para>
|
---|
| 219 |
|
---|
| 220 | <caution>
|
---|
[7f70be6] | 221 | <title>Reinstallation or Upgrade of Linux PAM</title>
|
---|
[5c6a906] | 222 | <para>
|
---|
| 223 | If you have a system with Linux PAM installed and working, be careful
|
---|
| 224 | when modifying the files in
|
---|
| 225 | <filename class="directory">/etc/pam.d</filename>, since your system
|
---|
| 226 | may become totally unusable. If you want to run the tests, you do not
|
---|
| 227 | need to create another <filename>/etc/pam.d/other</filename> file. The
|
---|
[7f70be6] | 228 | existing file can be used for the tests.
|
---|
[5c6a906] | 229 | </para>
|
---|
| 230 |
|
---|
| 231 | <para>
|
---|
| 232 | You should also be aware that <command>make install</command>
|
---|
| 233 | overwrites the configuration files in
|
---|
| 234 | <filename class="directory">/etc/security</filename> as well as
|
---|
[7f70be6] | 235 | <filename>/etc/environment</filename>. If you
|
---|
[7f92f72] | 236 | have modified those files, be sure to back them up.
|
---|
[5c6a906] | 237 | </para>
|
---|
| 238 | </caution>
|
---|
| 239 |
|
---|
| 240 | <para>
|
---|
[7f70be6] | 241 | For a first-time installation, create a configuration file by issuing the
|
---|
[5c6a906] | 242 | following commands as the <systemitem class="username">root</systemitem>
|
---|
| 243 | user:
|
---|
[db248d06] | 244 | </para>
|
---|
[903f671] | 245 |
|
---|
| 246 | <screen role="root"><userinput>install -v -m755 -d /etc/pam.d &&
|
---|
[c03a8bd] | 247 |
|
---|
[903f671] | 248 | cat > /etc/pam.d/other << "EOF"
|
---|
[51dfb3e] | 249 | <literal>auth required pam_deny.so
|
---|
[903f671] | 250 | account required pam_deny.so
|
---|
| 251 | password required pam_deny.so
|
---|
[51dfb3e] | 252 | session required pam_deny.so</literal>
|
---|
[903f671] | 253 | EOF</userinput></screen>
|
---|
[1ad238d8] | 254 |
|
---|
[db248d06] | 255 | <para>
|
---|
| 256 | Now run the tests by issuing <command>make check</command>.
|
---|
[7f70be6] | 257 | Be sure the tests produced no errors before continuing the
|
---|
| 258 | installation. Note that the tests are very long.
|
---|
| 259 | Redirect the output to a log file, so you can inspect it thoroughly.
|
---|
[db248d06] | 260 | </para>
|
---|
[903f671] | 261 |
|
---|
[db248d06] | 262 | <para>
|
---|
[7f70be6] | 263 | For a first-time installation, remove the configuration file
|
---|
[5c6a906] | 264 | created earlier by issuing the following command as the
|
---|
[db248d06] | 265 | <systemitem class="username">root</systemitem> user:
|
---|
| 266 | </para>
|
---|
[903f671] | 267 |
|
---|
[8d9c3ed] | 268 | <screen role="root"><userinput>rm -fv /etc/pam.d/other</userinput></screen>
|
---|
[f691f2b] | 269 |
|
---|
[db248d06] | 270 | <para>
|
---|
| 271 | Now, as the <systemitem class="username">root</systemitem>
|
---|
| 272 | user:
|
---|
| 273 | </para>
|
---|
[17fb537e] | 274 |
|
---|
[c7eb655] | 275 | <screen role="root"><userinput>make install &&
|
---|
[2a77179] | 276 | chmod -v 4755 /usr/sbin/unix_chkpwd</userinput></screen>
|
---|
[5ae7a99] | 277 |
|
---|
[c7eb655] | 278 | </sect2>
|
---|
[b4b71892] | 279 |
|
---|
[c7eb655] | 280 | <sect2 role="commands">
|
---|
| 281 | <title>Command Explanations</title>
|
---|
[b4b71892] | 282 |
|
---|
[db248d06] | 283 | <para>
|
---|
[2a77179] | 284 | <parameter>--enable-securedir=/usr/lib/security</parameter>:
|
---|
[e52afdd] | 285 | This switch sets the installation location for the
|
---|
[5ae7a99] | 286 | <application>PAM</application> modules.
|
---|
| 287 | </para>
|
---|
[caa9f5ba] | 288 | <!--
|
---|
[5ffb9f5] | 289 | <para>
|
---|
[caa9f5ba] | 290 | <option>- -disable-regenerate-docu</option> : If the needed dependencies
|
---|
[1eac9eb] | 291 | (<xref linkend="DocBook"/>, <xref linkend="docbook-xsl"/>, <xref
|
---|
| 292 | linkend="libxslt"/>, and <xref linkend="lynx"/> or <ulink
|
---|
| 293 | url="&w3m-url;">W3m</ulink>) are installed, the manual pages, and the
|
---|
[7f70be6] | 294 | html and text documentation files, are generated and installed.
|
---|
[1eac9eb] | 295 | Furthermore, if <xref linkend="fop"/> is installed, the PDF
|
---|
| 296 | documentation is generated and installed. Use this switch if you do not
|
---|
| 297 | want to rebuild the documentation.
|
---|
[5ffb9f5] | 298 | </para>
|
---|
[caa9f5ba] | 299 | -->
|
---|
[db248d06] | 300 | <para>
|
---|
[2a77179] | 301 | <command>chmod -v 4755 /usr/sbin/unix_chkpwd</command>:
|
---|
[54d58907] | 302 | The setuid bit for the <command>unix_chkpwd</command> helper program must be
|
---|
[7f70be6] | 303 | turned on, so that non-<systemitem class="username">root</systemitem>
|
---|
[db248d06] | 304 | processes can access the shadow file.
|
---|
| 305 | </para>
|
---|
| 306 |
|
---|
[c7eb655] | 307 | </sect2>
|
---|
[b4b71892] | 308 |
|
---|
[c7eb655] | 309 | <sect2 role="configuration">
|
---|
| 310 | <title>Configuring Linux-PAM</title>
|
---|
[b4b71892] | 311 |
|
---|
[c7eb655] | 312 | <sect3 id="pam-config">
|
---|
[7f70be6] | 313 | <title>Configuration Files</title>
|
---|
[b4b71892] | 314 |
|
---|
[db248d06] | 315 | <para>
|
---|
| 316 | <filename>/etc/security/*</filename> and
|
---|
| 317 | <filename>/etc/pam.d/*</filename>
|
---|
| 318 | </para>
|
---|
[b4b71892] | 319 |
|
---|
[6603f8b] | 320 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 321 | <primary sortas="e-etc-security">/etc/security/*</primary>
|
---|
| 322 | </indexterm>
|
---|
[b4b71892] | 323 |
|
---|
[6603f8b] | 324 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 325 | <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
|
---|
| 326 | </indexterm>
|
---|
| 327 |
|
---|
| 328 | </sect3>
|
---|
| 329 |
|
---|
| 330 | <sect3>
|
---|
| 331 | <title>Configuration Information</title>
|
---|
| 332 |
|
---|
[db248d06] | 333 | <para>
|
---|
| 334 | Configuration information is placed in
|
---|
| 335 | <filename class="directory">/etc/pam.d/</filename>.
|
---|
[7f70be6] | 336 | Here is a sample file:
|
---|
[db248d06] | 337 | </para>
|
---|
[c7eb655] | 338 |
|
---|
| 339 | <screen><literal># Begin /etc/pam.d/other
|
---|
[b4b71892] | 340 |
|
---|
| 341 | auth required pam_unix.so nullok
|
---|
| 342 | account required pam_unix.so
|
---|
| 343 | session required pam_unix.so
|
---|
| 344 | password required pam_unix.so nullok
|
---|
| 345 |
|
---|
[db248d06] | 346 | # End /etc/pam.d/other</literal></screen>
|
---|
[b4b71892] | 347 |
|
---|
[47274444] | 348 | <para>
|
---|
[7f70be6] | 349 | Now create some generic configuration files. As the
|
---|
[f43bcd7] | 350 | <systemitem class="username">root</systemitem> user:
|
---|
[47274444] | 351 | </para>
|
---|
[78b5501] | 352 |
|
---|
[2ec7beca] | 353 | <screen role="root"><userinput>install -vdm755 /etc/pam.d &&
|
---|
| 354 | cat > /etc/pam.d/system-account << "EOF" &&
|
---|
[78b5501] | 355 | <literal># Begin /etc/pam.d/system-account
|
---|
| 356 |
|
---|
| 357 | account required pam_unix.so
|
---|
| 358 |
|
---|
| 359 | # End /etc/pam.d/system-account</literal>
|
---|
| 360 | EOF
|
---|
| 361 |
|
---|
[2ec7beca] | 362 | cat > /etc/pam.d/system-auth << "EOF" &&
|
---|
[78b5501] | 363 | <literal># Begin /etc/pam.d/system-auth
|
---|
| 364 |
|
---|
| 365 | auth required pam_unix.so
|
---|
| 366 |
|
---|
| 367 | # End /etc/pam.d/system-auth</literal>
|
---|
| 368 | EOF
|
---|
| 369 |
|
---|
[48dbad5] | 370 | cat > /etc/pam.d/system-session << "EOF" &&
|
---|
[78b5501] | 371 | <literal># Begin /etc/pam.d/system-session
|
---|
| 372 |
|
---|
| 373 | session required pam_unix.so
|
---|
| 374 |
|
---|
| 375 | # End /etc/pam.d/system-session</literal>
|
---|
[7e11b83c] | 376 | EOF
|
---|
[48dbad5] | 377 |
|
---|
[7e11b83c] | 378 | cat > /etc/pam.d/system-password << "EOF"
|
---|
| 379 | <literal># Begin /etc/pam.d/system-password
|
---|
[78b5501] | 380 |
|
---|
[c0464a8] | 381 | # use yescrypt hash for encryption, use shadow, and try to use any
|
---|
| 382 | # previously defined authentication token (chosen password) set by any
|
---|
| 383 | # prior module.
|
---|
| 384 | password required pam_unix.so yescrypt shadow try_first_pass
|
---|
[7e11b83c] | 385 |
|
---|
| 386 | # End /etc/pam.d/system-password</literal>
|
---|
| 387 | EOF
|
---|
| 388 | </userinput></screen>
|
---|
| 389 |
|
---|
| 390 | <para>
|
---|
| 391 | If you wish to enable strong password support, install
|
---|
| 392 | <xref linkend="libpwquality"/>, and follow the
|
---|
[7f70be6] | 393 | instructions on that page to configure the pam_pwquality
|
---|
[7e11b83c] | 394 | PAM module with strong password support.
|
---|
| 395 | </para>
|
---|
| 396 |
|
---|
[47274444] | 397 | <para>
|
---|
[7f70be6] | 398 | Next, add a restrictive <filename>/etc/pam.d/other</filename>
|
---|
[47274444] | 399 | configuration file. With this file, programs that are PAM aware will
|
---|
| 400 | not run unless a configuration file specifically for that application
|
---|
[7f70be6] | 401 | exists.
|
---|
[47274444] | 402 | </para>
|
---|
[74f20a1] | 403 |
|
---|
| 404 | <screen role="root"><userinput>cat > /etc/pam.d/other << "EOF"
|
---|
| 405 | <literal># Begin /etc/pam.d/other
|
---|
| 406 |
|
---|
| 407 | auth required pam_warn.so
|
---|
| 408 | auth required pam_deny.so
|
---|
| 409 | account required pam_warn.so
|
---|
| 410 | account required pam_deny.so
|
---|
| 411 | password required pam_warn.so
|
---|
| 412 | password required pam_deny.so
|
---|
| 413 | session required pam_warn.so
|
---|
| 414 | session required pam_deny.so
|
---|
| 415 |
|
---|
| 416 | # End /etc/pam.d/other</literal>
|
---|
[78b5501] | 417 | EOF</userinput></screen>
|
---|
| 418 |
|
---|
[db248d06] | 419 | <para>
|
---|
| 420 | The <application>PAM</application> man page (<command>man
|
---|
[7f70be6] | 421 | pam</command>) provides a good starting point to learn
|
---|
| 422 | about the several fields, and allowable entries.
|
---|
| 423 | <!-- not accessible 2022-09-08 -->
|
---|
| 424 | <!-- it's available at a different address 2022-10-23-->
|
---|
[cd29bc9] | 425 | The
|
---|
[7f70be6] | 426 | <ulink url="https://www.docs4dev.com/docs/en/linux-pam/1.1.2/reference/Linux-PAM_SAG.html">
|
---|
[47274444] | 427 | Linux-PAM System Administrators' Guide
|
---|
[7f70be6] | 428 | </ulink> is recommended for additional information.
|
---|
[db248d06] | 429 | </para>
|
---|
[47274444] | 430 |
|
---|
[ccb8b2d] | 431 | <important>
|
---|
[db248d06] | 432 | <para>
|
---|
| 433 | You should now reinstall the <xref linkend="shadow"/>
|
---|
[e2453ed5] | 434 | <phrase revision="sysv">package</phrase>
|
---|
[f586237] | 435 | <phrase revision="systemd"> and <xref linkend="systemd"/>
|
---|
[ae2e9fd8] | 436 | packages</phrase>.
|
---|
[db248d06] | 437 | </para>
|
---|
[ccb8b2d] | 438 | </important>
|
---|
[db248d06] | 439 |
|
---|
[c7eb655] | 440 | </sect3>
|
---|
[db248d06] | 441 |
|
---|
[c7eb655] | 442 | </sect2>
|
---|
| 443 |
|
---|
| 444 | <sect2 role="content">
|
---|
| 445 | <title>Contents</title>
|
---|
| 446 |
|
---|
| 447 | <segmentedlist>
|
---|
[ccb8b2d] | 448 | <segtitle>Installed Program</segtitle>
|
---|
[c7eb655] | 449 | <segtitle>Installed Libraries</segtitle>
|
---|
| 450 | <segtitle>Installed Directories</segtitle>
|
---|
| 451 |
|
---|
| 452 | <seglistitem>
|
---|
[db248d06] | 453 | <seg>
|
---|
[e52afdd] | 454 | faillock, mkhomedir_helper, pam_namespace_helper,
|
---|
| 455 | pam_timestamp_check, pwhistory_helper, unix_chkpwd and
|
---|
[db248d06] | 456 | unix_update
|
---|
| 457 | </seg>
|
---|
| 458 | <seg>
|
---|
| 459 | libpam.so, libpamc.so and libpam_misc.so
|
---|
| 460 | </seg>
|
---|
| 461 | <seg>
|
---|
| 462 | /etc/security,
|
---|
[d732663] | 463 | /usr/lib/security,
|
---|
[db248d06] | 464 | /usr/include/security and
|
---|
| 465 | /usr/share/doc/Linux-PAM-&linux-pam-version;
|
---|
| 466 | </seg>
|
---|
[c7eb655] | 467 | </seglistitem>
|
---|
| 468 | </segmentedlist>
|
---|
| 469 |
|
---|
| 470 | <variablelist>
|
---|
| 471 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 472 | <?dbfo list-presentation="list"?>
|
---|
| 473 | <?dbhtml list-presentation="table"?>
|
---|
| 474 |
|
---|
[7e11b83c] | 475 | <varlistentry id="faillock">
|
---|
| 476 | <term><command>faillock</command></term>
|
---|
| 477 | <listitem>
|
---|
| 478 | <para>
|
---|
[4c24eb0a] | 479 | displays and modifies the authentication failure record files
|
---|
[7e11b83c] | 480 | </para>
|
---|
| 481 | <indexterm zone="linux-pam faillock">
|
---|
| 482 | <primary sortas="b-faillock">faillock</primary>
|
---|
| 483 | </indexterm>
|
---|
| 484 | </listitem>
|
---|
| 485 | </varlistentry>
|
---|
| 486 |
|
---|
[db248d06] | 487 | <varlistentry id="mkhomedir_helper">
|
---|
| 488 | <term><command>mkhomedir_helper</command></term>
|
---|
| 489 | <listitem>
|
---|
| 490 | <para>
|
---|
[4c24eb0a] | 491 | is a helper binary that creates home directories
|
---|
[db248d06] | 492 | </para>
|
---|
| 493 | <indexterm zone="linux-pam mkhomedir_helper">
|
---|
| 494 | <primary sortas="b-mkhomedir_helper">mkhomedir_helper</primary>
|
---|
| 495 | </indexterm>
|
---|
| 496 | </listitem>
|
---|
| 497 | </varlistentry>
|
---|
| 498 |
|
---|
[e52afdd] | 499 | <varlistentry id="pam_namespace_helper">
|
---|
| 500 | <term><command>pam_namespace_helper</command></term>
|
---|
| 501 | <listitem>
|
---|
| 502 | <para>
|
---|
| 503 | is a helper program used to configure a private namespace for a
|
---|
[4c24eb0a] | 504 | user session
|
---|
[e52afdd] | 505 | </para>
|
---|
| 506 | <indexterm zone="linux-pam pam_namespace_helper">
|
---|
| 507 | <primary sortas="b-pam_namespace_helper">pam_namespace_helper</primary>
|
---|
| 508 | </indexterm>
|
---|
| 509 | </listitem>
|
---|
| 510 | </varlistentry>
|
---|
| 511 |
|
---|
| 512 | <varlistentry id="pwhistory_helper">
|
---|
| 513 | <term><command>pwhistory_helper</command></term>
|
---|
| 514 | <listitem>
|
---|
| 515 | <para>
|
---|
| 516 | is a helper program that transfers password hashes from passwd or
|
---|
[4c24eb0a] | 517 | shadow to opasswd
|
---|
[e52afdd] | 518 | </para>
|
---|
| 519 | <indexterm zone="linux-pam pwhistory_helper">
|
---|
| 520 | <primary sortas="b-pwhistory_helper">pwhistory_helper</primary>
|
---|
| 521 | </indexterm>
|
---|
| 522 | </listitem>
|
---|
| 523 | </varlistentry>
|
---|
[7e11b83c] | 524 | <!-- Removed with the removal of the pam_tally{,2} module
|
---|
[c7eb655] | 525 | <varlistentry id="pam_tally">
|
---|
| 526 | <term><command>pam_tally</command></term>
|
---|
| 527 | <listitem>
|
---|
[db248d06] | 528 | <para>
|
---|
| 529 | is used to interrogate and manipulate the login counter file.
|
---|
| 530 | </para>
|
---|
[6603f8b] | 531 | <indexterm zone="linux-pam pam_tally">
|
---|
[c7eb655] | 532 | <primary sortas="b-pam_tally">pam_tally</primary>
|
---|
| 533 | </indexterm>
|
---|
| 534 | </listitem>
|
---|
| 535 | </varlistentry>
|
---|
| 536 |
|
---|
[db248d06] | 537 | <varlistentry id="pam_tally2">
|
---|
| 538 | <term><command>pam_tally2</command></term>
|
---|
| 539 | <listitem>
|
---|
| 540 | <para>
|
---|
| 541 | is used to interrogate and manipulate the login counter file, but
|
---|
| 542 | does not have some limitations that <command>pam_tally</command>
|
---|
| 543 | does.
|
---|
| 544 | </para>
|
---|
| 545 | <indexterm zone="linux-pam pam_tally2">
|
---|
| 546 | <primary sortas="b-pam_tally2">pam_tally2</primary>
|
---|
| 547 | </indexterm>
|
---|
| 548 | </listitem>
|
---|
| 549 | </varlistentry>
|
---|
[7e11b83c] | 550 | -->
|
---|
[db248d06] | 551 |
|
---|
| 552 | <varlistentry id="pam_timestamp_check">
|
---|
| 553 | <term><command>pam_timestamp_check</command></term>
|
---|
| 554 | <listitem>
|
---|
| 555 | <para>
|
---|
| 556 | is used to check if the default timestamp is valid
|
---|
| 557 | </para>
|
---|
| 558 | <indexterm zone="linux-pam pam_timestamp_check">
|
---|
| 559 | <primary sortas="b-pam_timestamp_check">pam_timestamp_check</primary>
|
---|
| 560 | </indexterm>
|
---|
| 561 | </listitem>
|
---|
| 562 | </varlistentry>
|
---|
| 563 |
|
---|
| 564 | <varlistentry id="unix_chkpwd">
|
---|
| 565 | <term><command>unix_chkpwd</command></term>
|
---|
| 566 | <listitem>
|
---|
| 567 | <para>
|
---|
[4c24eb0a] | 568 | is a helper binary that verifies the password of the current user
|
---|
[db248d06] | 569 | </para>
|
---|
| 570 | <indexterm zone="linux-pam unix_chkpwd">
|
---|
| 571 | <primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
|
---|
| 572 | </indexterm>
|
---|
| 573 | </listitem>
|
---|
| 574 | </varlistentry>
|
---|
| 575 |
|
---|
| 576 | <varlistentry id="unix_update">
|
---|
| 577 | <term><command>unix_update</command></term>
|
---|
| 578 | <listitem>
|
---|
| 579 | <para>
|
---|
[4c24eb0a] | 580 | is a helper binary that updates the password of a given user
|
---|
[db248d06] | 581 | </para>
|
---|
| 582 | <indexterm zone="linux-pam unix_update">
|
---|
| 583 | <primary sortas="b-unix_update">unix_update</primary>
|
---|
| 584 | </indexterm>
|
---|
| 585 | </listitem>
|
---|
| 586 | </varlistentry>
|
---|
| 587 |
|
---|
[c7eb655] | 588 | <varlistentry id="libpam">
|
---|
[db248d06] | 589 | <term><filename class="libraryfile">libpam.so</filename></term>
|
---|
[c7eb655] | 590 | <listitem>
|
---|
[db248d06] | 591 | <para>
|
---|
| 592 | provides the interfaces between applications and the
|
---|
[4c24eb0a] | 593 | PAM modules
|
---|
[db248d06] | 594 | </para>
|
---|
[6603f8b] | 595 | <indexterm zone="linux-pam libpam">
|
---|
[db248d06] | 596 | <primary sortas="c-libpam">libpam.so</primary>
|
---|
[c7eb655] | 597 | </indexterm>
|
---|
| 598 | </listitem>
|
---|
| 599 | </varlistentry>
|
---|
[db248d06] | 600 |
|
---|
[c7eb655] | 601 | </variablelist>
|
---|
[db248d06] | 602 |
|
---|
[c7eb655] | 603 | </sect2>
|
---|
[db248d06] | 604 |
|
---|
[3c52f859] | 605 | </sect1>
|
---|