Changeset 8a0d0eb2
- Timestamp:
- 08/25/2003 09:42:04 PM (21 years ago)
- 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
- Location:
- chapter06
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/shadowpwd-inst.xml
r1f30432 r8a0d0eb2 10 10 be found at <ulink url="&hints-root;shadowpasswd_plus.txt"/>.</para> 11 11 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 14 of logfiles to record who are and who were logged in to the system. These 15 programs, however, don't create these logfiles when they don't exist, so if 16 you want this logging to occur you will have to create the files yourself. 17 To let the Shadow package (that is installed next) detect these files in their 18 proper place, create them now, with their proper permissions:</para> 17 19 18 20 <para>Create these files with their proper permissions by running the … … 22 24 chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen></para> 23 25 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 27 currently logged in, the <filename>/var/log/wtmp</filename> file who 28 <emphasis>were</emphasis> logged in and when. 29 The <filename>/var/log/lastlog</filename> file shows for each user when he 30 or she last logged in, and the <filename>/var/log/btmp</filename> lists the 31 bad login attempts.</para> 32 33 <para>Shadow hard-wires the path to the <userinput>passwd</userinput> binary 34 within the binary itself, but does this the wrong way. If before installing 35 Shadow no <userinput>passwd</userinput> binary is present , the package wrongly 36 assumes it is going to be located at <filename>/bin/passwd</filename>, 37 but then installs it in <filename>/usr/bin/passwd</filename>. This will lead 38 to weird errors about not finding <filename>/bin/passwd</filename>. To work 39 around this bug, create a dummy <filename>passwd</filename> file, 40 so that it gets hard-wired properly:</para> 31 41 32 42 <para><screen><userinput>touch /usr/bin/passwd</userinput></screen></para> 33 43 34 <para> Prepare Shadow to be compiled:</para>44 <para>Now prepare Shadow for compilation:</para> 35 45 36 <para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib \ 37 --enable-shared</userinput></screen></para> 46 <para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib --enable-shared</userinput></screen></para> 38 47 39 <para>Co ntinue with compilingthe package:</para>48 <para>Compile the package:</para> 40 49 41 50 <para><screen><userinput>make</userinput></screen></para> 42 51 43 <para> Install the package:</para>52 <para>And install it:</para> 44 53 45 54 <para><screen><userinput>make install</userinput></screen></para> 46 55 47 <para>Shadow uses two files to configure authentication settings for 48 the system. Install thoseconfig files:</para>56 <para>Shadow uses two files to configure authentication settings for the 57 system. Install these two config files:</para> 49 58 50 59 <para><screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen></para> 51 60 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> 62 was the location for the user mailboxes, but nowadays <filename 63 class="directory">/var/mail</filename> is used. Change the default mailbox 64 location in the relevant configuration file while copying it to its 65 destination:</para> 56 66 57 67 <para><screen><userinput>sed 's%/var/spool/mail%/var/mail%' \ 58 68 etc/login.defs.linux > /etc/login.defs</userinput></screen></para> 59 69 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 72 procedure doesn't create this program, create a symlink manually:</para> 64 73 65 74 <para><screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen></para> 66 75 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 77 pointing to a non-existent file), remove it:</para> 70 78 71 79 <para><screen><userinput>rm /bin/vipw</userinput></screen></para> 72 80 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> 75 82 76 83 <para><screen><userinput>mv /bin/sg /usr/bin</userinput></screen></para> 77 84 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> 79 86 80 87 <para><screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen></para> 81 88 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> 86 91 87 92 <para><screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so 88 93 ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen></para> 89 94 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 96 in <filename>/usr/bin</filename>. If you wish, you can remove the one 97 installed by Shadow:</para> 94 98 95 99 <para><screen><userinput>rm /bin/groups</userinput></screen></para> 96 100 97 101 </sect2> 102 -
chapter06/utillinux-inst.xml
r1f30432 r8a0d0eb2 4 4 <title>FHS compliance notes</title> 5 5 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>, 7 instead of the usual <filename>/etc</filename>, as the location for the 8 <filename>adjtime</filename> file. To make the <userinput>hwclock</userinput> 9 program FHS-compliant, run the following:</para> 9 10 10 11 <para><screen><userinput>cp hwclock/hwclock.c{,.backup} … … 18 19 <title>Installation of Util-linux</title> 19 20 20 <para>Prepare Util-linux to be compiled:</para>21 <para>Prepare Util-linux for compilation:</para> 21 22 22 23 <para><screen><userinput>./configure</userinput></screen></para> 23 24 24 <para>Co ntinue with compilingthe package:</para>25 <para>Compile the package:</para> 25 26 26 27 <para><screen><userinput>make HAVE_SLN=yes</userinput></screen></para> 27 28 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 34 again.</para></listitem> 35 </itemizedlist> 30 36 31 <para> Finish installingthe package:</para>37 <para>And install the package:</para> 32 38 33 39 <para><screen><userinput>make HAVE_SLN=yes install</userinput></screen></para>
Note:
See TracChangeset
for help on using the changeset viewer.