pwdgroup.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <emphasis>root</emphasis> to be able to login and for the
  5. name "root" to be 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 <emphasis>root</emphasis> (the "x" here is
  12. just a placeholder) will 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. Besides the group "root",
  31. the LSB (<ulink url="http://www.linuxbase.org"/>) recommends only a group
  32. "bin", with a GID of 1, be present. All other group names and GIDs can be
  33. chosen freely by the user, as well-written packages don't depend on GID
  34. numbers but use the group's name.</para>
  35. <para><screen><userinput>exec /stage1/bin/bash --login</userinput></screen></para>
  36. </sect1>