[b4b71892] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[b4b71892] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[17fb537e] | 6 |
|
---|
[31f3a57] | 7 | <!ENTITY shadow-download-http "http://ftp.pld.org.pl/software/shadow/shadow-&shadow-version;.tar.bz2">
|
---|
| 8 | <!ENTITY shadow-download-ftp "ftp://ftp.pld.org.pl/software/shadow/shadow-&shadow-version;.tar.bz2">
|
---|
[980ef86b] | 9 | <!ENTITY shadow-md5sum "609a417a45827c36ba6e33f9dc785371">
|
---|
| 10 | <!ENTITY shadow-size "1.0 MB">
|
---|
| 11 | <!ENTITY shadow-buildsize "13.4 MB">
|
---|
[349b53dd] | 12 | <!ENTITY shadow-time "0.3 SBU">
|
---|
[b4b71892] | 13 | ]>
|
---|
| 14 |
|
---|
[17fb537e] | 15 | <sect1 id="shadow" xreflabel="Shadow-&shadow-version;">
|
---|
[322f172] | 16 | <?dbhtml filename="shadow.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>Shadow-&shadow-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="shadow">
|
---|
| 26 | <primary sortas="a-Shadow">Shadow</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Shadow</title>
|
---|
| 31 |
|
---|
| 32 | <para><application>Shadow</application> was indeed installed in LFS and
|
---|
| 33 | there is no reason to reinstall it unless you installed
|
---|
| 34 | <application>Linux-PAM</application>. If you did, this will allow programs
|
---|
[980ef86b] | 35 | like <command>login</command> and <command>su</command> to utilize
|
---|
| 36 | PAM.</para>
|
---|
[322f172] | 37 |
|
---|
| 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&shadow-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&shadow-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &shadow-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &shadow-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &shadow-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &shadow-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
[31f3a57] | 60 | <!--
|
---|
[322f172] | 61 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 62 | <itemizedlist spacing='compact'>
|
---|
| 63 | <listitem>
|
---|
[349b53dd] | 64 | <para>Patch to fix several invalid warning messages when used with
|
---|
| 65 | <application>Linux_PAM</application>: <ulink
|
---|
| 66 | url="&patch-root;/shadow-&shadow-version;-Linux_PAM_fixes-1.patch"/></para>
|
---|
[322f172] | 67 | </listitem>
|
---|
| 68 | </itemizedlist>
|
---|
[31f3a57] | 69 | -->
|
---|
[322f172] | 70 |
|
---|
| 71 | <bridgehead renderas="sect3">Shadow Dependencies</bridgehead>
|
---|
| 72 |
|
---|
| 73 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 74 | <para><xref linkend="Linux_PAM"/></para>
|
---|
| 75 |
|
---|
| 76 | </sect2>
|
---|
| 77 |
|
---|
| 78 | <sect2 role="installation">
|
---|
| 79 | <title>Installation of Shadow</title>
|
---|
| 80 |
|
---|
| 81 | <para>Reinstall <application>Shadow</application> by running the following
|
---|
| 82 | commands:</para>
|
---|
| 83 |
|
---|
[31f3a57] | 84 | <!--
|
---|
[349b53dd] | 85 | <screen><userinput>patch -Np1 -i ../shadow-&shadow-version;-Linux_PAM_fixes-1.patch &&
|
---|
[31f3a57] | 86 | <-->
|
---|
| 87 |
|
---|
[980ef86b] | 88 | <screen><userinput>./configure --libdir=/lib --enable-shared \
|
---|
[4fcf20a5] | 89 | --with-libpam --without-libcrack &&
|
---|
| 90 | sed -i 's/groups$(EXEEXT) //' src/Makefile &&
|
---|
| 91 | sed -i '/groups/d' man/Makefile &&
|
---|
[322f172] | 92 | make</userinput></screen>
|
---|
[17fb537e] | 93 |
|
---|
[31f3a57] | 94 | <para>This package does not come with a test suite.</para>
|
---|
| 95 |
|
---|
[322f172] | 96 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[17fb537e] | 97 |
|
---|
[322f172] | 98 | <screen role="root"><userinput>make install &&
|
---|
[4fcf20a5] | 99 | mv -v /usr/bin/passwd /bin &&
|
---|
| 100 | mv -v /lib/libshadow.*a /usr/lib &&
|
---|
| 101 | rm -v /lib/libshadow.so &&
|
---|
[322f172] | 102 | ln -v -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
|
---|
[b4b71892] | 103 |
|
---|
[322f172] | 104 | </sect2>
|
---|
[b4b71892] | 105 |
|
---|
[322f172] | 106 | <sect2 role="commands">
|
---|
| 107 | <title>Command Explanations</title>
|
---|
[b4b71892] | 108 |
|
---|
[322f172] | 109 | <para><parameter>--without-libcrack</parameter>: This switch tells
|
---|
| 110 | <application>Shadow</application> not to use
|
---|
| 111 | <filename class='libraryfile'>libcrack</filename>. This is desired as
|
---|
| 112 | <application>Linux-PAM</application> already contains
|
---|
| 113 | <filename class='libraryfile'>libcrack</filename>.</para>
|
---|
[b4b71892] | 114 |
|
---|
[31f3a57] | 115 | <para><parameter>--enable-shadowgrp</parameter>: This version of
|
---|
| 116 | <application>Shadow</application> defaults to not enabling
|
---|
| 117 | its group functionality, which causes <command>grpconv</command> to
|
---|
| 118 | fail.</para>
|
---|
| 119 |
|
---|
[322f172] | 120 | <para><command>sed -i ...</command>: These commands are used to suppress
|
---|
| 121 | the installation of the <command>groups</command> program as the version
|
---|
| 122 | from the <application>Coreutils</application> package installed during
|
---|
| 123 | LFS is preferred.</para>
|
---|
[39975e9] | 124 |
|
---|
[322f172] | 125 | </sect2>
|
---|
[b4b71892] | 126 |
|
---|
[322f172] | 127 | <sect2 role="configuration">
|
---|
| 128 | <title>Configuring Linux-PAM to Work with Shadow</title>
|
---|
[b4b71892] | 129 |
|
---|
[322f172] | 130 | <sect3 id="pam.d">
|
---|
| 131 | <title>Config Files</title>
|
---|
[b4b71892] | 132 |
|
---|
[1ba671c] | 133 | <para><filename>/etc/pam.d/*</filename> or alternatively
|
---|
| 134 | <filename>/etc/pam.conf, /etc/login.defs and
|
---|
| 135 | /etc/security/*</filename></para>
|
---|
[b4b71892] | 136 |
|
---|
[322f172] | 137 | <indexterm zone="shadow pam.d">
|
---|
| 138 | <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
|
---|
| 139 | </indexterm>
|
---|
[2197589] | 140 |
|
---|
[322f172] | 141 | <indexterm zone="shadow pam.d">
|
---|
| 142 | <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
|
---|
| 143 | </indexterm>
|
---|
[4fcf20a5] | 144 |
|
---|
[1ba671c] | 145 | <indexterm zone="shadow pam.d">
|
---|
| 146 | <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
|
---|
| 147 | </indexterm>
|
---|
| 148 |
|
---|
| 149 | <indexterm zone="shadow pam.d">
|
---|
| 150 | <primary sortas="e-etc-security">/etc/security/*</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 |
|
---|
[322f172] | 153 | </sect3>
|
---|
| 154 |
|
---|
| 155 | <sect3>
|
---|
| 156 | <title>Configuration Information</title>
|
---|
| 157 |
|
---|
[1ba671c] | 158 | <sect4 id="pam-login-defs">
|
---|
| 159 | <title>Configuring /etc/login.defs</title>
|
---|
| 160 |
|
---|
| 161 | <para>The <command>login</command> program currently performs many
|
---|
| 162 | functions which <application>Linux-PAM</application> modules should
|
---|
| 163 | now handle. The following <command>sed</command> command will comment
|
---|
| 164 | out the appropriate lines in <filename>/etc/login.defs</filename>, and
|
---|
| 165 | stop <command>login</command> from performing these functions (a backup
|
---|
| 166 | file named <filename>/etc/login.defs.orig</filename> is also created
|
---|
| 167 | to preserve the original file's contents):</para>
|
---|
| 168 |
|
---|
| 169 | <indexterm zone="shadow pam-login-defs">
|
---|
| 170 | <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
|
---|
| 171 | </indexterm>
|
---|
| 172 |
|
---|
| 173 | <screen role="root"><userinput>install -v -m644 /etc/login.defs /etc/login.defs.orig &&
|
---|
| 174 | for FUNCTION in LASTLOG_ENAB MAIL_CHECK_ENAB \
|
---|
| 175 | PORTTIME_CHECKS_ENAB CONSOLE \
|
---|
| 176 | MOTD_FILE NOLOGINS_FILE PASS_MIN_LEN \
|
---|
| 177 | SU_WHEEL_ONLY MD5_CRYPT_ENAB \
|
---|
| 178 | CONSOLE_GROUPS ENVIRON_FILE \
|
---|
| 179 | ULIMIT ENV_TZ ENV_HZ ENV_SUPATH \
|
---|
| 180 | ENV_PATH QMAIL_DIR MAIL_DIR MAIL_FILE \
|
---|
| 181 | CHFN_AUTH FAILLOG_ENAB QUOTAS_ENAB FTMP_FILE
|
---|
| 182 | do
|
---|
| 183 | sed -i -e "s/^$FUNCTION/# &/" /etc/login.defs
|
---|
| 184 | done</userinput></screen>
|
---|
| 185 |
|
---|
| 186 | <para>If you have <application>CrackLib</application> installed,
|
---|
| 187 | also comment out four more lines using the following command:</para>
|
---|
| 188 |
|
---|
| 189 | <screen role="root"><userinput>for FUNCTION in OBSCURE_CHECKS_ENAB CRACKLIB_DICTPATH \
|
---|
| 190 | PASS_CHANGE_TRIES PASS_ALWAYS_WARN
|
---|
| 191 | do
|
---|
| 192 | sed -i -e "s/^$FUNCTION/# &/" /etc/login.defs
|
---|
| 193 | done</userinput></screen>
|
---|
| 194 |
|
---|
| 195 | </sect4>
|
---|
| 196 |
|
---|
| 197 | <sect4>
|
---|
| 198 | <title>Configuring the /etc/pam.d/ Files</title>
|
---|
| 199 |
|
---|
| 200 | <para>Add the following <application>Linux-PAM</application> configuration
|
---|
| 201 | files to <filename class="directory">/etc/pam.d/</filename> (or add them
|
---|
| 202 | to <filename>/etc/pam.conf</filename> with the additional field for
|
---|
| 203 | the program).</para>
|
---|
| 204 |
|
---|
| 205 | </sect4>
|
---|
[322f172] | 206 |
|
---|
| 207 | <sect4>
|
---|
[974951c] | 208 | <title>'login' (with CrackLib)</title>
|
---|
[322f172] | 209 |
|
---|
| 210 | <screen role="root"><userinput>cat > /etc/pam.d/login << "EOF"
|
---|
| 211 | <literal># Begin /etc/pam.d/login
|
---|
[4fcf20a5] | 212 |
|
---|
| 213 | auth requisite pam_securetty.so
|
---|
| 214 | auth requisite pam_nologin.so
|
---|
| 215 | auth required pam_unix.so
|
---|
| 216 | account required pam_access.so
|
---|
| 217 | account required pam_unix.so
|
---|
[7fb0e285] | 218 | session required pam_env.so
|
---|
[4fcf20a5] | 219 | session required pam_motd.so
|
---|
| 220 | session required pam_limits.so
|
---|
| 221 | session optional pam_mail.so dir=/var/mail standard
|
---|
| 222 | session optional pam_lastlog.so
|
---|
| 223 | session required pam_unix.so
|
---|
| 224 | password required pam_cracklib.so retry=3 difok=8 minlen=5 \
|
---|
| 225 | dcredit=3 ocredit=3 \
|
---|
| 226 | ucredit=2 lcredit=2
|
---|
| 227 | password required pam_unix.so md5 shadow use_authtok
|
---|
| 228 |
|
---|
[322f172] | 229 | # End /etc/pam.d/login</literal>
|
---|
| 230 | EOF</userinput></screen>
|
---|
| 231 |
|
---|
| 232 | </sect4>
|
---|
[4fcf20a5] | 233 |
|
---|
[322f172] | 234 | <sect4>
|
---|
[974951c] | 235 | <title>'login' (without CrackLib)</title>
|
---|
[4fcf20a5] | 236 |
|
---|
[322f172] | 237 | <screen role="root"><userinput>cat > /etc/pam.d/login << "EOF"
|
---|
| 238 | <literal># Begin /etc/pam.d/login
|
---|
[b4b71892] | 239 |
|
---|
| 240 | auth requisite pam_securetty.so
|
---|
| 241 | auth requisite pam_nologin.so
|
---|
| 242 | auth required pam_env.so
|
---|
| 243 | auth required pam_unix.so
|
---|
| 244 | account required pam_access.so
|
---|
| 245 | account required pam_unix.so
|
---|
| 246 | session required pam_motd.so
|
---|
| 247 | session required pam_limits.so
|
---|
[4fcf20a5] | 248 | session optional pam_mail.so dir=/var/mail standard
|
---|
[b4b71892] | 249 | session optional pam_lastlog.so
|
---|
| 250 | session required pam_unix.so
|
---|
[4fcf20a5] | 251 | password required pam_unix.so md5 shadow
|
---|
[b4b71892] | 252 |
|
---|
[322f172] | 253 | # End /etc/pam.d/login</literal>
|
---|
| 254 | EOF</userinput></screen>
|
---|
[4fcf20a5] | 255 |
|
---|
[322f172] | 256 | </sect4>
|
---|
[4fcf20a5] | 257 |
|
---|
[322f172] | 258 | <sect4>
|
---|
[974951c] | 259 | <title>'passwd' (with CrackLib)</title>
|
---|
[322f172] | 260 |
|
---|
| 261 | <screen role="root"><userinput>cat > /etc/pam.d/passwd << "EOF"
|
---|
| 262 | <literal># Begin /etc/pam.d/passwd
|
---|
[b4b71892] | 263 |
|
---|
[4fcf20a5] | 264 | password required pam_cracklib.so retry=3 difok=8 minlen=5 \
|
---|
| 265 | dcredit=3 ocredit=3 \
|
---|
| 266 | ucredit=2 lcredit=2
|
---|
| 267 | password required pam_unix.so md5 shadow use_authtok
|
---|
[b4b71892] | 268 |
|
---|
[322f172] | 269 | # End /etc/pam.d/passwd</literal>
|
---|
| 270 | EOF</userinput></screen>
|
---|
| 271 |
|
---|
| 272 | </sect4>
|
---|
[b4b71892] | 273 |
|
---|
[322f172] | 274 | <sect4>
|
---|
[974951c] | 275 | <title>'passwd' (without CrackLib)</title>
|
---|
[4fcf20a5] | 276 |
|
---|
[322f172] | 277 | <screen role="root"><userinput>cat > /etc/pam.d/passwd << "EOF"
|
---|
| 278 | <literal># Begin /etc/pam.d/passwd
|
---|
[4fcf20a5] | 279 |
|
---|
| 280 | password required pam_unix.so md5 shadow
|
---|
[b4b71892] | 281 |
|
---|
[322f172] | 282 | # End /etc/pam.d/passwd</literal>
|
---|
| 283 | EOF</userinput></screen>
|
---|
| 284 |
|
---|
| 285 | </sect4>
|
---|
[4fcf20a5] | 286 |
|
---|
[322f172] | 287 | <sect4>
|
---|
| 288 | <title>'su'</title>
|
---|
[4fcf20a5] | 289 |
|
---|
[322f172] | 290 | <screen role="root"><userinput>cat > /etc/pam.d/su << "EOF"
|
---|
| 291 | <literal># Begin /etc/pam.d/su
|
---|
[b4b71892] | 292 |
|
---|
| 293 | auth sufficient pam_rootok.so
|
---|
| 294 | auth required pam_unix.so
|
---|
| 295 | account required pam_unix.so
|
---|
[4fcf20a5] | 296 | session optional pam_mail.so dir=/var/mail standard
|
---|
[7fb0e285] | 297 | session required pam_env.so
|
---|
[b4b71892] | 298 | session required pam_unix.so
|
---|
| 299 |
|
---|
[322f172] | 300 | # End /etc/pam.d/su</literal>
|
---|
| 301 | EOF</userinput></screen>
|
---|
[b4b71892] | 302 |
|
---|
[322f172] | 303 | </sect4>
|
---|
[b4b71892] | 304 |
|
---|
[322f172] | 305 | <sect4>
|
---|
| 306 | <title>'chage'</title>
|
---|
| 307 |
|
---|
| 308 | <screen role="root"><userinput>cat > /etc/pam.d/chage << "EOF"
|
---|
| 309 | <literal># Begin /etc/pam.d/chage
|
---|
[b4b71892] | 310 |
|
---|
| 311 | auth sufficient pam_rootok.so
|
---|
| 312 | auth required pam_unix.so
|
---|
| 313 | account required pam_unix.so
|
---|
| 314 | session required pam_unix.so
|
---|
| 315 | password required pam_permit.so
|
---|
| 316 |
|
---|
[322f172] | 317 | # End /etc/pam.d/chage</literal>
|
---|
| 318 | EOF</userinput></screen>
|
---|
| 319 |
|
---|
| 320 | </sect4>
|
---|
[b4b71892] | 321 |
|
---|
[322f172] | 322 | <sect4>
|
---|
| 323 | <title>'chpasswd', 'newusers', 'groupadd', 'groupdel',
|
---|
| 324 | 'groupmod', 'useradd', 'userdel', and 'usermod'</title>
|
---|
[39975e9] | 325 |
|
---|
[322f172] | 326 | <screen role="root"><userinput>for PROGRAM in chpasswd newusers groupadd groupdel \
|
---|
[4fcf20a5] | 327 | groupmod useradd userdel usermod
|
---|
| 328 | do
|
---|
[904f31e2] | 329 | install -v -m644 /etc/pam.d/chage /etc/pam.d/$PROGRAM
|
---|
[4fcf20a5] | 330 | sed -i -e "s/chage/$PROGRAM/" /etc/pam.d/$PROGRAM
|
---|
[322f172] | 331 | done</userinput></screen>
|
---|
| 332 |
|
---|
| 333 | <warning>
|
---|
| 334 | <para>At this point, you should do a simple test to see if
|
---|
| 335 | <application>Shadow</application> is working as expected. Open
|
---|
[1ba671c] | 336 | another terminal and log in as a user, then <command>su</command> to
|
---|
[974951c] | 337 | <systemitem class="username">root</systemitem>. If you do not see any
|
---|
| 338 | errors, then all is well and you should proceed with the rest of the
|
---|
[322f172] | 339 | configuration. If you did receive errors, stop now and double check
|
---|
[974951c] | 340 | the above configuration files manually. If you cannot find and
|
---|
[322f172] | 341 | fix the error, you should recompile <application>Shadow</application>
|
---|
| 342 | replacing <option>--with-libpam</option> with
|
---|
[1ba671c] | 343 | <option>--without-libpam</option> in the above instructions (also move
|
---|
| 344 | the <filename>/etc/login.defs.orig</filename> backup file to
|
---|
| 345 | <filename>/etc/login.defs</filename>). If you
|
---|
[322f172] | 346 | fail to do this and the errors remain, you will be unable to log into
|
---|
| 347 | your system.</para>
|
---|
| 348 | </warning>
|
---|
| 349 |
|
---|
[349b53dd] | 350 | </sect4>
|
---|
| 351 |
|
---|
| 352 | <sect4>
|
---|
| 353 | <title>Other</title>
|
---|
| 354 |
|
---|
[322f172] | 355 | <para>Currently, <filename>/etc/pam.d/other</filename> is configured
|
---|
| 356 | to allow anyone with an account on the machine to use PAM-aware
|
---|
| 357 | programs without a configuration file for that program. After testing
|
---|
| 358 | <application>Linux-PAM</application> for proper configuration, install
|
---|
| 359 | a more restrictive <filename>other</filename> file so that
|
---|
| 360 | program-specific configuration files are required:</para>
|
---|
| 361 |
|
---|
| 362 | <screen role="root"><userinput>cat > /etc/pam.d/other << "EOF"
|
---|
| 363 | <literal># Begin /etc/pam.d/other
|
---|
[b4b71892] | 364 |
|
---|
| 365 | auth required pam_deny.so
|
---|
| 366 | auth required pam_warn.so
|
---|
| 367 | account required pam_deny.so
|
---|
| 368 | session required pam_deny.so
|
---|
| 369 | password required pam_deny.so
|
---|
| 370 | password required pam_warn.so
|
---|
| 371 |
|
---|
[322f172] | 372 | # End /etc/pam.d/other</literal>
|
---|
| 373 | EOF</userinput></screen>
|
---|
[4fcf20a5] | 374 |
|
---|
[322f172] | 375 | </sect4>
|
---|
[4fcf20a5] | 376 |
|
---|
[322f172] | 377 | <sect4 id="pam-access">
|
---|
| 378 | <title>Configuring Login Access</title>
|
---|
[4fcf20a5] | 379 |
|
---|
[322f172] | 380 | <para>Instead of using the <filename>/etc/login.access</filename>
|
---|
| 381 | file for controlling access to the system,
|
---|
| 382 | <application>Linux-PAM</application> uses the
|
---|
| 383 | <filename class='libraryfile'>pam_access.so</filename> module along
|
---|
| 384 | with the <filename>/etc/security/access.conf</filename> file. Rename
|
---|
| 385 | the <filename>/etc/login.access</filename> file using the following
|
---|
| 386 | command:</para>
|
---|
| 387 |
|
---|
| 388 | <indexterm zone="shadow pam-access">
|
---|
| 389 | <primary sortas="e-etc-security-access.conf">/etc/security/access.conf</primary>
|
---|
| 390 | </indexterm>
|
---|
| 391 |
|
---|
| 392 | <screen role="root"><userinput>if [ -f /etc/login.access ]; then
|
---|
[4fcf20a5] | 393 | mv -v /etc/login.access /etc/login.access.NOUSE
|
---|
[322f172] | 394 | fi</userinput></screen>
|
---|
| 395 |
|
---|
| 396 | </sect4>
|
---|
| 397 |
|
---|
| 398 | <sect4 id="pam-limits">
|
---|
| 399 | <title>Configuring Resource Limits</title>
|
---|
| 400 |
|
---|
| 401 | <para>Instead of using the <filename>/etc/limits</filename> file
|
---|
| 402 | for limiting usage of system resources,
|
---|
| 403 | <application>Linux-PAM</application> uses the
|
---|
| 404 | <filename class='libraryfile'>pam_limits.so</filename> module along
|
---|
| 405 | with the <filename>/etc/security/limits.conf</filename> file. Rename
|
---|
| 406 | the <filename>/etc/limits</filename> file using the following
|
---|
| 407 | command:</para>
|
---|
| 408 |
|
---|
| 409 | <indexterm zone="shadow pam-limits">
|
---|
| 410 | <primary sortas="e-etc-security-limits.conf">/etc/security/limits.conf</primary>
|
---|
| 411 | </indexterm>
|
---|
| 412 |
|
---|
| 413 | <screen role="root"><userinput>if [ -f /etc/limits ]; then
|
---|
[4fcf20a5] | 414 | mv -v /etc/limits /etc/limits.NOUSE
|
---|
[322f172] | 415 | fi</userinput></screen>
|
---|
| 416 |
|
---|
| 417 | </sect4>
|
---|
[4fcf20a5] | 418 |
|
---|
[7fb0e285] | 419 |
|
---|
| 420 | <sect4 id="pam-env">
|
---|
| 421 | <title>Configuring Default Environment</title>
|
---|
| 422 |
|
---|
[7b1d193] | 423 | <para>During previous configuration, several items were removed from
|
---|
[7fb0e285] | 424 | <filename>/etc/login.defs</filename>. Some of these items are now
|
---|
| 425 | controlled by the <filename class='libraryfile'>pam_env.so</filename>
|
---|
| 426 | module and the <filename>/etc/security/pam_env.conf</filename>
|
---|
| 427 | configuration file. In particular, the default path has been
|
---|
| 428 | changed. To recover your default path, execute the following
|
---|
| 429 | commands:</para>
|
---|
| 430 |
|
---|
| 431 | <screen><userinput><command>ENV_PATH=`grep '^ENV_PATH' /etc/login.defs.orig | \
|
---|
| 432 | awk '{ print $2 }' | sed 's/PATH=//'` &&
|
---|
| 433 | echo 'PATH DEFAULT='`echo "${ENV_PATH}"`' OVERRIDE=${PATH}' \
|
---|
| 434 | >> /etc/security/pam_env.conf &&
|
---|
| 435 | unset ENV_PATH</command></userinput></screen>
|
---|
| 436 |
|
---|
| 437 | <note><para>ENV_SUPATH is no longer supported. You must create
|
---|
| 438 | a valid <filename>/root/.bashrc</filename> file to provide a
|
---|
[31f3a57] | 439 | modified path for the super-user.</para></note>
|
---|
[7fb0e285] | 440 |
|
---|
| 441 | </sect4>
|
---|
| 442 |
|
---|
[322f172] | 443 | </sect3>
|
---|
[b4b71892] | 444 |
|
---|
[322f172] | 445 | </sect2>
|
---|
[f45b1953] | 446 |
|
---|
[322f172] | 447 | <sect2 role="content">
|
---|
| 448 | <title>Contents</title>
|
---|
[17fb537e] | 449 |
|
---|
[322f172] | 450 | <para>A list of the installed files, along with their short descriptions
|
---|
| 451 | can be found at
|
---|
| 452 | <ulink url="&lfs-root;/chapter06/shadow.html#contents-shadow"/>.</para>
|
---|
[17fb537e] | 453 |
|
---|
[322f172] | 454 | </sect2>
|
---|
[17fb537e] | 455 |
|
---|
[f45b1953] | 456 | </sect1>
|
---|