source: postlfs/security/shadow.xml@ 34165e6b

12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 34165e6b was e3f6e6a5, checked in by Bruce Dubbs <bdubbs@…>, 11 months ago

Add a warning when updating shadow.
The shadow installation procedure overwrites many files in /etc/pam.d/
which will render system login and su commands (among others) inoperative.

This update adds a warning at the beginning of the build instructions
so it will be hard to miss.

  • Property mode set to 100644
File size: 22.1 KB
RevLine 
[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;
[17fb537e]6
[24c3176]7 <!ENTITY shadow-download-http "https://github.com/shadow-maint/shadow/releases/download/&shadow-version;/shadow-&shadow-version;.tar.xz">
[fb89293]8 <!ENTITY shadow-download-ftp " ">
[1459c3b2]9 <!ENTITY shadow-md5sum "effc1aa17590305647413125b966f1dd">
[24c3176]10 <!ENTITY shadow-size "1.7 MB">
[0b6a7de]11 <!ENTITY shadow-buildsize "38 MB">
12 <!ENTITY shadow-time "0.2 SBU">
[b4b71892]13]>
14
[17fb537e]15<sect1 id="shadow" xreflabel="Shadow-&shadow-version;">
[322f172]16 <?dbhtml filename="shadow.html"?>
17
18
19 <title>Shadow-&shadow-version;</title>
20
21 <indexterm zone="shadow">
22 <primary sortas="a-Shadow">Shadow</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Shadow</title>
27
[9a3142c]28 <para>
29 <application>Shadow</application> was indeed installed in LFS and there is
30 no reason to reinstall it unless you installed
31 <application>CrackLib</application> or
32 <application>Linux-PAM</application> after your LFS system was completed.
33 If you have installed <application>CrackLib</application> after LFS, then
34 reinstalling <application>Shadow</application> will enable strong password
35 support. If you have installed <application>Linux-PAM</application>,
36 reinstalling <application>Shadow</application> will allow programs such as
37 <command>login</command> and <command>su</command> to utilize PAM.
38 </para>
[322f172]39
[2314cd7]40 &lfs120_checked;
[f4797d2]41
[322f172]42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
[9a3142c]45 <para>
46 Download (HTTP): <ulink url="&shadow-download-http;"/>
47 </para>
[322f172]48 </listitem>
[29d1c248]49 <listitem>
[9a3142c]50 <para>
51 Download (FTP): <ulink url="&shadow-download-ftp;"/>
52 </para>
[29d1c248]53 </listitem>
[322f172]54 <listitem>
[9a3142c]55 <para>
56 Download MD5 sum: &shadow-md5sum;
57 </para>
[322f172]58 </listitem>
59 <listitem>
[9a3142c]60 <para>
61 Download size: &shadow-size;
62 </para>
[322f172]63 </listitem>
64 <listitem>
[9a3142c]65 <para>
66 Estimated disk space required: &shadow-buildsize;
67 </para>
[322f172]68 </listitem>
69 <listitem>
[9a3142c]70 <para>
71 Estimated build time: &shadow-time;
72 </para>
[322f172]73 </listitem>
74 </itemizedlist>
[07be534]75<!--
[922e013]76 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
77 <itemizedlist spacing="compact">
78 <listitem>
79 <para>
80 Required patch:
81 <ulink url="&patch-root;/shadow-&shadow-version;-useradd_segfault-1.patch"/>
82 </para>
83 </listitem>
84 </itemizedlist>
[07be534]85-->
[322f172]86 <bridgehead renderas="sect3">Shadow Dependencies</bridgehead>
87
88 <bridgehead renderas="sect4">Required</bridgehead>
[9a3142c]89 <para role="required">
90 <xref linkend="linux-pam"/> or
[19d6c39]91 <xref role="nodep" linkend="cracklib"/>
[9a3142c]92 </para>
93
[e6527c7d]94 <bridgehead renderas="sect4">Optional</bridgehead>
95 <para role="optional">
96 <ulink url="https://libbsd.freedesktop.org/wiki/">libbsd</ulink> and
97 <ulink url="https://www.openwall.com/tcb/">tcb</ulink>
98 </para>
99
[322f172]100 </sect2>
101
102 <sect2 role="installation">
103 <title>Installation of Shadow</title>
104
[c6bdcb0]105 <important>
[9a3142c]106 <para>
107 The installation commands shown below are for installations where
[19d6c39]108 <application>Linux-PAM</application> has been installed and
[9a3142c]109 <application>Shadow</application> is being reinstalled to support the
110 <application>Linux-PAM</application> installation.
111 </para>
112
113 <para>
114 If you are reinstalling <application>Shadow</application> to provide
115 strong password support using the <application>CrackLib</application>
116 library without using <application>Linux-PAM</application>, ensure you
117 add the <parameter>--with-libcrack</parameter> parameter to the
118 <command>configure</command> script below and also issue the following
119 command:
120 </para>
[bca744f]121
[cac7f93]122<screen role="nodump"><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs</userinput></screen>
[c6bdcb0]123 </important>
124
[e3f6e6a5]125 <warning>
126 <para>
127 If reinstalling shadow for a version update, be sure to
128 reaccomplish the Linux-PAM configuration below. The installation
129 of shadow overwrites many of the files in
130 <filename class="directory">/etc/pam.d/</filename>.
131 </para>
132 </warning>
133
[9a3142c]134 <para>
135 Reinstall <application>Shadow</application> by running the following
136 commands:
137 </para>
[07be534]138<!--
[7af20d4]139<screen><userinput>patch -Np1 -i ../shadow-4.10-useradd_segfault-1.patch &amp;&amp;
[07be534]140-->
141<screen><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile.in &amp;&amp;
[4af9931]142
143find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; &amp;&amp;
[dcf64b5f]144find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; &amp;&amp;
145find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \; &amp;&amp;
[e5b9fc73]146
[c0464a8]147sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD YESCRYPT@' \
148 -e 's@/var/spool/mail@/var/mail@' \
149 -e '/PATH=/{s@/sbin:@@;s@/bin:@@}' \
150 -i etc/login.defs &amp;&amp;
[5443006d]151
[e6527c7d]152./configure --sysconfdir=/etc \
153 --disable-static \
154 --without-libbsd \
155 --with-{b,yes}crypt &amp;&amp;<!--
156This is the default: - -with-group-name-max-length=32 &amp;&amp;-->
[322f172]157make</userinput></screen>
[17fb537e]158
[9a3142c]159 <para>
160 This package does not come with a test suite.
161 </para>
[31f3a57]162
[9a3142c]163 <para>
164 Now, as the <systemitem class="username">root</systemitem> user:
165 </para>
[17fb537e]166
[dba76a7]167<screen role="root"><userinput>make exec_prefix=/usr install</userinput></screen>
[8558044]168
[5b01088]169 <para>
[7a9a7b26]170 The man pages were installed in LFS, but if reinstallation is
[5b01088]171 desired, run (as the <systemitem class="username">root</systemitem> user):
172 </para>
173
174<screen role="root"><userinput>make -C man install-man</userinput></screen>
175
[322f172]176 </sect2>
[b4b71892]177
[322f172]178 <sect2 role="commands">
179 <title>Command Explanations</title>
[b4b71892]180
[9a3142c]181 <para>
182 <command>sed -i 's/groups$(EXEEXT) //' src/Makefile.in</command>: This sed
183 is used to suppress the installation of the <command>groups</command>
184 program as the version from the <application>Coreutils</application>
185 package installed during LFS is preferred.
186 </para>
187
188 <para>
[07be534]189 <command>find man -name Makefile.in -exec ... {} \;</command>: The
190 first command is used to suppress the installation of the
[9a3142c]191 <command>groups</command> man pages so the existing ones installed from
192 the <application>Coreutils</application> package are not replaced.
[07be534]193 The two other commands prevent installation of manual pages that
194 are already installed by <application>Man-pages</application> in LFS.
[9a3142c]195 </para>
196
197 <para>
[c0464a8]198 <command>sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD YESCRYPT@' -e
[4635a45d]199 's@/var/spool/mail@/var/mail@' -e '/PATH=/{s@/sbin:@@;s@/bin:@@}'
200 -i etc/login.defs</command>: Instead of using the default 'DES'
[c0464a8]201 method, this command modifies the installation to use the much more
202 secure 'YESCRYPT' method of hashing passwords, which also allows
203 passwords longer than eight characters. The command also changes the
[4635a45d]204 obsolete <filename class="directory">/var/spool/mail</filename> location
205 for user mailboxes that <application>Shadow</application> uses by
206 default to the <filename class="directory">/var/mail</filename>
207 location. It also changes the default path to be consistent with that
208 set in LFS.
[9a3142c]209 </para>
[e6527c7d]210
[9a3142c]211 <para>
[e6527c7d]212 <parameter>--without-libbsd</parameter>: Prevents looking for the
213 <command>readpassphrase</command> function, which can be found only in
214 <filename class="libraryfile">libbsd</filename>, which we do not
215 have in BLFS. An internal implementation of
216 <command>readpassphrase</command> is used instead.
[9a3142c]217 </para>
[e6527c7d]218<!-- This is the default
[49ee2def]219 <para>
[e6527c7d]220 <parameter>-\-with-group-name-max-length=32</parameter>: The maximum
[f1d7196]221 user name is 32 characters. Make the maximum group name the same.
[49ee2def]222 </para>
[e6527c7d]223 -->
[7af20d4]224<!--
[cacd76ad]225 <para>
[7af20d4]226 <parameter>-\-without-su</parameter>: Don't reinstall
[8ddd8400]227 <command>su</command> because upstream recommends using the
[cacd76ad]228 <command>su</command> command from <xref linkend='util-linux'/>
229 when <application>Linux-PAM</application> is available.
230 </para>
[7af20d4]231-->
[322f172]232 </sect2>
[b4b71892]233
[1189cb89]234<!-- Now, /etc/default/useradd is not reinstalled anymore, and this
235 configuration has been done in lfs
[e807ae1d]236 <sect2 role="configuration">
237 <title>Configuring Shadow</title>
238
[9a3142c]239 <para>
240 <application>Shadow</application>'s stock configuration for the
241 <command>useradd</command> utility may not be desirable for your
242 installation. One default parameter causes <command>useradd</command> to
243 create a mailbox file for any newly created user.
244 <command>useradd</command> will make the group ownership of this file to
245 the <systemitem class="groupname">mail</systemitem> group with 0660
246 permissions. If you would prefer that these mailbox files are not created
247 by <command>useradd</command>, issue the following command as the
248 <systemitem class="username">root</systemitem> user:
249 </para>
[e807ae1d]250
[bca744f]251<screen role="root"><userinput>sed -i 's/yes/no/' /etc/default/useradd</userinput></screen>
[e807ae1d]252 </sect2>
[1189cb89]253-->
[322f172]254 <sect2 role="configuration">
255 <title>Configuring Linux-PAM to Work with Shadow</title>
[b4b71892]256
[8f68b03]257 <note>
[9a3142c]258 <para>
259 The rest of this page is devoted to configuring
260 <application>Shadow</application> to work properly with
261 <application>Linux-PAM</application>. If you do not have
262 <application>Linux-PAM</application> installed, and you reinstalled
263 <application>Shadow</application> to support strong passwords via the
264 <application>CrackLib</application> library, no further configuration is
265 required.
266 </para>
[8f68b03]267 </note>
268
[322f172]269 <sect3 id="pam.d">
270 <title>Config Files</title>
[b4b71892]271
[9a3142c]272 <para>
273 <filename>/etc/pam.d/*</filename> or alternatively
274 <filename>/etc/pam.conf</filename>,
275 <filename>/etc/login.defs</filename> and
276 <filename>/etc/security/*</filename>
277 </para>
[b4b71892]278
[322f172]279 <indexterm zone="shadow pam.d">
280 <primary sortas="e-etc-pam.d">/etc/pam.d/*</primary>
281 </indexterm>
[2197589]282
[322f172]283 <indexterm zone="shadow pam.d">
284 <primary sortas="e-etc-pam.conf">/etc/pam.conf</primary>
285 </indexterm>
[4fcf20a5]286
[1ba671c]287 <indexterm zone="shadow pam.d">
288 <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
289 </indexterm>
290
291 <indexterm zone="shadow pam.d">
292 <primary sortas="e-etc-security">/etc/security/*</primary>
293 </indexterm>
[322f172]294 </sect3>
295
296 <sect3>
297 <title>Configuration Information</title>
298
[9a3142c]299 <para>
300 Configuring your system to use <application>Linux-PAM</application> can
301 be a complex task. The information below will provide a basic setup so
302 that <application>Shadow</application>'s login and password
303 functionality will work effectively with
304 <application>Linux-PAM</application>. Review the information and links
305 on the <xref linkend="linux-pam"/> page for further configuration
306 information. For information specific to integrating
307 <application>Shadow</application>, <application>Linux-PAM</application>
[19d6c39]308 and <application>libpwquality</application>, you can visit the
309 following link:
[9a3142c]310 </para>
[8f68b03]311
312 <itemizedlist spacing="compact">
[9a3142c]313 <listitem>
[cd29bc9]314 <!-- Old URL redirects to here. -->
[9a3142c]315 <para>
[cd29bc9]316 <ulink url="https://deer-run.com/users/hal/linux_passwords_pam.html"/>
[9a3142c]317 </para>
318 </listitem>
[8f68b03]319 </itemizedlist>
320
[1ba671c]321 <sect4 id="pam-login-defs">
322 <title>Configuring /etc/login.defs</title>
323
[9a3142c]324 <para>
325 The <command>login</command> program currently performs many functions
326 which <application>Linux-PAM</application> modules should now handle.
327 The following <command>sed</command> command will comment out the
328 appropriate lines in <filename>/etc/login.defs</filename>, and stop
329 <command>login</command> from performing these functions (a backup
330 file named <filename>/etc/login.defs.orig</filename> is also created
331 to preserve the original file's contents). Issue the following
332 commands as the <systemitem class="username">root</systemitem> user:
333 </para>
[1ba671c]334
335 <indexterm zone="shadow pam-login-defs">
336 <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
337 </indexterm>
338
339<screen role="root"><userinput>install -v -m644 /etc/login.defs /etc/login.defs.orig &amp;&amp;
[265c7da]340for FUNCTION in FAIL_DELAY \
341 FAILLOG_ENAB \
342 LASTLOG_ENAB \
343 MAIL_CHECK_ENAB \
344 OBSCURE_CHECKS_ENAB \
345 PORTTIME_CHECKS_ENAB \
346 QUOTAS_ENAB \
347 CONSOLE MOTD_FILE \
348 FTMP_FILE NOLOGINS_FILE \
349 ENV_HZ PASS_MIN_LEN \
350 SU_WHEEL_ONLY \
351 CRACKLIB_DICTPATH \
352 PASS_CHANGE_TRIES \
353 PASS_ALWAYS_WARN \
[574d896d]354 CHFN_AUTH ENCRYPT_METHOD \
355 ENVIRON_FILE
[1ba671c]356do
[9a3142c]357 sed -i "s/^${FUNCTION}/# &amp;/" /etc/login.defs
[1ba671c]358done</userinput></screen>
359 </sect4>
360
361 <sect4>
362 <title>Configuring the /etc/pam.d/ Files</title>
363
[9a3142c]364 <para>
365 As mentioned previously in the <application>Linux-PAM</application>
366 instructions, <application>Linux-PAM</application> has two supported
367 methods for configuration. The commands below assume that you've
368 chosen to use a directory based configuration, where each program has
369 its own configuration file. You can optionally use a single
370 <filename>/etc/pam.conf</filename> configuration file by using the
371 text from the files below, and supplying the program name as an
372 additional first field for each line.
373 </para>
[1ba671c]374
[9a3142c]375 <para>
[bd2412e]376 As the <systemitem class="username">root</systemitem> user, create
[9a3142c]377 the following <application>Linux-PAM</application> configuration files
378 in the <filename class="directory">/etc/pam.d/</filename> directory
379 (or add the contents to the <filename>/etc/pam.conf</filename> file)
380 using the following commands:
381 </para>
[1ba671c]382 </sect4>
[322f172]383
384 <sect4>
[3e8fb4c]385 <title>'login'</title>
386
387<screen role="root"><userinput>cat &gt; /etc/pam.d/login &lt;&lt; "EOF"
388<literal># Begin /etc/pam.d/login
389
390# Set failure delay before next prompt to 3 seconds
391auth optional pam_faildelay.so delay=3000000
392
393# Check to make sure that the user is allowed to login
394auth requisite pam_nologin.so
395
[0d7900a]396# Check to make sure that root is allowed to login
[d265d4c]397# Disabled by default. You will need to create /etc/securetty
398# file for this module to function. See man 5 securetty.
399#auth required pam_securetty.so
[3e8fb4c]400
401# Additional group memberships - disabled by default
402#auth optional pam_group.so
403
[a5b9f1e]404# include system auth settings
[3e8fb4c]405auth include system-auth
406
407# check access for the user
408account required pam_access.so
409
[a5b9f1e]410# include system account settings
[3e8fb4c]411account include system-account
412
413# Set default environment variables for the user
414session required pam_env.so
415
416# Set resource limits for the user
417session required pam_limits.so
418
419# Display the message of the day - Disabled by default
420#session optional pam_motd.so
421
422# Check user's mail - Disabled by default
423#session optional pam_mail.so standard quiet
424
[a5b9f1e]425# include system session and password settings
[3e8fb4c]426session include system-session
427password include system-password
428
429# End /etc/pam.d/login</literal>
430EOF</userinput></screen>
431 </sect4>
432
433 <sect4>
434 <title>'passwd'</title>
[4fcf20a5]435
[322f172]436<screen role="root"><userinput>cat &gt; /etc/pam.d/passwd &lt;&lt; "EOF"
437<literal># Begin /etc/pam.d/passwd
[4fcf20a5]438
[3e8fb4c]439password include system-password
[b4b71892]440
[322f172]441# End /etc/pam.d/passwd</literal>
442EOF</userinput></screen>
443 </sect4>
[4fcf20a5]444
[922e013]445 <sect4>
446 <title>'su'</title>
447
[7af20d4]448<screen role="root"><userinput>cat &gt; /etc/pam.d/su &lt;&lt; "EOF"
[922e013]449<literal># Begin /etc/pam.d/su
450
451# always allow root
452auth sufficient pam_rootok.so
453
454# Allow users in the wheel group to execute su without a password
455# disabled by default
456#auth sufficient pam_wheel.so trust use_uid
457
458# include system auth settings
459auth include system-auth
460
461# limit su to users in the wheel group
[d32d872]462# disabled by default
463#auth required pam_wheel.so use_uid
[922e013]464
465# include system account settings
466account include system-account
467
468# Set default environment variables for the service user
469session required pam_env.so
470
471# include system session settings
472session include system-session
473
474# End /etc/pam.d/su</literal>
475EOF</userinput></screen>
476 </sect4>
477
[bc7e5a7]478 <sect4>
479 <title>'chpasswd' and 'newusers'</title>
480
481<screen role="root"><userinput>cat &gt; /etc/pam.d/chpasswd &lt;&lt; "EOF"
482<literal># Begin /etc/pam.d/chpasswd
483
484# always allow root
485auth sufficient pam_rootok.so
486
487# include system auth and account settings
488auth include system-auth
489account include system-account
490password include system-password
491
492# End /etc/pam.d/chpasswd</literal>
493EOF
494
[c26cfe08]495sed -e s/chpasswd/newusers/ /etc/pam.d/chpasswd >/etc/pam.d/newusers</userinput></screen>
[bc7e5a7]496 </sect4>
497
[322f172]498 <sect4>
499 <title>'chage'</title>
500
501<screen role="root"><userinput>cat &gt; /etc/pam.d/chage &lt;&lt; "EOF"
[2f12da13]502<literal># Begin /etc/pam.d/chage
[3e8fb4c]503
504# always allow root
505auth sufficient pam_rootok.so
506
[bc7e5a7]507# include system auth and account settings
[3e8fb4c]508auth include system-auth
509account include system-account
[b4b71892]510
[322f172]511# End /etc/pam.d/chage</literal>
512EOF</userinput></screen>
513 </sect4>
[b4b71892]514
[322f172]515 <sect4>
[bc7e5a7]516 <title>Other shadow utilities</title>
[39975e9]517
[bc7e5a7]518<screen role="root"><userinput>for PROGRAM in chfn chgpasswd chsh groupadd groupdel \
519 groupmems groupmod useradd userdel usermod
[4fcf20a5]520do
[9a3142c]521 install -v -m644 /etc/pam.d/chage /etc/pam.d/${PROGRAM}
522 sed -i "s/chage/$PROGRAM/" /etc/pam.d/${PROGRAM}
[322f172]523done</userinput></screen>
524
525 <warning>
[9a3142c]526 <para>
527 At this point, you should do a simple test to see if
528 <application>Shadow</application> is working as expected. Open
[cacd76ad]529 another terminal and log in as
530 <systemitem class="username">root</systemitem>, and then run
531 <command>login</command> and login as another user. If you do
532 not see any errors, then all is well and you should proceed with
533 the rest of the configuration. If you did receive errors, stop
534 now and double check the above configuration files manually.
535 Any error is the sign of an error in the above procedure.
[e6ae99a]536 You can also run the
[cacd76ad]537 test suite from the <application>Linux-PAM</application> package
538 to assist you in determining the problem. If you cannot find and
539 fix the error, you should recompile
540 <application>Shadow</application> adding the
541 <option>--without-libpam</option> switch to the
542 <command>configure</command> command in the above instructions
543 (also move the <filename>/etc/login.defs.orig</filename> backup
544 file to <filename>/etc/login.defs</filename>). If you fail to do
545 this and the errors remain, you will be unable to log into your
546 system.
[9a3142c]547 </para>
[322f172]548 </warning>
[349b53dd]549 </sect4>
550
[322f172]551 <sect4 id="pam-access">
552 <title>Configuring Login Access</title>
[4fcf20a5]553
[9a3142c]554 <para>
555 Instead of using the <filename>/etc/login.access</filename> file for
556 controlling access to the system, <application>Linux-PAM</application>
557 uses the <filename class='libraryfile'>pam_access.so</filename> module
558 along with the <filename>/etc/security/access.conf</filename> file.
559 Rename the <filename>/etc/login.access</filename> file using the
560 following command:
561 </para>
[322f172]562
563 <indexterm zone="shadow pam-access">
564 <primary sortas="e-etc-security-access.conf">/etc/security/access.conf</primary>
565 </indexterm>
[ae27cdc]566<!-- to editors: it is a common belief that:
567 if <condition>; then <command>; fi
568 is equivalent to:
569 <condition> && <command>
570 This is not true in bash; try:
571 ([ 0 = 1 ] && echo not reachable); echo $? # echoes 1
572 vs
573 (if [ 0 = 1 ]; then echo not reachable; fi); echo $? # echoes 0
574 So in scripts that may call subshells (for example through sudo) and
575 that need error reporting, the outcome _is_ different. In all
576 cases, for bash, the "if" form should be preferred.-->
577<screen role="root"><userinput>if [ -f /etc/login.access ]; then mv -v /etc/login.access{,.NOUSE}; fi</userinput></screen>
[322f172]578 </sect4>
579
580 <sect4 id="pam-limits">
581 <title>Configuring Resource Limits</title>
582
[9a3142c]583 <para>
584 Instead of using the <filename>/etc/limits</filename> file for
585 limiting usage of system resources,
586 <application>Linux-PAM</application> uses the
587 <filename class='libraryfile'>pam_limits.so</filename> module along
588 with the <filename>/etc/security/limits.conf</filename> file. Rename
589 the <filename>/etc/limits</filename> file using the following command:
590 </para>
[322f172]591
592 <indexterm zone="shadow pam-limits">
593 <primary sortas="e-etc-security-limits.conf">/etc/security/limits.conf</primary>
594 </indexterm>
595
[ae27cdc]596<screen role="root"><userinput>if [ -f /etc/limits ]; then mv -v /etc/limits{,.NOUSE}; fi</userinput></screen>
[74f20a1]597
[bd2412e]598 <caution>
599 <para>
600 Be sure to test the login capabilities of the system before logging
601 out. Errors in the configuration can cause a permanent
602 lockout requiring a boot from an external source to correct the
603 problem.
604 </para>
605 </caution>
[74f20a1]606
[322f172]607 </sect4>
608 </sect3>
[74f20a1]609
[322f172]610 </sect2>
[f45b1953]611
[322f172]612 <sect2 role="content">
613 <title>Contents</title>
[17fb537e]614
[9a3142c]615 <para>
616 A list of the installed files, along with their short descriptions can be
[f586237]617 found at
[50836740]618 <ulink url="&lfs-root;/chapter08/shadow.html#contents-shadow"/>.
[9a3142c]619 </para>
[c627795]620
[322f172]621 </sect2>
[c627795]622
[f45b1953]623</sect1>
Note: See TracBrowser for help on using the repository browser.