1 <sect1 id="ch05-pwdgroup">
2 <title>Creating passwd and group files</title>
3 <?dbhtml filename="pwdgroup.html" dir="chapter05"?>
5 <para>In order for the user and group root to be recognized and to be able to
6 login, there needs to be an entry in the /etc/passwd and /etc/group file.
7 Besides the group root, a couple of other groups are recommended and needed by
8 packages. The groups with their GID's below aren't part of any standard.
9 The LSB only recommends a group bin with GID 1 to be present besides
10 group root. Other group names and GID's can be chosen by the user. Well
11 written packages don't depend on GID numbers but just use the group
12 name, so it doesn't matter which GID a group has. Since there
13 aren't any standards for groups the groups created here are the groups the
14 MAKEDEV script (the script that creates the device files in the /dev
15 directory) mentions.</para>
17 <para>Create a new file <filename>$LFS/etc/passwd</filename> by running the
18 following command:</para>
20 <para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" > $LFS/etc/passwd</userinput></screen></para>
22 <para>Create a new file <filename>$LFS/etc/group</filename> by running the
23 following command:</para>
25 <para><screen><userinput>cat > $LFS/etc/group << "EOF"</userinput>
38 <userinput>EOF</userinput></screen></para>