%general-entities; ]> Creating the passwd, group, and log Files /etc/passwd /etc/group /var/run/utmp /var/log/btmp /var/log/lastlog /var/log/wtmp A proper Linux system maintains a list of the mounted file systems in the file /etc/mtab. With the way our embedded system is is designed, we will be using a symlink to /proc/mounts: ln -svf ../proc/mounts ${CLFS}/targetfs/etc/mtab In order for user root to be able to login and for the name root to be recognized, there must be relevant entries in the /etc/passwd and /etc/group files. Create the /etc/passwd file by running the following command: cat > ${CLFS}/targetfs/etc/passwd << "EOF" root::0:0:root:/root:/bin/ash EOF The actual password for root (the :: used here is just a placeholder and allow you to login with no password) will be set later. Create the /etc/group file by running the following command: cat > ${CLFS}/targetfs/etc/group << "EOF" root:x:0: bin:x:1: users:x:1000: nogroup:x:65533: nobody:x:65534: EOF The created groups are not part of any standard. The Linux Standard Base (LSB, available at ) recommends only that, besides the group root with a Group ID (GID) of 0, a group bin with a GID of 1 be present. All other group names and GIDs can be chosen freely by the system administrator since well-written programs do not depend on GID numbers, but rather use the group's name. The login, agetty, and init programs (and others) use a number of log files to record information such as who was logged into the system and when. However, these programs will not write to the log files if they do not already exist. Initialize the log files and give them proper permissions: touch ${CLFS}/targetfs/var/run/utmp ${CLFS}/targetfs/var/log/{btmp,lastlog,wtmp} chmod -v 664 ${CLFS}/targetfs/var/run/utmp ${CLFS}/targetfs/var/log/lastlog The /var/run/utmp file records the users that are currently logged in. The /var/log/wtmp file records all logins and logouts. The /var/log/lastlog file records when each user last logged in. The /var/log/btmp file records the bad login attempts.