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