source: chapter06/shadowpwd-inst.xml@ 1f30432

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
Last change on this file since 1f30432 was 4a7a683, checked in by Gerard Beekmans <gerard@…>, 21 years ago

Applied Zack's various-fixes patch.

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

  • Property mode set to 100644
File size: 4.0 KB
Line 
1<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
2
3<sect2>
4<title>Installation of Shadow Password Suite</title>
5
6<para>Before you install this package, you may want to have a look at
7the Shadow hint. It discusses how you can make your system more secure
8regarding passwords, such as how to enable the more secure MD5 passwords
9and how to get the most out of this Shadow package. The Shadow hint can
10be found at <ulink url="&hints-root;shadowpasswd_plus.txt"/>.</para>
11
12<para>Programs like login, shutdown, uptime, and others want to read
13from and to the /var/run/utmp, /var/log/btmp and /var/log/wtmp. These
14files contain information about who is currently logged in. They also
15contain information about when the conmputer was last booted and
16shutdown and a record of bas login attempts.</para>
17
18<para>Create these files with their proper permissions by running the
19following commands:</para>
20
21<para><screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
22chmod 644 /var/run/utmp /var/log/{btmp,lastlog,wtmp}</userinput></screen></para>
23
24<para>Shadow hard-codes the path to the passwd binary within itself, but
25it does it the wrong way. If no passwd binary is present before
26installing Shadow, it (wrongly) assumes that it will be at /bin/passwd,
27but then installs its own in /usr/bin/passwd. This will lead to strange
28errors about not finding /bin/passwd. To fix workaround this bug in
29Shadow, we'll create a dummy passwd file so that it gets hardcoded in
30the right place:</para>
31
32<para><screen><userinput>touch /usr/bin/passwd</userinput></screen></para>
33
34<para>Prepare Shadow to be compiled:</para>
35
36<para><screen><userinput>./configure --prefix=/usr --libdir=/usr/lib \
37&nbsp;&nbsp;&nbsp;&nbsp;--enable-shared</userinput></screen></para>
38
39<para>Continue with compiling the package:</para>
40
41<para><screen><userinput>make</userinput></screen></para>
42
43<para>Install the package:</para>
44
45<para><screen><userinput>make install</userinput></screen></para>
46
47<para>Shadow uses two files to configure authentication settings for
48the system. Install those config files:</para>
49
50<para><screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen></para>
51
52<para><filename class="directory">/var/spool/mail</filename> is the
53old location of the user mailboxes. The location that is used nowadays
54is /var/mail. Issue the following command to modify the mailbox
55location:</para>
56
57<para><screen><userinput>sed 's%/var/spool/mail%/var/mail%' \
58&nbsp;&nbsp;&nbsp;&nbsp;etc/login.defs.linux &gt; /etc/login.defs</userinput></screen></para>
59
60<para>According to the manpage of <userinput>vipw</userinput>,
61a <userinput>vigr</userinput> symlink should exist. Because the
62shadow installation procedure doesn't create this symlink, it
63must be created manually:</para>
64
65<para><screen><userinput>ln -s vipw /usr/sbin/vigr</userinput></screen></para>
66
67<para>The <filename>vipw</filename> link is currently pointing
68to a non-existing file. Since this file isn't needed here, remove
69it:</para>
70
71<para><screen><userinput>rm /bin/vipw</userinput></screen></para>
72
73<para>Move the <userinput>sg</userinput> program to the
74<filename class="directory">/usr/bin</filename> directory:</para>
75
76<para><screen><userinput>mv /bin/sg /usr/bin</userinput></screen></para>
77
78<para>Move Shadow's dynamic libraries to a more appropriate location:</para>
79
80<para><screen><userinput>mv /usr/lib/lib{shadow,misc}.so.0* /lib</userinput></screen></para>
81
82<para>The libraries have been moved, but some packages expect to
83find them in them in the
84<filename class="directory">/usr/lib</filename> directory. To account
85for this, create the following symlinks:</para>
86
87<para><screen><userinput>ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so
88ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so</userinput></screen></para>
89
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
93Suite:</para>
94
95<para><screen><userinput>rm /bin/groups</userinput></screen></para>
96
97</sect2>
Note: See TracBrowser for help on using the repository browser.