[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">
|
---|
[040a2e4] | 9 | <!ENTITY linux-pam-md5sum "6db7fcb5db6253350e3a4648ceac40e7">
|
---|
[a263ccb3] | 10 | <!ENTITY linux-pam-size "1.1 MB">
|
---|
[040a2e4] | 11 | <!ENTITY linux-pam-buildsize "23 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">
|
---|
[040a2e4] | 15 | <!ENTITY linux-pam-docs-md5sum "83bb379cde2f1585833035fb378fab95">
|
---|
| 16 | <!ENTITY linux-pam-docs-size "495 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 |
|
---|
[040a2e4] | 41 | <para>&lfssvn_checked;20101029&lfssvn_checked2;</para>
|
---|
[f4797d2] | 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'>
|
---|
[07f0c976] | 67 | <title>Optional Documentation</title>
|
---|
[c7eb655] | 68 | <listitem>
|
---|
[07f0c976] | 69 | <para>Download (HTTP): <ulink url="&linux-pam-docs-download;"/></para>
|
---|
[903f671] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[07f0c976] | 72 | <para>Download MD5 sum: &linux-pam-docs-md5sum;</para>
|
---|
[903f671] | 73 | </listitem>
|
---|
| 74 | <listitem>
|
---|
| 75 | <para>Download size &linux-pam-docs-size;</para>
|
---|
[6576f3e] | 76 | </listitem>
|
---|
| 77 | </itemizedlist>
|
---|
| 78 |
|
---|
[c7eb655] | 79 | <bridgehead renderas="sect3">Linux-PAM Dependencies</bridgehead>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[903f671] | 82 | <para role="optional"><xref linkend="cracklib"/>,
|
---|
[de7f20e] | 83 | <xref linkend="x-window-system"/>,
|
---|
| 84 | <xref linkend="db"/> (for the pam_userdb module), and
|
---|
[c03a8bd] | 85 | <ulink url="http://www.prelude-ids.org/">Prelude</ulink></para>
|
---|
| 86 |
|
---|
| 87 | <bridgehead renderas="sect4">Optional (To {,Re}build the Documentation)</bridgehead>
|
---|
| 88 | <para role="optional"><xref linkend="libxslt"/>,
|
---|
| 89 | <xref linkend="DocBook"/>,
|
---|
| 90 | <xref linkend="docbook-xsl"/>,
|
---|
| 91 | <xref linkend="w3m"/>, and
|
---|
| 92 | <xref linkend="fop"/></para>
|
---|
[c7eb655] | 93 |
|
---|
[3597eb6] | 94 | <para condition="html" role="usernotes">User Notes:
|
---|
| 95 | <ulink url="&blfs-wiki;/linux-pam"/></para>
|
---|
| 96 |
|
---|
[c7eb655] | 97 | </sect2>
|
---|
| 98 |
|
---|
| 99 | <sect2 role="installation">
|
---|
| 100 | <title>Installation of Linux-PAM</title>
|
---|
| 101 |
|
---|
[903f671] | 102 | <para>If you downloaded the documentation, unpack the tarball by issuing
|
---|
| 103 | the following command.</para>
|
---|
| 104 |
|
---|
[651ec29] | 105 | <screen><userinput>tar -xf ../Linux-PAM-&linux-pam-version;-docs.tar.bz2 --strip-components=1</userinput></screen>
|
---|
[ccb8b2d] | 106 |
|
---|
[c7eb655] | 107 | <para>Install <application>Linux-PAM</application> by
|
---|
| 108 | running the following commands:</para>
|
---|
| 109 |
|
---|
[903f671] | 110 | <screen><userinput>./configure --sbindir=/lib/security \
|
---|
[c03a8bd] | 111 | --docdir=/usr/share/doc/Linux-PAM-&linux-pam-version; \
|
---|
[903f671] | 112 | --enable-read-both-confs &&
|
---|
[c7eb655] | 113 | make</userinput></screen>
|
---|
[17fb537e] | 114 |
|
---|
[903f671] | 115 | <para>To test the results, a configuration file must be created. This file
|
---|
| 116 | will be removed after the tests have completed. Ensure there are no errors
|
---|
| 117 | produced by the tests before continuing the installation. First create the
|
---|
| 118 | configuration file by issuing the following commands as the
|
---|
| 119 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 120 |
|
---|
| 121 | <screen role="root"><userinput>install -v -m755 -d /etc/pam.d &&
|
---|
[c03a8bd] | 122 |
|
---|
[903f671] | 123 | cat > /etc/pam.d/other << "EOF"
|
---|
| 124 | auth required pam_deny.so
|
---|
| 125 | account required pam_deny.so
|
---|
| 126 | password required pam_deny.so
|
---|
| 127 | session required pam_deny.so
|
---|
| 128 | EOF</userinput></screen>
|
---|
[1ad238d8] | 129 |
|
---|
[903f671] | 130 | <para>Now run the tests by issuing <command>make check</command>.</para>
|
---|
| 131 |
|
---|
| 132 | <para>Remove the configuration file created earlier by issuing the
|
---|
| 133 | following command as the
|
---|
| 134 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 135 |
|
---|
| 136 | <screen role="root"><userinput>rm -rfv /etc/pam.d</userinput></screen>
|
---|
[f691f2b] | 137 |
|
---|
[c7eb655] | 138 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[17fb537e] | 139 |
|
---|
[c7eb655] | 140 | <screen role="root"><userinput>make install &&
|
---|
[ee05358] | 141 | chmod -v 4755 /lib/security/unix_chkpwd &&
|
---|
[6869595] | 142 |
|
---|
[ccb8b2d] | 143 | mv -v /lib/security/pam_tally /sbin &&
|
---|
[6869595] | 144 |
|
---|
| 145 | mv -v /lib/libpam{,c,_misc}.la /usr/lib &&
|
---|
| 146 | sed -i 's| /lib| /usr/lib|' /usr/lib/libpam_misc.la &&
|
---|
| 147 |
|
---|
[336d44e3] | 148 | if [ -L /lib/libpam.so ]; then
|
---|
| 149 | for LINK in libpam{,c,_misc}.so; do
|
---|
| 150 | ln -v -sf ../../lib/$(readlink /lib/${LINK}) /usr/lib/${LINK} &&
|
---|
| 151 | rm -v /lib/${LINK}
|
---|
| 152 | done
|
---|
| 153 | fi</userinput></screen>
|
---|
[b4b71892] | 154 |
|
---|
[c7eb655] | 155 | </sect2>
|
---|
[b4b71892] | 156 |
|
---|
[c7eb655] | 157 | <sect2 role="commands">
|
---|
| 158 | <title>Command Explanations</title>
|
---|
[b4b71892] | 159 |
|
---|
[ccb8b2d] | 160 | <para><parameter>--sbindir=/lib/security</parameter>: This parameter
|
---|
[903f671] | 161 | results in three executables, two of which are not intended to be run from
|
---|
| 162 | the command line, being installed in the same directory as the PAM modules.
|
---|
[6869595] | 163 | The other executable is later moved to the
|
---|
[ccb8b2d] | 164 | <filename class='directory'>/sbin</filename> directory.</para>
|
---|
[b4b71892] | 165 |
|
---|
[c03a8bd] | 166 | <para><parameter>--docdir=...</parameter>: This parameter results in
|
---|
[ccb8b2d] | 167 | the documentation being installed in a versioned directory name.</para>
|
---|
[b4b71892] | 168 |
|
---|
[ccb8b2d] | 169 | <para><parameter>--enable-read-both-confs</parameter>: This parameter
|
---|
| 170 | allows the local administrator to choose which configuration file setup to
|
---|
| 171 | use.</para>
|
---|
[b4b71892] | 172 |
|
---|
[903f671] | 173 | <!-- This appears unnecessary as the xauth module is created even if X
|
---|
| 174 | has not yet been installed.
|
---|
| 175 | <para><parameter>-with-xauth=/usr/X11R6/bin/xauth</parameter>: This
|
---|
[a63de0c] | 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
|
---|
[903f671] | 179 | install <application>Xorg</application> into a non-standard path.</para> -->
|
---|
[a63de0c] | 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 |
|
---|
| 243 | auth required pam_unix.so nullok
|
---|
| 244 | account required pam_unix.so
|
---|
| 245 | session required pam_unix.so
|
---|
| 246 | password required pam_unix.so nullok
|
---|
| 247 |
|
---|
| 248 | # End /etc/pam.d/other
|
---|
| 249 |
|
---|
| 250 | # Begin /etc/pam.conf
|
---|
| 251 |
|
---|
| 252 | other auth required pam_unix.so nullok
|
---|
| 253 | other account required pam_unix.so
|
---|
| 254 | other session required pam_unix.so
|
---|
| 255 | other 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"/>
|
---|
[903f671] | 268 | for a list of various third-party modules available.</para>
|
---|
[c7eb655] | 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>
|
---|
[903f671] | 289 | <seg>libpam.{so,a}, libpamc.{so,a}, libpam_misc.{so,a} and
|
---|
| 290 | numerous PAM modules</seg>
|
---|
[3c9d219] | 291 | <seg>/etc/security, /lib/security, /usr/include/security,
|
---|
| 292 | /usr/share/doc/Linux-PAM-&linux-pam-version;,
|
---|
[903f671] | 293 | and /var/run/sepermit</seg>
|
---|
[c7eb655] | 294 | </seglistitem>
|
---|
| 295 | </segmentedlist>
|
---|
| 296 |
|
---|
| 297 | <variablelist>
|
---|
| 298 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 299 | <?dbfo list-presentation="list"?>
|
---|
| 300 | <?dbhtml list-presentation="table"?>
|
---|
| 301 |
|
---|
| 302 | <varlistentry id="pam_tally">
|
---|
| 303 | <term><command>pam_tally</command></term>
|
---|
| 304 | <listitem>
|
---|
| 305 | <para>is used to view or manipulate the <filename>faillog</filename>
|
---|
| 306 | file.</para>
|
---|
[6603f8b] | 307 | <indexterm zone="linux-pam pam_tally">
|
---|
[c7eb655] | 308 | <primary sortas="b-pam_tally">pam_tally</primary>
|
---|
| 309 | </indexterm>
|
---|
| 310 | </listitem>
|
---|
| 311 | </varlistentry>
|
---|
| 312 |
|
---|
| 313 | <varlistentry id="libpam">
|
---|
[3597eb6] | 314 | <term><filename class='libraryfile'>libpam.{so,a}</filename></term>
|
---|
[c7eb655] | 315 | <listitem>
|
---|
| 316 | <para>provides the interfaces between applications and the
|
---|
| 317 | PAM modules.</para>
|
---|
[6603f8b] | 318 | <indexterm zone="linux-pam libpam">
|
---|
[3597eb6] | 319 | <primary sortas="c-libpam">libpam.{so,a}</primary>
|
---|
[c7eb655] | 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
| 324 | </variablelist>
|
---|
| 325 |
|
---|
| 326 | </sect2>
|
---|
[b4b71892] | 327 |
|
---|
[3c52f859] | 328 | </sect1>
|
---|