pwdgroup.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <sect1 id="ch05-pwdgroup">
  2. <title>Creating passwd and group files</title>
  3. <?dbhtml filename="pwdgroup.html" dir="chapter05"?>
  4. <para>In order for the user and group root to be recognized and to be able to
  5. login, there needs to be an entry in the /etc/passwd and /etc/group file.
  6. Besides the group root, a couple of other groups are recommended and needed by
  7. packages. The groups with their GID's below aren't part of any standard.
  8. The LSB only recommends besides a group root a group bin to be present
  9. with GID 1. Other group names and GID's can be chosen by the user. Well
  10. written packages don't depend on GID numbers but just use the group
  11. name, since it doesn't matter which GID a group has. Since there
  12. aren't any standards for groups The groups created here are the groups the
  13. MAKEDEV script (the script that creates the device files in the /dev
  14. directory) mentions.</para>
  15. <para>Create a new file <filename>$LFS/etc/passwd</filename> by running the
  16. following command:</para>
  17. <para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" &gt; $LFS/etc/passwd</userinput></screen></para>
  18. <para>Create a new file <filename>$LFS/etc/group</filename> by running the
  19. following:</para>
  20. <para><screen><userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"</userinput>
  21. root:x:0:
  22. bin:x:1:
  23. sys:x:2:
  24. kmem:x:3:
  25. tty:x:4:
  26. tape:x:5:
  27. daemon:x:6:
  28. floppy:x:7:
  29. disk:x:8:
  30. lp:x:9:
  31. dialout:x:10:
  32. audio:x:11:
  33. <userinput>EOF</userinput></screen></para>
  34. </sect1>