pwdgroup.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <sect1 id="ch06-pwdgroup">
  2. <title>Creating the passwd and group files</title>
  3. <?dbhtml filename="pwdgroup.html" dir="chapter06"?>
  4. <para>In order for root to be able to login and for the name "root" to be
  5. recognized, there need to be relevant entries in the
  6. <filename>/etc/passwd</filename> and
  7. <filename>/etc/group</filename> files.</para>
  8. <para>Create the <filename>/etc/passwd</filename> file by running the
  9. following command:</para>
  10. <para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" &gt; /etc/passwd</userinput></screen></para>
  11. <para>The actual password for root (the "x" here is just a placeholder) will
  12. be set later.</para>
  13. <para>Create the <filename>/etc/group</filename> file by running the
  14. following command:</para>
  15. <para><screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"</userinput>
  16. root:x:0:
  17. bin:x:1:
  18. sys:x:2:
  19. kmem:x:3:
  20. tty:x:4:
  21. tape:x:5:
  22. daemon:x:6:
  23. floppy:x:7:
  24. disk:x:8:
  25. lp:x:9:
  26. dialout:x:10:
  27. audio:x:11:
  28. <userinput>EOF</userinput></screen></para>
  29. <para>The created groups aren't part of any standard -- they are the groups
  30. that the MAKEDEV script in the next section uses.
  31. Besides the group "root", the LSB recommends only a group "bin", with a GID
  32. of 1, be present. All other group names and GIDs can be chosen freely by
  33. the user, as well-written packages don't depend on GID numbers but use the
  34. group's name.</para>
  35. </sect1>