source: postlfs/security/linux-pam.xml@ 5ee8882

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 5ee8882 was a63de0c, checked in by DJ Lucas <dj@…>, 16 years ago

Removed X Window dependency for Linux-PAM.

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

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