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