source: postlfs/security/linux-pam.xml@ 6869595

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 6869595 was 6869595, checked in by Randy McMurchy <randy@…>, 17 years ago

Modified the Linux-PAM instructions to install the libraries into /lib and then use the 'readlink' command to create the symlinks so that the instructions are not version specific.

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

  • Property mode set to 100644
File size: 11.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY linux-pam-download-http "http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&linux-pam-version;.tar.bz2">
8 <!ENTITY linux-pam-download-ftp "ftp://ftp.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&linux-pam-version;.tar.bz2">
9 <!ENTITY linux-pam-md5sum "385458dfb4633071594e255a6ebec9da">
10 <!ENTITY linux-pam-size "872 KB">
11 <!ENTITY linux-pam-buildsize "18 MB">
12 <!ENTITY linux-pam-time "0.5 SBU">
13 <!ENTITY linux-pam-docs-download "http://www.kernel.org/pub/linux/libs/pam/pre/doc/Linux-PAM-&linux-pam-version;-docs.tar.bz2">
14]>
15
16<sect1 id="linux-pam" xreflabel="Linux-PAM-&linux-pam-version;">
17 <?dbhtml filename="linux-pam.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Linux-PAM-&linux-pam-version;</title>
25
26 <indexterm zone="linux-pam">
27 <primary sortas="a-Linux-PAM">Linux-PAM</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Linux-PAM</title>
32
33 <para>The <application>Linux-PAM</application> package contains
34 Pluggable Authentication Modules. This is useful to enable the
35 local system administrator to choose how applications authenticate
36 users.</para>
37
38 <bridgehead renderas="sect3">Package Information</bridgehead>
39 <itemizedlist spacing="compact">
40 <listitem>
41 <para>Download (HTTP): <ulink url="&linux-pam-download-http;"/></para>
42 </listitem>
43 <listitem>
44 <para>Download (FTP): <ulink url="&linux-pam-download-ftp;"/></para>
45 </listitem>
46 <listitem>
47 <para>Download MD5 sum: &linux-pam-md5sum;</para>
48 </listitem>
49 <listitem>
50 <para>Download size: &linux-pam-size;</para>
51 </listitem>
52 <listitem>
53 <para>Estimated disk space required: &linux-pam-buildsize;</para>
54 </listitem>
55 <listitem>
56 <para>Estimated build time: &linux-pam-time;</para>
57 </listitem>
58 </itemizedlist>
59
60 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
61 <itemizedlist spacing='compact'>
62 <listitem>
63 <para>Optional documentation:
64 <ulink url="&linux-pam-docs-download;"/></para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">Linux-PAM Dependencies</bridgehead>
69
70 <bridgehead renderas="sect4">Optional</bridgehead>
71 <para role="optional"><xref linkend="cracklib"/> and
72 <!-- <xref linkend="db"/> (for the pam_userdb module), -->
73 <ulink url="http://www.prelude-ids.org/">Prelude</ulink></para>
74
75 <bridgehead renderas="sect4">Optional (To {,Re}build the Documentation)</bridgehead>
76 <para role="optional"><xref linkend="libxslt"/>,
77 <xref linkend="DocBook"/>,
78 <xref linkend="docbook-xsl"/>,
79 <xref linkend="w3m"/>, and
80 <xref linkend="fop"/></para>
81
82 <para condition="html" role="usernotes">User Notes:
83 <ulink url="&blfs-wiki;/linux-pam"/></para>
84
85 </sect2>
86
87 <sect2 role="installation">
88 <title>Installation of Linux-PAM</title>
89
90 <para>If you downloaded the documentation, unpack the tarball from the
91 same top-level directory you unpacked the source tarball from. The files
92 will unpack into the correct directories of the source tree.</para>
93
94 <para>Install <application>Linux-PAM</application> by
95 running the following commands:</para>
96
97<screen><userinput>./configure --libdir=/lib \
98 --sbindir=/lib/security \
99 --enable-securedir=/lib/security \
100 --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \
101 --enable-read-both-confs &amp;&amp;
102make</userinput></screen>
103
104 <!-- <para>To test the results, issue <command>make check</command>.</para> -->
105
106 <para>The test suite will not provide meaningful results until the package
107 has been installed and minimally configured. If, after installing the
108 package and creating a minimum configuration as shown below in the 'other'
109 example, you wish to run the tests, issue
110 <command>make check</command>.</para>
111
112 <!-- <tip>
113 <para>Don't delete the <application>Linux-PAM</application> source tree
114 until after you reinstall the <application>Shadow</application> package.
115 The reinstallation of the Shadow package includes much more stringent
116 security for the PAM configuration, and you can run the
117 <application>Linux-PAM</application> test suite after completing the
118 <application>Shadow</application> instructions to test the new setup. All
119 the tests should pass.</para>
120 </tip> -->
121
122 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
123
124<screen role="root"><userinput>make install &amp;&amp;
125chmod -v 4755 /lib/security/unix_chkpwd &amp;&amp;
126
127mv -v /lib/security/pam_tally /sbin &amp;&amp;
128
129mv -v /lib/libpam{,c,_misc}.la /usr/lib &amp;&amp;
130sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &amp;&amp;
131
132for LINK in libpam{,c,_misc}.so; do
133 ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &amp;&amp;
134 rm -v /lib/${LINK}
135done</userinput></screen>
136
137 <!-- <para>If you downloaded the documentation, install it using the following
138 command:</para>
139
140<screen role="root"><userinput>for DOCTYPE in html pdf ps txts
141do
142 cp -v -R doc/$DOCTYPE /usr/share/doc/Linux-PAM-&linux-pam-version;
143done</userinput></screen> -->
144
145 </sect2>
146
147 <sect2 role="commands">
148 <title>Command Explanations</title>
149
150 <para><parameter>--libdir=/lib</parameter>: This parameter results in
151 the libraries being installed in
152 <filename class='directory'>/lib</filename> as they may be required in
153 single-user mode.</para>
154
155 <para><parameter>--sbindir=/lib/security</parameter>: This parameter
156 results in two executables, one of which is not intended to be run from the
157 command line, being installed in the same directory as the PAM modules.
158 The other executable is later moved to the
159 <filename class='directory'>/sbin</filename> directory.</para>
160
161 <para><parameter>--enable-securedir=/lib/security</parameter>: This
162 parameter results in the PAM modules being installed in
163 <filename class='directory'>/lib/security</filename>.</para>
164
165 <para><parameter>--docdir=...</parameter>: This parameter results in
166 the documentation being installed in a versioned directory name.</para>
167
168 <para><parameter>--enable-read-both-confs</parameter>: This parameter
169 allows the local administrator to choose which configuration file setup to
170 use.</para>
171
172 <para><command>chmod -v 4755 /lib/security/unix_chkpwd</command>:
173 The <command>unix_chkpwd</command> password-helper program must be setuid
174 so that non-<systemitem class="username">root</systemitem> processes can
175 access the shadow-password file.</para>
176
177 <para><command>mv -v /lib/security/pam_tally /sbin</command>: The
178 <command>pam_tally</command> program is designed to be run by the system
179 administrator, possibly in single-user mode, so it is moved to the
180 appropriate directory.</para>
181
182 <para><command>mv -v /lib/libpam{,c,_misc}.la /usr/lib</command>: This
183 command moves the <application>Libtool</application> library files to
184 <filename class='directory'>/usr/lib</filename> as they are expected to
185 reside there.</para>
186
187 <para><command>sed -i 's| /lib| /usr/lib|'
188 /usr/lib/libpam_misc.la</command>: This command corrects an installation
189 reference due to the file being moved in the previous step.</para>
190
191 <para><command>for ...; do ...; done</command>: These commands are used
192 to relocate the <filename class='symlink'>.so</filename> files into
193 <filename class='directory'>/usr/lib</filename>. The
194 <command>readlink</command> command is used so that the commands are not
195 specific to the names of the libraries, and will work regardless of the
196 version number extensions of the library names.</para>
197
198 </sect2>
199
200 <sect2 role="configuration">
201 <title>Configuring Linux-PAM</title>
202
203 <sect3 id="pam-config">
204 <title>Config Files</title>
205
206 <para><filename>/etc/security/*</filename> and
207 <filename>/etc/pam.d/*</filename> or
208 <filename>/etc/pam.conf</filename></para>
209
210 <indexterm zone="linux-pam pam-config">
211 <primary sortas="e-etc-security">/etc/security/*</primary>
212 </indexterm>
213
214 <indexterm zone="linux-pam pam-config">
215 <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
216 </indexterm>
217
218 <indexterm zone="linux-pam pam-config">
219 <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
220 </indexterm>
221
222 </sect3>
223
224 <sect3>
225 <title>Configuration Information</title>
226
227 <para>Configuration information is placed in
228 <filename class='directory'>/etc/pam.d/</filename> or
229 <filename>/etc/pam.conf</filename> depending on system administrator
230 preference. Below are example files of each type:</para>
231
232<screen><literal># Begin /etc/pam.d/other
233
234auth required pam_unix.so nullok
235account required pam_unix.so
236session required pam_unix.so
237password required pam_unix.so nullok
238
239# End /etc/pam.d/other
240
241# Begin /etc/pam.conf
242
243other auth required pam_unix.so nullok
244other account required pam_unix.so
245other session required pam_unix.so
246other password required pam_unix.so nullok
247
248# End /etc/pam.conf</literal></screen>
249
250 <para>The <application>PAM</application> man page
251 (<command>man pam</command>) provides a good starting point for
252 descriptions of fields and allowable entries. The <ulink
253 url="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">
254 Linux-PAM System Administrators' Guide</ulink>
255 is recommended for additional information.</para>
256
257 <para>Refer to <ulink
258 url="http://www.kernel.org/pub/linux/libs/pam/modules.html"/>
259 for a list of various modules available.</para>
260
261 <important>
262 <para>You should now reinstall the <xref linkend="shadow"/>
263 package.</para>
264 </important>
265
266 </sect3>
267
268 </sect2>
269
270 <sect2 role="content">
271 <title>Contents</title>
272
273 <segmentedlist>
274 <segtitle>Installed Program</segtitle>
275 <segtitle>Installed Libraries</segtitle>
276 <segtitle>Installed Directories</segtitle>
277
278 <seglistitem>
279 <seg>pam_tally</seg>
280 <seg>libpam.{so,a}, libpamc.{so,a}, and libpam_misc.{so,a}</seg>
281 <seg>/etc/pam.d, /etc/security, /lib/security and
282 /usr/include/security</seg>
283 </seglistitem>
284 </segmentedlist>
285
286 <variablelist>
287 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
288 <?dbfo list-presentation="list"?>
289 <?dbhtml list-presentation="table"?>
290
291 <varlistentry id="pam_tally">
292 <term><command>pam_tally</command></term>
293 <listitem>
294 <para>is used to view or manipulate the <filename>faillog</filename>
295 file.</para>
296 <indexterm zone="linux-pam pam_tally">
297 <primary sortas="b-pam_tally">pam_tally</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="libpam">
303 <term><filename class='libraryfile'>libpam.{so,a}</filename></term>
304 <listitem>
305 <para>provides the interfaces between applications and the
306 PAM modules.</para>
307 <indexterm zone="linux-pam libpam">
308 <primary sortas="c-libpam">libpam.{so,a}</primary>
309 </indexterm>
310 </listitem>
311 </varlistentry>
312
313 </variablelist>
314
315 </sect2>
316
317</sect1>
Note: See TracBrowser for help on using the repository browser.