Changeset 8a0d0eb2


Ignore:
Timestamp:
08/25/2003 09:42:04 PM (21 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
cfdcaef7
Parents:
1f30432
Message:

neatened text of chapter 6 util-linux and shadow

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2678 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter06
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter06/shadowpwd-inst.xml

    r1f30432 r8a0d0eb2  
    1010be found at <ulink url="&hints-root;shadowpasswd_plus.txt"/>.</para>
    1111
    12 <para>Programs like login, shutdown, uptime, and others want to read
    13 from and to the /var/run/utmp, /var/log/btmp and /var/log/wtmp. These
    14 files contain information about who is currently logged in. They also
    15 contain information about when the conmputer was last booted and
    16 shutdown and a record of bas login attempts.</para>
     12<para>The <userinput>login</userinput>, <userinput>getty</userinput> and
     13<userinput>init</userinput> programs (and some others) maintain a number
     14of logfiles to record who are and who were logged in to the system.  These
     15programs, however, don't create these logfiles when they don't exist, so if
     16you want this logging to occur you will have to create the files yourself.
     17To let the Shadow package (that is installed next) detect these files in their
     18proper place, create them now, with their proper permissions:</para>
    1719
    1820<para>Create these files with their proper permissions by running the
     
    2224chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen></para>
    2325
    24 <para>Shadow hard-codes the path to the passwd binary within itself, but
    25 it does it the wrong way. If no passwd binary is present before
    26 installing Shadow, it (wrongly) assumes that it will be at /bin/passwd,
    27 but then installs its own in /usr/bin/passwd. This will lead to strange
    28 errors about not finding /bin/passwd. To fix workaround this bug in
    29 Shadow, we'll create a dummy passwd file so that it gets hardcoded in
    30 the right place:</para>
     26<para>The <filename>/var/run/utmp</filename> file lists the users that are
     27currently logged in, the <filename>/var/log/wtmp</filename> file who
     28<emphasis>were</emphasis> logged in and when.
     29The <filename>/var/log/lastlog</filename> file shows for each user when he
     30or she last logged in, and the <filename>/var/log/btmp</filename> lists the
     31bad login attempts.</para>
     32
     33<para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary
     34within the binary itself, but does this the wrong way. If before installing
     35Shadow no <userinput>passwd</userinput> binary is present , the package wrongly
     36assumes it is going to be located at <filename>/bin/passwd</filename>,
     37but then installs it in <filename>/usr/bin/passwd</filename>. This will lead
     38to weird errors about not finding <filename>/bin/passwd</filename>. To work
     39around this bug, create a dummy <filename>passwd</filename> file,
     40so that it gets hard-wired properly:</para>
    3141
    3242<para><screen><userinput>touch /usr/bin/passwd</userinput></screen></para>
    3343
    34 <para>Prepare Shadow to be compiled:</para>
     44<para>Now prepare Shadow for compilation:</para>
    3545
    36 <para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib \
    37 &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared</userinput></screen></para>
     46<para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen></para>
    3847
    39 <para>Continue with compiling the package:</para>
     48<para>Compile the package:</para>
    4049
    4150<para><screen><userinput>make</userinput></screen></para>
    4251
    43 <para>Install the package:</para>
     52<para>And install it:</para>
    4453
    4554<para><screen><userinput>make install</userinput></screen></para>
    4655
    47 <para>Shadow uses two files to configure authentication settings for
    48 the system. Install those config files:</para>
     56<para>Shadow uses two files to configure authentication settings for the
     57system. Install these two config files:</para>
    4958
    5059<para><screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen></para>
    5160
    52 <para><filename class="directory">/var/spool/mail</filename> is the
    53 old location of the user mailboxes. The location that is used nowadays
    54 is /var/mail. Issue the following command to modify the mailbox
    55 location:</para>
     61<para>In the old days <filename class="directory">/var/spool/mail</filename>
     62was the location for the user mailboxes, but nowadays <filename
     63class="directory">/var/mail</filename> is used. Change the default mailbox
     64location in the relevant configuration file while copying it to its
     65destination:</para>
    5666
    5767<para><screen><userinput>sed 's%/var/spool/mail%/var/mail%' \
    5868&nbsp;&nbsp;&nbsp;&nbsp;etc/login.defs.linux &gt; /etc/login.defs</userinput></screen></para>
    5969
    60 <para>According to the manpage of <userinput>vipw</userinput>,
    61 a <userinput>vigr</userinput> symlink should exist. Because the
    62 shadow installation procedure doesn't create this symlink, it
    63 must be created manually:</para>
     70<para>According to the man page of <userinput>vipw</userinput>, a
     71<userinput>vigr</userinput> program should exist too. Since the installation
     72procedure doesn't create this program, create a symlink manually:</para>
    6473
    6574<para><screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen></para>
    6675
    67 <para>The <filename>vipw</filename> link is currently pointing
    68 to a non-existing file. Since this file isn't needed here, remove
    69 it:</para>
     76<para>As the <filename>/bin/vipw</filename> symlink is redundant (and even
     77pointing to a non-existent file), remove it:</para>
    7078
    7179<para><screen><userinput>rm /bin/vipw</userinput></screen></para>
    7280
    73 <para>Move the <userinput>sg</userinput> program to the
    74 <filename class="directory">/usr/bin</filename> directory:</para>
     81<para>Now move the <userinput>sg</userinput> program to its proper place:</para>
    7582
    7683<para><screen><userinput>mv /bin/sg /usr/bin</userinput></screen></para>
    7784
    78 <para>Move Shadow's dynamic libraries to a more appropriate location:</para>
     85<para>And move Shadow's dynamic libraries to a more appropriate location:</para>
    7986
    8087<para><screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen></para>
    8188
    82 <para>The libraries have been moved, but some packages expect to
    83 find them in them in the
    84 <filename class="directory">/usr/lib</filename> directory. To account
    85 for this, create the following symlinks:</para>
     89<para>As some packages expect to find the just-moved libraries in
     90<filename>/usr/lib</filename>, create the following symlinks:</para>
    8691
    8792<para><screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so
    8893ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen></para>
    8994
    90 <para>Sh-utils and Shadow Password Suite each install a unique
    91 <filename>groups</filename> program. If you wish, you may remove the
    92 <filename>groups</filename> program installed by the Shadow Password
    93 Suite:</para>
     95<para>Coreutils has already installed a <userinput>groups</userinput> program
     96in <filename>/usr/bin</filename>. If you wish, you can remove the one
     97installed by Shadow:</para>
    9498
    9599<para><screen><userinput>rm /bin/groups</userinput></screen></para>
    96100
    97101</sect2>
     102
  • chapter06/utillinux-inst.xml

    r1f30432 r8a0d0eb2  
    44<title>FHS compliance notes</title>
    55
    6 <para>The FHS recommends that we use /var/lib/hwclock, instead of the
    7 usual /etc, as the location of the adjtime file. To make hwclock
    8 FHS-compliant, run the following:</para>
     6<para>The FHS recommends that we use <filename>/var/lib/hwclock</filename>,
     7instead of the usual <filename>/etc</filename>, as the location for the
     8<filename>adjtime</filename> file. To make the <userinput>hwclock</userinput>
     9program FHS-compliant, run the following:</para>
    910
    1011<para><screen><userinput>cp hwclock/hwclock.c{,.backup}
     
    1819<title>Installation of Util-linux</title>
    1920
    20 <para>Prepare Util-linux to be compiled:</para>
     21<para>Prepare Util-linux for compilation:</para>
    2122
    2223<para><screen><userinput>./configure</userinput></screen></para>
    2324
    24 <para>Continue with compiling the package:</para>
     25<para>Compile the package:</para>
    2526
    2627<para><screen><userinput>make HAVE_SLN=yes</userinput></screen></para>
    2728
    28 <para>The <emphasis>HAVE_SLN</emphasis> option prevents this package,
    29 which was already was installed by Glibc, from being built again.</para>
     29<para>The meaning of the make parameter:</para>
     30<itemizedlist>
     31<listitem><para><userinput>HAVE_SLN=yes</userinput>: This prevents the
     32<userinput>sln</userinput> program (a statically linked
     33<userinput>ln</userinput>, already installed by Glibc) from being built
     34again.</para></listitem>
     35</itemizedlist>
    3036
    31 <para>Finish installing the package:</para>
     37<para>And install the package:</para>
    3238
    3339<para><screen><userinput>make HAVE_SLN=yes install</userinput></screen></para>
Note: See TracChangeset for help on using the changeset viewer.