|
@@ -2,26 +2,25 @@
|
|
|
<title>Creating the passwd and group files</title>
|
|
|
<?dbhtml filename="pwdgroup.html" dir="chapter06"?>
|
|
|
|
|
|
-<para>In order for <emphasis>root</emphasis> to be able to login and for the
|
|
|
-name "root" to be recognized, there need to be relevant entries in the
|
|
|
-<filename>/etc/passwd</filename> and
|
|
|
-<filename>/etc/group</filename> files. Also, to support one of the coreutils
|
|
|
-tests, we will also create the user and group nobody, which is almost
|
|
|
-universally present on Linux computers.</para>
|
|
|
+<para>In order for <emphasis>root</emphasis> to be able to login and for the
|
|
|
+name "root" to be recognized, there need to be relevant entries in the
|
|
|
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename> files.
|
|
|
+Also, to support one of the coreutils tests, we will also create the user and
|
|
|
+group nobody, which is almost universally present on Linux computers.</para>
|
|
|
|
|
|
-<para>Create the <filename>/etc/passwd</filename> file by running the
|
|
|
-following command:</para>
|
|
|
+<para>Create the <filename>/etc/passwd</filename> file by running the following
|
|
|
+command:</para>
|
|
|
|
|
|
<para><screen><userinput>cat > /etc/passwd << "EOF"</userinput>
|
|
|
root:x:0:0:root:/root:/bin/bash
|
|
|
nobody:x:1000:1000:nobody:/:/bin/bash
|
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
|
|
-<para>The actual password for <emphasis>root</emphasis> (the "x" here is
|
|
|
-just a placeholder) will be set later.</para>
|
|
|
+<para>The actual password for <emphasis>root</emphasis> (the "x" here is just a
|
|
|
+placeholder) will be set later.</para>
|
|
|
|
|
|
-<para>Create the <filename>/etc/group</filename> file by running the
|
|
|
-following command:</para>
|
|
|
+<para>Create the <filename>/etc/group</filename> file by running the following
|
|
|
+command:</para>
|
|
|
|
|
|
<para><screen><userinput>cat > /etc/group << "EOF"</userinput>
|
|
|
root:x:0:
|
|
@@ -39,15 +38,22 @@ audio:x:11:
|
|
|
nobody:x:1000:
|
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
|
|
-<para>The created groups aren't part of any standard -- they are the groups
|
|
|
-that the MAKEDEV script in the next section uses. Besides the group "root",
|
|
|
-the LSB (<ulink url="http://www.linuxbase.org"/>) recommends only a group
|
|
|
-"bin", with a GID of 1, be present. All other group names and GIDs can be
|
|
|
-chosen freely by the user, as well-written packages don't depend on GID
|
|
|
-numbers but use the group's name.</para>
|
|
|
+<para>The created groups aren't part of any standard -- they are the groups
|
|
|
+that the MAKEDEV script in the next section uses. Besides the group "root", the
|
|
|
+LSB (<ulink url="http://www.linuxbase.org"/>) recommends only a group "bin",
|
|
|
+with a GID of 1, be present. All other group names and GIDs can be chosen
|
|
|
+freely by the user, as well-written packages don't depend on GID numbers but
|
|
|
+use the group's name.</para>
|
|
|
+
|
|
|
+<para>Lastly, we re-login to the chroot envrionment. User name and group name
|
|
|
+resolution will start working immediately after the
|
|
|
+<filename>/etc/passwd</filename> and <filename>/etc/group<filename> files are
|
|
|
+created, because we installed a full glibc in Chapter 5. This will get rid of
|
|
|
+the <quote>I have no name!</quote> prompt.</para>
|
|
|
|
|
|
<para><screen><userinput>exec /tools/bin/bash --login
|
|
|
set +h</userinput></screen></para>
|
|
|
|
|
|
+
|
|
|
</sect1>
|
|
|
|