[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">
|
---|
[c03a8bd] | 9 | <!ENTITY linux-pam-md5sum "385458dfb4633071594e255a6ebec9da">
|
---|
| 10 | <!ENTITY linux-pam-size "872 KB">
|
---|
| 11 | <!ENTITY linux-pam-buildsize "18 MB">
|
---|
[ccb8b2d] | 12 | <!ENTITY linux-pam-time "0.5 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>
|
---|
[c03a8bd] | 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; \
|
---|
[ccb8b2d] | 101 | --enable-read-both-confs &&
|
---|
[c7eb655] | 102 | make</userinput></screen>
|
---|
[17fb537e] | 103 |
|
---|
[20f56c70] | 104 | <!-- <para>To test the results, issue <command>make check</command>.</para> -->
|
---|
[c03a8bd] | 105 |
|
---|
[20f56c70] | 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>
|
---|
[1ad238d8] | 111 |
|
---|
[20f56c70] | 112 | <!-- <tip>
|
---|
[1ad238d8] | 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>
|
---|
[c03a8bd] | 120 | </tip> -->
|
---|
[f691f2b] | 121 |
|
---|
[c7eb655] | 122 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[17fb537e] | 123 |
|
---|
[c7eb655] | 124 | <screen role="root"><userinput>make install &&
|
---|
[ee05358] | 125 | chmod -v 4755 /lib/security/unix_chkpwd &&
|
---|
[6869595] | 126 |
|
---|
[ccb8b2d] | 127 | mv -v /lib/security/pam_tally /sbin &&
|
---|
[6869595] | 128 |
|
---|
| 129 | mv -v /lib/libpam{,c,_misc}.la /usr/lib &&
|
---|
| 130 | sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &&
|
---|
| 131 |
|
---|
[336d44e3] | 132 | if [ -L /lib/libpam.so ]; then
|
---|
| 133 | for LINK in libpam{,c,_misc}.so; do
|
---|
| 134 | ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
|
---|
| 135 | rm -v /lib/${LINK}
|
---|
| 136 | done
|
---|
| 137 | fi</userinput></screen>
|
---|
[b4b71892] | 138 |
|
---|
[c03a8bd] | 139 | <!-- <para>If you downloaded the documentation, install it using the following
|
---|
[ccb8b2d] | 140 | command:</para>
|
---|
[f691f2b] | 141 |
|
---|
[ccb8b2d] | 142 | <screen role="root"><userinput>for DOCTYPE in html pdf ps txts
|
---|
[f691f2b] | 143 | do
|
---|
[6603f8b] | 144 | cp -v -R doc/$DOCTYPE /usr/share/doc/Linux-PAM-&linux-pam-version;
|
---|
[c03a8bd] | 145 | done</userinput></screen> -->
|
---|
[f691f2b] | 146 |
|
---|
[c7eb655] | 147 | </sect2>
|
---|
[b4b71892] | 148 |
|
---|
[c7eb655] | 149 | <sect2 role="commands">
|
---|
| 150 | <title>Command Explanations</title>
|
---|
[b4b71892] | 151 |
|
---|
[6869595] | 152 | <para><parameter>--libdir=/lib</parameter>: This parameter results in
|
---|
[ccb8b2d] | 153 | the libraries being installed in
|
---|
[6869595] | 154 | <filename class='directory'>/lib</filename> as they may be required in
|
---|
| 155 | single-user mode.</para>
|
---|
[b4b71892] | 156 |
|
---|
[ccb8b2d] | 157 | <para><parameter>--sbindir=/lib/security</parameter>: This parameter
|
---|
[6869595] | 158 | results in two executables, one of which is not intended to be run from the
|
---|
[ccb8b2d] | 159 | command line, being installed in the same directory as the PAM modules.
|
---|
[6869595] | 160 | The other executable is later moved to the
|
---|
[ccb8b2d] | 161 | <filename class='directory'>/sbin</filename> directory.</para>
|
---|
[b4b71892] | 162 |
|
---|
[ccb8b2d] | 163 | <para><parameter>--enable-securedir=/lib/security</parameter>: This
|
---|
| 164 | parameter results in the PAM modules being installed in
|
---|
| 165 | <filename class='directory'>/lib/security</filename>.</para>
|
---|
[b4b71892] | 166 |
|
---|
[c03a8bd] | 167 | <para><parameter>--docdir=...</parameter>: This parameter results in
|
---|
[ccb8b2d] | 168 | the documentation being installed in a versioned directory name.</para>
|
---|
[b4b71892] | 169 |
|
---|
[ccb8b2d] | 170 | <para><parameter>--enable-read-both-confs</parameter>: This parameter
|
---|
| 171 | allows the local administrator to choose which configuration file setup to
|
---|
| 172 | use.</para>
|
---|
[b4b71892] | 173 |
|
---|
[ee05358] | 174 | <para><command>chmod -v 4755 /lib/security/unix_chkpwd</command>:
|
---|
| 175 | The <command>unix_chkpwd</command> password-helper program must be setuid
|
---|
| 176 | so that non-<systemitem class="username">root</systemitem> processes can
|
---|
| 177 | access the shadow-password file.</para>
|
---|
| 178 |
|
---|
[ccb8b2d] | 179 | <para><command>mv -v /lib/security/pam_tally /sbin</command>: The
|
---|
| 180 | <command>pam_tally</command> program is designed to be run by the system
|
---|
| 181 | administrator, possibly in single-user mode, so it is moved to the
|
---|
| 182 | appropriate directory.</para>
|
---|
| 183 |
|
---|
[6869595] | 184 | <para><command>mv -v /lib/libpam{,c,_misc}.la /usr/lib</command>: This
|
---|
| 185 | command moves the <application>Libtool</application> library files to
|
---|
| 186 | <filename class='directory'>/usr/lib</filename> as they are expected to
|
---|
| 187 | reside there.</para>
|
---|
| 188 |
|
---|
| 189 | <para><command>sed -i 's| /lib| /usr/lib|'
|
---|
| 190 | /usr/lib/libpam_misc.la</command>: This command corrects an installation
|
---|
| 191 | reference due to the file being moved in the previous step.</para>
|
---|
| 192 |
|
---|
| 193 | <para><command>for ...; do ...; done</command>: These commands are used
|
---|
[821b3bfc] | 194 | to relocate the <filename class='symlink'>.so</filename> symbolic links
|
---|
| 195 | into the <filename class='directory'>/usr/lib</filename> directory by
|
---|
| 196 | cloning and then removing the existing symlinks. Using
|
---|
| 197 | <command>readlink</command> ensures the new symlinks point at the correct
|
---|
| 198 | library filenames.</para>
|
---|
[aadd9ef] | 199 |
|
---|
[c7eb655] | 200 | </sect2>
|
---|
[b4b71892] | 201 |
|
---|
[c7eb655] | 202 | <sect2 role="configuration">
|
---|
| 203 | <title>Configuring Linux-PAM</title>
|
---|
[b4b71892] | 204 |
|
---|
[c7eb655] | 205 | <sect3 id="pam-config">
|
---|
| 206 | <title>Config Files</title>
|
---|
[b4b71892] | 207 |
|
---|
[c7eb655] | 208 | <para><filename>/etc/security/*</filename> and
|
---|
| 209 | <filename>/etc/pam.d/*</filename> or
|
---|
| 210 | <filename>/etc/pam.conf</filename></para>
|
---|
[b4b71892] | 211 |
|
---|
[6603f8b] | 212 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 213 | <primary sortas="e-etc-security">/etc/security/*</primary>
|
---|
| 214 | </indexterm>
|
---|
[b4b71892] | 215 |
|
---|
[6603f8b] | 216 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 217 | <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
|
---|
| 218 | </indexterm>
|
---|
| 219 |
|
---|
[6603f8b] | 220 | <indexterm zone="linux-pam pam-config">
|
---|
[c7eb655] | 221 | <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
|
---|
| 222 | </indexterm>
|
---|
| 223 |
|
---|
| 224 | </sect3>
|
---|
| 225 |
|
---|
| 226 | <sect3>
|
---|
| 227 | <title>Configuration Information</title>
|
---|
| 228 |
|
---|
| 229 | <para>Configuration information is placed in
|
---|
| 230 | <filename class='directory'>/etc/pam.d/</filename> or
|
---|
[ccb8b2d] | 231 | <filename>/etc/pam.conf</filename> depending on system administrator
|
---|
| 232 | preference. Below are example files of each type:</para>
|
---|
[c7eb655] | 233 |
|
---|
| 234 | <screen><literal># Begin /etc/pam.d/other
|
---|
[b4b71892] | 235 |
|
---|
| 236 | auth required pam_unix.so nullok
|
---|
| 237 | account required pam_unix.so
|
---|
| 238 | session required pam_unix.so
|
---|
| 239 | password required pam_unix.so nullok
|
---|
| 240 |
|
---|
| 241 | # End /etc/pam.d/other
|
---|
| 242 |
|
---|
| 243 | # Begin /etc/pam.conf
|
---|
| 244 |
|
---|
| 245 | other auth required pam_unix.so nullok
|
---|
| 246 | other account required pam_unix.so
|
---|
| 247 | other session required pam_unix.so
|
---|
| 248 | other password required pam_unix.so nullok
|
---|
| 249 |
|
---|
[c7eb655] | 250 | # End /etc/pam.conf</literal></screen>
|
---|
| 251 |
|
---|
| 252 | <para>The <application>PAM</application> man page
|
---|
| 253 | (<command>man pam</command>) provides a good starting point for
|
---|
| 254 | descriptions of fields and allowable entries. The <ulink
|
---|
[6b8211c2] | 255 | url="http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_SAG.html">
|
---|
[ccb8b2d] | 256 | Linux-PAM System Administrators' Guide</ulink>
|
---|
| 257 | is recommended for additional information.</para>
|
---|
[c7eb655] | 258 |
|
---|
| 259 | <para>Refer to <ulink
|
---|
| 260 | url="http://www.kernel.org/pub/linux/libs/pam/modules.html"/>
|
---|
| 261 | for a list of various modules available.</para>
|
---|
| 262 |
|
---|
[ccb8b2d] | 263 | <important>
|
---|
[c7eb655] | 264 | <para>You should now reinstall the <xref linkend="shadow"/>
|
---|
| 265 | package.</para>
|
---|
[ccb8b2d] | 266 | </important>
|
---|
[c7eb655] | 267 |
|
---|
| 268 | </sect3>
|
---|
| 269 |
|
---|
| 270 | </sect2>
|
---|
| 271 |
|
---|
| 272 | <sect2 role="content">
|
---|
| 273 | <title>Contents</title>
|
---|
| 274 |
|
---|
| 275 | <segmentedlist>
|
---|
[ccb8b2d] | 276 | <segtitle>Installed Program</segtitle>
|
---|
[c7eb655] | 277 | <segtitle>Installed Libraries</segtitle>
|
---|
| 278 | <segtitle>Installed Directories</segtitle>
|
---|
| 279 |
|
---|
| 280 | <seglistitem>
|
---|
[ccb8b2d] | 281 | <seg>pam_tally</seg>
|
---|
[3597eb6] | 282 | <seg>libpam.{so,a}, libpamc.{so,a}, and libpam_misc.{so,a}</seg>
|
---|
[ccb8b2d] | 283 | <seg>/etc/pam.d, /etc/security, /lib/security and
|
---|
[c7eb655] | 284 | /usr/include/security</seg>
|
---|
| 285 | </seglistitem>
|
---|
| 286 | </segmentedlist>
|
---|
| 287 |
|
---|
| 288 | <variablelist>
|
---|
| 289 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 290 | <?dbfo list-presentation="list"?>
|
---|
| 291 | <?dbhtml list-presentation="table"?>
|
---|
| 292 |
|
---|
| 293 | <varlistentry id="pam_tally">
|
---|
| 294 | <term><command>pam_tally</command></term>
|
---|
| 295 | <listitem>
|
---|
| 296 | <para>is used to view or manipulate the <filename>faillog</filename>
|
---|
| 297 | file.</para>
|
---|
[6603f8b] | 298 | <indexterm zone="linux-pam pam_tally">
|
---|
[c7eb655] | 299 | <primary sortas="b-pam_tally">pam_tally</primary>
|
---|
| 300 | </indexterm>
|
---|
| 301 | </listitem>
|
---|
| 302 | </varlistentry>
|
---|
| 303 |
|
---|
| 304 | <varlistentry id="libpam">
|
---|
[3597eb6] | 305 | <term><filename class='libraryfile'>libpam.{so,a}</filename></term>
|
---|
[c7eb655] | 306 | <listitem>
|
---|
| 307 | <para>provides the interfaces between applications and the
|
---|
| 308 | PAM modules.</para>
|
---|
[6603f8b] | 309 | <indexterm zone="linux-pam libpam">
|
---|
[3597eb6] | 310 | <primary sortas="c-libpam">libpam.{so,a}</primary>
|
---|
[c7eb655] | 311 | </indexterm>
|
---|
| 312 | </listitem>
|
---|
| 313 | </varlistentry>
|
---|
| 314 |
|
---|
| 315 | </variablelist>
|
---|
| 316 |
|
---|
| 317 | </sect2>
|
---|
[b4b71892] | 318 |
|
---|
[3c52f859] | 319 | </sect1>
|
---|