pwdgroup.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <sect1 id="ch06-pwdgroup">
  2. <title>Creating passwd and group files</title>
  3. <?dbhtml filename="pwdgroup.html" dir="chapter06"?>
  4. <para>In order for the user and the group "root" to be recognized and to be
  5. able to login, there need to be entries in the /etc/passwd and /etc/group file.
  6. Besides the group "root", a couple of other groups are recommended or needed
  7. by some packages. The groups created below aren't part of any standard.
  8. The LSB only recommends a group "bin" with GID 1 to be present besides
  9. "root". Other group names and GIDs can be chosen by the user.
  10. Well-written packages don't depend on GID numbers, but use the group's
  11. name; so 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>/etc/passwd</filename> by running the
  16. following command:</para>
  17. <para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" &gt; /etc/passwd</userinput></screen></para>
  18. <para>Create a new file <filename>/etc/group</filename> by running the
  19. following command:</para>
  20. <para><screen><userinput>cat &gt; /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>