pwdgroup.xml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-pwdgroup">
  7. <title>Creating the passwd, group, and log Files</title>
  8. <?dbhtml filename="pwdgroup.html"?>
  9. <para>Create the <filename>/etc/passwd</filename> file:</para>
  10. <screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
  11. root:x:0:0:root:/root:/bin/bash
  12. EOF</userinput></screen>
  13. <para>Create the <filename>/etc/group</filename> file:</para>
  14. <screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
  15. root:x:0:
  16. bin:x:1:
  17. sys:x:2:
  18. kmem:x:3:
  19. tty:x:4:
  20. tape:x:5:
  21. daemon:x:6:
  22. floppy:x:7:
  23. disk:x:8:
  24. lp:x:9:
  25. dialout:x:10:
  26. audio:x:11:
  27. video:x:12:
  28. utmp:x:13:
  29. usb:x:14:
  30. EOF</userinput></screen>
  31. <para>Start a new shell:</para>
  32. <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
  33. <para>Initialize the log files and give them their proper permissions:</para>
  34. <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
  35. chgrp utmp /var/run/utmp /var/log/lastlog
  36. chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen>
  37. </sect1>