On RedHatRed Hat distributions and derivatesderivatives, typically the package installer has a "create user" command inside the pre-install script. So, on CentOS 7, via the rpm -q --scripts httpd we can see
preinstall scriptlet (using /bin/sh): # Add the "apache" group and user /usr/sbin/groupadd -g 48 -r apache 2> /dev/null || : /usr/sbin/useradd -c "Apache" -u 48 -g apache \ -s /sbin/nologin -r -d /usr/share/httpd apache 2> /dev/null || : This tells us a number of things:
- On RedHatRed Hat and derivatesderivatives the user is called
apache - It also tries to create a group called
apache - It wants the userid and groupid to be 48
- But if the user or group already exist then it continues with the install.