%general-entities; ]> Creating the passwd, group, and log Files /etc/passwd boot /etc/group boot /var/log/btmp boot /var/log/lastlog boot /var/log/wtmp boot 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 ${CLFS}/etc/passwd file by running the following command: cat > ${CLFS}/etc/passwd << "EOF" root::&uid-root;:&gid-root;:root:/root:/bin/bash bin:x:&uid-bin;:&gid-bin;:/bin:/bin/false daemon:x:&uid-daemon;:&gid-daemon;:/sbin:/bin/false nobody:x:&uid-nobody;:&gid-nogroup;:Unprivileged User:/dev/null:/bin/false EOF The actual password for root (the :: used here is just a placeholder and allows you to login with no password) will be set later. Additional users you may want to add if not already included: adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false Was used for programs that performed administrative tasks. lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false Used by programs for printing mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false Often used by email programs messagebus:x:&uid-messagebus;:&gid-messagebus;:D-Bus Message Daemon User:/dev/null:/bin/false User for D-Bus news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false Often used for network news servers operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash Often used to allow system operators to access the system postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false Generally used as an account that receives all the information of troubles with the mail server Create the ${CLFS}/etc/group file by running the following command: cat > ${CLFS}/etc/group << "EOF" root:x:0: bin:x:&gid-bin;: sys:x:&gid-sys;: kmem:x:&gid-kmem;: tty:x:&gid-tty;: tape:x:&gid-tape;: daemon:x:&gid-daemon;: floppy:x:&gid-floppy;: disk:x:&gid-disk;: lp:x:&gid-lp;: dialout:x:&gid-dialout;: audio:x:&gid-audio;: video:x:&gid-video;: utmp:x:&gid-utmp;: usb:x:&gid-usb;: cdrom:x:&gid-cdrom;: adm:x:&gid-adm;: mail:x:&gid-mail;: wheel:x:&gid-wheel;: nogroup:x:&gid-nogroup;: EOF Additional groups you may want to add if not already included: console:x:&gid-console;: This group has direct access to the console cdrw:x:&gid-cdrw;: This group is allowed to use the CDRW drive messagebus:x:&gid-messagebus;: User for D-Bus news:x:&gid-news;:news Used by Network News Servers users:x:&gid-users;: The default GID used by shadow for new users nobody:x:&gid-nogroup;: This is used by NFS The created groups are not part of any standard—they are groups decided on in part by the requirements of the Systemd configuration in the final system, and in part by common convention employed by a number of existing Linux distributions. 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}/var/log/{btmp,faillog,lastlog,wtmp} chgrp -v &gid-utmp; ${CLFS}/var/log/{faillog,lastlog} chmod -v 664 ${CLFS}/var/log/{faillog,lastlog} chmod -v 600 ${CLFS}/var/log/btmp 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.