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