source: postlfs/security/linux-pam.xml@ 66c4901f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 66c4901f was 66c4901f, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Just tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22697 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.7 KB
RevLine 
[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 " ">
[7eaa8018]9 <!ENTITY linux-pam-md5sum "558ff53b0fc0563ca97f79e911822165">
10 <!ENTITY linux-pam-size "892 MB">
11 <!ENTITY linux-pam-buildsize "26 MB (with tests)">
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">
[7eaa8018]15 <!ENTITY linux-pam-docs-md5sum "1885fae049acd1b699a5459d7c4a0130">
16 <!ENTITY linux-pam-docs-size "449 KB">
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"/>,
107 <xref linkend="cracklib"/>,
108 <xref linkend="libtirpc"/> and
[18f18c2]109 <ulink url="http://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"/>
126 need</phrase><phrase revision="sysv">needs</phrase> to be reinstalled
127 after installing and configuring <application>Linux PAM</application>.
128 </para>
129 </note>
130
[3597eb6]131 <para condition="html" role="usernotes">User Notes:
[db248d06]132 <ulink url="&blfs-wiki;/linux-pam"/>
133 </para>
[c7eb655]134 </sect2>
135
136 <sect2 role="installation">
[db248d06]137 <title>Installation of Linux PAM</title>
[c7eb655]138
[db248d06]139 <para>
140 If you downloaded the documentation, unpack the tarball by issuing
141 the following command.
142 </para>
[903f671]143
[f330e62]144<screen><userinput>tar -xf ../Linux-PAM-&linux-pam-docs-version;-docs.tar.xz --strip-components=1</userinput></screen>
[ccb8b2d]145
[1eac9eb]146 <para>
147 If you instead want to regenerate the documentation, fix the
148 <command>configure</command> script so that it detects lynx if installed:
149 </para>
150
151<screen><userinput>sed -e 's/dummy links/dummy lynx/' \
152 -e 's/-no-numbering -no-references/-force-html -nonumbers -stdin/' \
153 -i configure</userinput></screen>
154
[db248d06]155 <para>
156 Install <application>Linux PAM</application> by
157 running the following commands:
158 </para>
[c7eb655]159
[5ffb9f5]160<screen><userinput>./configure --prefix=/usr \
161 --sysconfdir=/etc \
162 --libdir=/usr/lib \
[5ae7a99]163 --enable-securedir=/lib/security \
[7cadfea]164 --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; &amp;&amp;
[c7eb655]165make</userinput></screen>
[17fb537e]166
[db248d06]167 <para>
[5c6a906]168 To test the results, a suitable <filename>/etc/pam.d/other</filename>
169 configuration file must exist.
170 </para>
171
172 <caution>
173 <title>Reinstallation or upgrade of Linux PAM</title>
174 <para>
175 If you have a system with Linux PAM installed and working, be careful
176 when modifying the files in
177 <filename class="directory">/etc/pam.d</filename>, since your system
178 may become totally unusable. If you want to run the tests, you do not
179 need to create another <filename>/etc/pam.d/other</filename> file. The
180 installed one can be used for that purpose.
181 </para>
182
183 <para>
184 You should also be aware that <command>make install</command>
185 overwrites the configuration files in
186 <filename class="directory">/etc/security</filename> as well as
[af5d034]187 <filename>/etc/environment</filename>. In case you
[7f92f72]188 have modified those files, be sure to back them up.
[5c6a906]189 </para>
190 </caution>
191
192 <para>
193 For a first installation, create the configuration file by issuing the
194 following commands as the <systemitem class="username">root</systemitem>
195 user:
[db248d06]196 </para>
[903f671]197
198<screen role="root"><userinput>install -v -m755 -d /etc/pam.d &amp;&amp;
[c03a8bd]199
[903f671]200cat &gt; /etc/pam.d/other &lt;&lt; "EOF"
[51dfb3e]201<literal>auth required pam_deny.so
[903f671]202account required pam_deny.so
203password required pam_deny.so
[51dfb3e]204session required pam_deny.so</literal>
[903f671]205EOF</userinput></screen>
[1ad238d8]206
[db248d06]207 <para>
208 Now run the tests by issuing <command>make check</command>.
[5c6a906]209 Ensure there are no errors produced by the tests before continuing the
[f3429309]210 installation. Note that the checks are quite long. It may be useful to
[faee06a]211 redirect the output to a log file in order to inspect it thoroughly.
[db248d06]212 </para>
[903f671]213
[db248d06]214 <para>
[5c6a906]215 Only in case of a first installation, remove the configuration file
216 created earlier by issuing the following command as the
[db248d06]217 <systemitem class="username">root</systemitem> user:
218 </para>
[903f671]219
[74f20a1]220<screen role="root"><userinput>rm -fv /etc/pam.d/*</userinput></screen>
[f691f2b]221
[db248d06]222 <para>
223 Now, as the <systemitem class="username">root</systemitem>
224 user:
225 </para>
[17fb537e]226
[c7eb655]227<screen role="root"><userinput>make install &amp;&amp;
[5ae7a99]228chmod -v 4755 /sbin/unix_chkpwd &amp;&amp;
229
230for file in pam pam_misc pamc
231do
232 mv -v /usr/lib/lib${file}.so.* /lib &amp;&amp;
233 ln -sfv ../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so
234done</userinput></screen>
235
[c7eb655]236 </sect2>
[b4b71892]237
[c7eb655]238 <sect2 role="commands">
239 <title>Command Explanations</title>
[b4b71892]240
[db248d06]241 <para>
[5ae7a99]242 <parameter>--enable-securedir=/lib/security</parameter>:
243 This switch sets install location for the
244 <application>PAM</application> modules.
245 </para>
246
[5ffb9f5]247 <para>
[1eac9eb]248 <option>--disable-regenerate-docu</option> : If the needed dependencies
249 (<xref linkend="DocBook"/>, <xref linkend="docbook-xsl"/>, <xref
250 linkend="libxslt"/>, and <xref linkend="lynx"/> or <ulink
251 url="&w3m-url;">W3m</ulink>) are installed, the manual pages, and the
252 html and text documentations are (re)generated and installed.
253 Furthermore, if <xref linkend="fop"/> is installed, the PDF
254 documentation is generated and installed. Use this switch if you do not
255 want to rebuild the documentation.
[5ffb9f5]256 </para>
257
[db248d06]258 <para>
[30004ce9]259 <command>chmod -v 4755 /sbin/unix_chkpwd</command>:
[db248d06]260 The <command>unix_chkpwd</command> helper program must be setuid
261 so that non-<systemitem class="username">root</systemitem>
262 processes can access the shadow file.
263 </para>
264
[c7eb655]265 </sect2>
[b4b71892]266
[c7eb655]267 <sect2 role="configuration">
268 <title>Configuring Linux-PAM</title>
[b4b71892]269
[c7eb655]270 <sect3 id="pam-config">
271 <title>Config Files</title>
[b4b71892]272
[db248d06]273 <para>
274 <filename>/etc/security/*</filename> and
275 <filename>/etc/pam.d/*</filename>
276 </para>
[b4b71892]277
[6603f8b]278 <indexterm zone="linux-pam pam-config">
[c7eb655]279 <primary sortas="e-etc-security">/etc/security/*</primary>
280 </indexterm>
[b4b71892]281
[6603f8b]282 <indexterm zone="linux-pam pam-config">
[c7eb655]283 <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
284 </indexterm>
285
286 </sect3>
287
288 <sect3>
289 <title>Configuration Information</title>
290
[db248d06]291 <para>
292 Configuration information is placed in
293 <filename class="directory">/etc/pam.d/</filename>.
294 Below is an example file:
295 </para>
[c7eb655]296
297<screen><literal># Begin /etc/pam.d/other
[b4b71892]298
299auth required pam_unix.so nullok
300account required pam_unix.so
301session required pam_unix.so
302password required pam_unix.so nullok
303
[db248d06]304# End /etc/pam.d/other</literal></screen>
[b4b71892]305
[78b5501]306 <para>Now set up some generic files. As root:</para>
307
[2ec7beca]308<screen role="root"><userinput>install -vdm755 /etc/pam.d &amp;&amp;
309cat &gt; /etc/pam.d/system-account &lt;&lt; "EOF" &amp;&amp;
[78b5501]310<literal># Begin /etc/pam.d/system-account
311
312account required pam_unix.so
313
314# End /etc/pam.d/system-account</literal>
315EOF
316
[2ec7beca]317cat &gt; /etc/pam.d/system-auth &lt;&lt; "EOF" &amp;&amp;
[78b5501]318<literal># Begin /etc/pam.d/system-auth
319
320auth required pam_unix.so
321
322# End /etc/pam.d/system-auth</literal>
323EOF
324
325cat &gt; /etc/pam.d/system-session &lt;&lt; "EOF"
326<literal># Begin /etc/pam.d/system-session
327
328session required pam_unix.so
329
330# End /etc/pam.d/system-session</literal>
331EOF</userinput></screen>
332
[45db70f]333 <para>The remaining generic file depends on whether <xref linkend="cracklib"/>
[78b5501]334 is installed. If it is installed, use:</para>
335
336<screen role="root"><userinput>cat &gt; /etc/pam.d/system-password &lt;&lt; "EOF"
337<literal># Begin /etc/pam.d/system-password
338
339# check new passwords for strength (man pam_cracklib)
[62066a54]340password required pam_cracklib.so authtok_type=UNIX retry=1 difok=5 \
341 minlen=9 dcredit=1 ucredit=1 \
342 lcredit=1 ocredit=1 minclass=0 \
[a5660ad]343 maxrepeat=0 maxsequence=0 \
[62066a54]344 maxclassrepeat=0 \
345 dictpath=/lib/cracklib/pw_dict
[78b5501]346# use sha512 hash for encryption, use shadow, and use the
347# authentication token (chosen password) set by pam_cracklib
348# above (or any previous modules)
[62066a54]349password required pam_unix.so sha512 shadow use_authtok
[78b5501]350
351# End /etc/pam.d/system-password</literal>
352EOF</userinput></screen>
[f3429309]353
[78b5501]354 <note>
355 <para>
356 In its default configuration, pam_cracklib will
357 allow multiple case passwords as short as 6 characters, even with
358 the <parameter>minlen</parameter> value set to 11. You should review
359 the pam_cracklib(8) man page and determine if these default values
360 are acceptable for the security of your system.
361 </para>
362 </note>
363
[f3429309]364 <para>If <xref linkend="cracklib"/> is <emphasis>NOT</emphasis> installed,
[78b5501]365 use:</para>
366
[58dfbe3]367<screen role="nodump"><userinput>cat &gt; /etc/pam.d/system-password &lt;&lt; "EOF"
[78b5501]368<literal># Begin /etc/pam.d/system-password
369
370# use sha512 hash for encryption, use shadow, and try to use any previously
371# defined authentication token (chosen password) set by any prior module
372password required pam_unix.so sha512 shadow try_first_pass
373
374# End /etc/pam.d/system-password</literal>
[74f20a1]375EOF</userinput></screen>
[f3429309]376
[74f20a1]377 <para>Now add a restrictive <filename>/etc/pam.d/other</filename>
378 configuration file. With this file, programs that are PAM aware will not
379 run unless a configuration file specifically for that application is
380 created.</para>
381
382<screen role="root"><userinput>cat &gt; /etc/pam.d/other &lt;&lt; "EOF"
383<literal># Begin /etc/pam.d/other
384
385auth required pam_warn.so
386auth required pam_deny.so
387account required pam_warn.so
388account required pam_deny.so
389password required pam_warn.so
390password required pam_deny.so
391session required pam_warn.so
392session required pam_deny.so
393
394# End /etc/pam.d/other</literal>
[78b5501]395EOF</userinput></screen>
396
[db248d06]397 <para>
398 The <application>PAM</application> man page (<command>man
399 pam</command>) provides a good starting point for descriptions
400 of fields and allowable entries. The <ulink
[f22f1ef3]401 url="http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_SAG.html">Linux-PAM
[db248d06]402 System Administrators' Guide</ulink> is recommended for additional
403 information.
404 </para>
[7eaa8018]405<!-- No longer there
[db248d06]406 <para>
407 Refer to <ulink url="&debian-pam-docs;/modules.html"/> for a list
408 of various third-party modules available.
409 </para>
[7eaa8018]410-->
[ccb8b2d]411 <important>
[db248d06]412 <para>
413 You should now reinstall the <xref linkend="shadow"/>
[f586237]414 <phrase revision="sysv">package.</phrase>
415 <phrase revision="systemd"> and <xref linkend="systemd"/>
416 packages.</phrase>
[db248d06]417 </para>
[ccb8b2d]418 </important>
[db248d06]419
[c7eb655]420 </sect3>
[db248d06]421
[c7eb655]422 </sect2>
423
424 <sect2 role="content">
425 <title>Contents</title>
426
427 <segmentedlist>
[ccb8b2d]428 <segtitle>Installed Program</segtitle>
[c7eb655]429 <segtitle>Installed Libraries</segtitle>
430 <segtitle>Installed Directories</segtitle>
431
432 <seglistitem>
[db248d06]433 <seg>
434 mkhomedir_helper, pam_tally, pam_tally2,
435 pam_timestamp_check, unix_chkpwd and
436 unix_update
437 </seg>
438 <seg>
439 libpam.so, libpamc.so and libpam_misc.so
440 </seg>
441 <seg>
442 /etc/security,
443 /lib/security,
444 /usr/include/security and
445 /usr/share/doc/Linux-PAM-&linux-pam-version;
446 </seg>
[c7eb655]447 </seglistitem>
448 </segmentedlist>
449
450 <variablelist>
451 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
452 <?dbfo list-presentation="list"?>
453 <?dbhtml list-presentation="table"?>
454
[db248d06]455 <varlistentry id="mkhomedir_helper">
456 <term><command>mkhomedir_helper</command></term>
457 <listitem>
458 <para>
459 is a helper binary that creates home directories.
460 </para>
461 <indexterm zone="linux-pam mkhomedir_helper">
462 <primary sortas="b-mkhomedir_helper">mkhomedir_helper</primary>
463 </indexterm>
464 </listitem>
465 </varlistentry>
466
[c7eb655]467 <varlistentry id="pam_tally">
468 <term><command>pam_tally</command></term>
469 <listitem>
[db248d06]470 <para>
471 is used to interrogate and manipulate the login counter file.
472 </para>
[6603f8b]473 <indexterm zone="linux-pam pam_tally">
[c7eb655]474 <primary sortas="b-pam_tally">pam_tally</primary>
475 </indexterm>
476 </listitem>
477 </varlistentry>
478
[db248d06]479 <varlistentry id="pam_tally2">
480 <term><command>pam_tally2</command></term>
481 <listitem>
482 <para>
483 is used to interrogate and manipulate the login counter file, but
484 does not have some limitations that <command>pam_tally</command>
485 does.
486 </para>
487 <indexterm zone="linux-pam pam_tally2">
488 <primary sortas="b-pam_tally2">pam_tally2</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 <varlistentry id="pam_timestamp_check">
494 <term><command>pam_timestamp_check</command></term>
495 <listitem>
496 <para>
497 is used to check if the default timestamp is valid
498 </para>
499 <indexterm zone="linux-pam pam_timestamp_check">
500 <primary sortas="b-pam_timestamp_check">pam_timestamp_check</primary>
501 </indexterm>
502 </listitem>
503 </varlistentry>
504
505 <varlistentry id="unix_chkpwd">
506 <term><command>unix_chkpwd</command></term>
507 <listitem>
508 <para>
509 is a helper binary that verifies the password of the current user.
510 </para>
511 <indexterm zone="linux-pam unix_chkpwd">
512 <primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="unix_update">
518 <term><command>unix_update</command></term>
519 <listitem>
520 <para>
521 is a helper binary that updates the password of a given user.
522 </para>
523 <indexterm zone="linux-pam unix_update">
524 <primary sortas="b-unix_update">unix_update</primary>
525 </indexterm>
526 </listitem>
527 </varlistentry>
528
[c7eb655]529 <varlistentry id="libpam">
[db248d06]530 <term><filename class="libraryfile">libpam.so</filename></term>
[c7eb655]531 <listitem>
[db248d06]532 <para>
533 provides the interfaces between applications and the
534 PAM modules.
535 </para>
[6603f8b]536 <indexterm zone="linux-pam libpam">
[db248d06]537 <primary sortas="c-libpam">libpam.so</primary>
[c7eb655]538 </indexterm>
539 </listitem>
540 </varlistentry>
[db248d06]541
[c7eb655]542 </variablelist>
[db248d06]543
[c7eb655]544 </sect2>
[db248d06]545
[3c52f859]546</sect1>
Note: See TracBrowser for help on using the repository browser.