Creating passwd and group files

In order for the user and group root to be recognized and to be able to login, there needs to be 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 a group bin with GID 1 to be present besides group root. Other group names and GID's can be chosen by the user. Well written packages don't depend on GID numbers but just use the group name, so it doesn't matter which GID a group has. Since there aren't any standards for groups the groups created here are the groups the MAKEDEV script (the script that creates the device files in the /dev directory) mentions.

Create a new file $LFS/etc/passwd by running the following command:

echo "root:x:0:0:root:/root:/bin/bash" > $LFS/etc/passwd

Create a new file $LFS/etc/group by running the following command:

cat > $LFS/etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tty:x:4:
tape:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
EOF