About System Users and Groups

Throughout BLFS, many packages install programs that run as daemons or in some way should have a user or group name assigned. Generally these names are used to map a user ID (uid) or group ID (gid) for system use. Generally the specific uid or gid numbers used by these applications are not significant. The exception of course, is that root has a uid and gid of 0 (zero) that is indeed special. The uid values are stored in /etc/passwd and the gid values are found in /etc/group.

Customarily, Unix systems classify users and groups into two categories: system users and regular users. The system users and groups are given low numbers and regular users and groups have numeric values greater than all the system values. The cutoff for these numbers is found in two parameters in the /etc/login.defs configuration file. The default UID_MIN value is 1000 and the default GID_MIN value is 1000. If a specific uid or gid value is not specified when creating a user with useradd or a group with groupadd the values assigned will always be above these cutoff values.

Additionally, the Linux Standard Base recommends that system uid and gid values should be below 100.

Below is a table of suggested uid/gid values used in BLFS beyond those defined in a base LFS installation. These can be changed as desired, but provide a suggested set of consistent values.

Table 3.1. UID/GID Suggested Values

Nameuidgid
bin 1
lp 9
adm 16
atd 1717
messagebus1818
lpadmin  19
named 2020
gdm 2121
fcron 2222
systemd-journal2323
apache 2525
smmsp 2626
polkitd 2727
rpc 2828
exim 3131
postfix 3232
postdrop 33
sendmail34
mail 34
vmailman3535
news 3636
kdm 3737
fetchmail38
mysql 4040
postgres4141
dovecot 4242
dovenull4343
ftp 4545
proftpd 4646
vsftpd 4747
rsyncd 4848
sshd 5050
stunnel 5151
dhcpcd 5252
svn 5656
svntest 57
git 5858
games 6060
kvm 61
wireshark 62
lightdm 6363
sddm 6464
lightdm 6565
scanner 70
colord 7171
systemd-journal-gateway7373
systemd-journal-remote7474
systemd-journal-upload7575
systemd-network7676
systemd-resolve7777
systemd-timesync7878
systemd-coredump7979
uuidd 8080
systemd-oom8181
ldap 8383
avahi 8484
avahi-autoipd8585
netdev 86
ntp 8787
unbound 8888
plugdev 90
wheel 97
anonymous98
nobody 65534
nogroup 65534