aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/pwdgroup.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter05/pwdgroup.sgml')
-rw-r--r--chapter05/pwdgroup.sgml53
1 files changed, 53 insertions, 0 deletions
diff --git a/chapter05/pwdgroup.sgml b/chapter05/pwdgroup.sgml
new file mode 100644
index 000000000..db7343aa6
--- /dev/null
+++ b/chapter05/pwdgroup.sgml
@@ -0,0 +1,53 @@
+<sect1 id="ch05-pwdgroup">
+<title>Creating passwd and group files</title>
+
+<para>
+In order for user and group root to be recognized and to be able to logon
+it needs an entry in the /etc/passwd and /etc/group file. Besides the
+group root a couple of other groups are recommended and needed by
+packages. The groups with their GID's below aren't part of any standard.
+The LSB only recommends besides a group root a group bin to be present
+with GID 1. Other group names and GID's can be chosen by yourself. Well
+written packages don't depend on GID numbers but just use the group
+name, it doesn't matter all that much what GID a group has. Since there
+aren't any standards for groups I won't follow any conventions used by
+Debian, RedHat and others. The groups added here are the groups the
+MAKEDEV script (the script that creates the device files in the /dev
+directory) mentions.
+</para>
+
+<para>
+Create a new file <filename>$LFS/etc/passwd</filename> by running the
+following command:
+</para>
+
+<blockquote><literallayout>
+
+ <userinput>echo "root:x:0:0:root:/root:/bin/bash" &gt;
+ $LFS/etc/passwd</userinput>
+
+</literallayout></blockquote>
+
+<para>
+Create a new file <filename>$LFS/etc/group</filename> by running the
+following:
+</para>
+
+<literallayout>
+
+<userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"</userinput>
+ root:x:0:
+ bin:x:1:
+ sys:x:2:
+ kmem:x:3:
+ tty:x:4:
+ uucp:x:5:
+ daemon:x:6:
+ floppy:x:7:
+ disk:x:8:
+<userinput>EOF</userinput>
+
+</literallayout>
+
+</sect1>
+