glfs/postlfs/security/linux_pam.xml
DJ Lucas 082753eedc Minor change to LinuxPAM, thanks Randy
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4773 af4574ff-66df-0310-9fd7-8a98e5e911e0
2005-07-25 00:13:35 +00:00

280 lines
9.8 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY Linux_PAM-download-http "http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&Linux_PAM-version;.tar.bz2">
<!ENTITY Linux_PAM-download-ftp "ftp://ftp.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&Linux_PAM-version;.tar.bz2">
<!ENTITY Linux_PAM-md5sum "ccff87fe639efdfc22b1ba4a0f08ec57">
<!ENTITY Linux_PAM-size "376 KB">
<!ENTITY Linux_PAM-buildsize "8.6 MB">
<!ENTITY Linux_PAM-time "0.15 SBU">
]>
<sect1 id="Linux_PAM" xreflabel="Linux-PAM-&Linux_PAM-version;">
<?dbhtml filename="linux_pam.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Linux-PAM-&Linux_PAM-version;</title>
<indexterm zone="Linux_PAM">
<primary sortas="a-PAM_linux">PAM(Linux)</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Linux-PAM</title>
<para>The <application>Linux-PAM</application> package contains
Pluggable Authentication Modules. This is useful to enable the
local system administrator to choose how applications authenticate
users.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&Linux_PAM-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&Linux_PAM-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &Linux_PAM-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &Linux_PAM-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &Linux_PAM-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &Linux_PAM-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing='compact'>
<title>Documentation</title>
<listitem>
<para>Optional documentation: <ulink
url="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-&Linux_PAM-version;-docs.tar.bz2"/>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Linux-PAM Dependencies</bridgehead>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para><xref linkend="cracklib"/></para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para><ulink
url="http://sourceforge.net/projects/sgmltools-lite/">sgmltools-lite</ulink>
and <xref linkend="db"/> (for pam_userdb module)</para>
</sect2>
<sect2 role="installation">
<title>Installation of Linux-PAM</title>
<para>Install <application>Linux-PAM</application> by
running the following commands:</para>
<screen><userinput>sed -i 's@DICT_DIR_CANDIDATES="@DICT_DIR_CANDIDATES="/lib /lib/cracklib @' \
configure &amp;&amp;
./configure --enable-static-libpam --with-mailspool=/var/mail \
--enable-read-both-confs --sysconfdir=/etc \
--mandir=/usr/share/man &amp;&amp;
make</userinput></screen>
<para>If you downloaded the documentation and wish to install it, unpack the
tarball into the <filename class='directory'>doc</filename> directory:</para>
<screen><userinput>tar -jxf ../Linux-PAM-&Linux_PAM-version;-docs.tar.bz2 -C doc</userinput></screen>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
mv -v /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a /usr/lib &amp;&amp;
rm -v /lib/libpam{,c,_misc}.so &amp;&amp;
ln -v -sf ../../lib/libpam.so.&Linux_PAM-version; /usr/lib/libpam.so &amp;&amp;
ln -v -sf ../../lib/libpam_misc.so.&Linux_PAM-version; /usr/lib/libpam_misc.so &amp;&amp;
ln -v -sf ../../lib/libpamc.so.&Linux_PAM-version; /usr/lib/libpamc.so</userinput></screen>
<para>Install the documentation using the following commands:</para>
<screen role="root"><userinput>install -v -d -m755 /usr/share/doc/Linux-PAM-&Linux_PAM-version; &amp;&amp;
for DOCTYPE in html ps specs txts
do
cp -v -R doc/$DOCTYPE /usr/share/doc/Linux-PAM-&Linux_PAM-version;
done</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><command>sed -i 's@CANDIDATES="@CANDIDATES="/lib
/lib/cracklib @' configure.in</command>: This command
changes where configure looks to find the cracklib_dict.</para>
<para><command>autoconf</command>: This is necessary because the
sed changes where PAM looks for the <application>cracklib</application>
libraries, requiring regeneration of the configure script.</para>
<para><parameter>--enable-static-libpam</parameter>: This switch builds
static PAM libraries as well as the dynamic libraries.</para>
<para><parameter>--with-mailspool=/var/mail</parameter>: This switch
makes the mailspool directory FHS compliant.</para>
<para><parameter>--enable-read-both-confs</parameter>: This switch lets
the local administrator choose which configuration file setup to use.</para>
<para><command>mv -v /lib/libpam.a /lib/libpam_misc.a /lib/libpamc.a
/usr/lib</command>: This command moves the static libraries to
<filename class='directory'>/usr/lib</filename> to comply with FHS
guidelines.</para>
<para><command>rm -v /lib/libpam{,c,_misc}.so; ln -v -sf ...
/usr/lib/...</command>: These commands move the
<filename class='symlink'>.so</filename> symlinks from
<filename class='directory'>/lib</filename> to
<filename class='directory'>/usr/lib</filename>.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Linux-PAM</title>
<sect3 id="pam-config">
<title>Config Files</title>
<para><filename>/etc/security/*</filename> and
<filename>/etc/pam.d/*</filename> or
<filename>/etc/pam.conf</filename></para>
<indexterm zone="Linux_PAM pam-config">
<primary sortas="e-etc-security">/etc/security/*</primary>
</indexterm>
<indexterm zone="Linux_PAM pam-config">
<primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
</indexterm>
<indexterm zone="Linux_PAM pam-config">
<primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
</indexterm>
</sect3>
<sect3>
<title>Configuration Information</title>
<para>Configuration information is placed in
<filename class='directory'>/etc/pam.d/</filename> or
<filename>/etc/pam.conf</filename> depending on user preference.
Below are example files of each type:</para>
<screen><literal># Begin /etc/pam.d/other
auth required pam_unix.so nullok
account required pam_unix.so
session required pam_unix.so
password required pam_unix.so nullok
# End /etc/pam.d/other
# Begin /etc/pam.conf
other auth required pam_unix.so nullok
other account required pam_unix.so
other session required pam_unix.so
other password required pam_unix.so nullok
# End /etc/pam.conf</literal></screen>
<para>The <application>PAM</application> man page
(<command>man pam</command>) provides a good starting point for
descriptions of fields and allowable entries. The <ulink
url="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html">
Linux-PAM guide for system administrators</ulink>
is recommended for further reading.</para>
<para>Refer to <ulink
url="http://www.kernel.org/pub/linux/libs/pam/modules.html"/>
for a list of various modules available.</para>
<note>
<para>You should now reinstall the <xref linkend="shadow"/>
package.</para>
</note>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>unix_chkpwd and pam_tally</seg>
<seg>libpam.[so,a], libpamc.[so,a], and libpam_misc.[so,a]</seg>
<seg>/etc/pam.d, /etc/security, /lib/security, and
/usr/include/security</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="unix_chkpwd">
<term><command>unix_chkpwd</command></term>
<listitem>
<para>checks user passwords that are stored
in read protected databases.</para>
<indexterm zone="Linux_PAM unix_chkpwd">
<primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pam_tally">
<term><command>pam_tally</command></term>
<listitem>
<para>is used to view or manipulate the <filename>faillog</filename>
file.</para>
<indexterm zone="Linux_PAM pam_tally">
<primary sortas="b-pam_tally">pam_tally</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libpam">
<term><filename class='libraryfile'>libpam.[so,a]</filename></term>
<listitem>
<para>provides the interfaces between applications and the
PAM modules.</para>
<indexterm zone="Linux_PAM libpam">
<primary sortas="c-libpam">libpam.[so,a]</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>