shadowpwd-inst.xml 4.0 KB

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