pwdgroup.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <sect1 id="ch05-pwdgroup">
  2. <title>Creating passwd and group files</title>
  3. <para>
  4. In order for user and group root to be recognized and to be able to logon
  5. it needs an entry in the /etc/passwd and /etc/group file. Besides the
  6. 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 yourself. Well
  10. written packages don't depend on GID numbers but just use the group
  11. name, it doesn't matter all that much what GID a group has. Since there
  12. aren't any standards for groups I won't follow any conventions used by
  13. Debian, RedHat and others. The groups added here are the groups the
  14. MAKEDEV script (the script that creates the device files in the /dev
  15. directory) mentions.
  16. </para>
  17. <para>
  18. Create a new file <filename>$LFS/etc/passwd</filename> by running the
  19. following command:
  20. </para>
  21. <blockquote><literallayout>
  22. <userinput>echo "root:x:0:0:root:/root:/bin/bash" &gt;
  23. $LFS/etc/passwd</userinput>
  24. </literallayout></blockquote>
  25. <para>
  26. Create a new file <filename>$LFS/etc/group</filename> by running the
  27. following:
  28. </para>
  29. <literallayout>
  30. <userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"</userinput>
  31. root:x:0:
  32. bin:x:1:
  33. sys:x:2:
  34. kmem:x:3:
  35. tty:x:4:
  36. uucp:x:5:
  37. daemon:x:6:
  38. floppy:x:7:
  39. disk:x:8:
  40. <userinput>EOF</userinput>
  41. </literallayout>
  42. </sect1>