+++ This bug was initially created as a clone of Bug #2028072 +++ Description of problem: When install dhcp-server the instalation proces reports: Running transaction Preparing : 1/1 Running scriptlet: dhcp-server-12:4.4.2-16.b1.fc35.x86_64 1/1 useradd warning: dhcpd's uid 177 outside of the SYS_UID_MIN 201 and SYS_UID_MAX 999 range. Version-Release number of selected component (if applicable): dhcp-server-12:4.4.2-16.b1.fc35.x86_64 How reproducible: every time Steps to Reproduce: 1. fresh install fedora 35 2. install dhcp-server Actual results: dhcpd user with uid 177 is created Expected results: dhcpd user within allowed range is created Additional info: --- Additional comment from Martin Osvald on 2022-02-15 15:09:12 CET --- (In reply to Lukas Herbolt from comment #0) ... > Expected results: > dhcpd user within allowed range is created This is not a bug, but intended behavior. UID/GID 177 for dhcpd has been reserved for a very long time as for the other services mentioned in the following file: ~~~ $ egrep 'dhcp|UID' /usr/share/doc/setup*/uidgid NAME UID GID HOME SHELL PACKAGES dhcpd 177 177 / /sbin/nologin dhcp $ ~~~ When looking at how some of the other services solve this: ~~~ /usr/sbin/useradd -g 23 -u 23 -d /var/spool/squid -r -s /sbin/nologin squid >/dev/null 2>&1 || exit 1 /usr/sbin/useradd -u %{bind_uid} -r -N -M -g named -s /sbin/nologin -d /var/named -c Named named >/dev/null 2>&1 || :; /usr/sbin/useradd -M -N -g postgres -o -r -d /var/lib/pgsql -s /bin/bash \ -c "PostgreSQL Server" -u 26 postgres >/dev/null 2>&1 || : ~~~ They simply redirect useradd/groupadd output into /dev/null and I will do the same in the next dhcp update. --- Additional comment from Martin Osvald on 2022-02-17 14:02:50 CET --- Noticed this old squid BZ: Bug 118718 - RPM install doesn't stop in case of user can' be added which means that those who simply redirect to /dev/null might get into problems and miss reporting the error to the user e.g. when the passwd db file is locked (/etc/passwd.lock exists). Just fixed the same issue for cyrus-imapd and the below allows filtering out the warning message, to see the other possible errors and exit on them: ~~~ %pre +# /bin/sh does not declare it before the first use +PIPESTATUS=( 0 ) # Create 'cyrus' user on target host getent group saslauth >/dev/null || /usr/sbin/groupadd -g %gid -r saslauth getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /var/lib/imap -g %cyrusgroup \ - -G saslauth -s /sbin/nologin -u %uid -r %cyrususer + -G saslauth -s /sbin/nologin -u %uid -r %cyrususer 2>&1 | grep -v 'outside of the SYS_UID_MIN' | tee +# exit if useradd fails +if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi ~~~
Thanks for reporting this issue! This is not a bug, but intended behavior. UID/GID 177 for dhcpd has been reserved for a very long time as for the other services mentioned in the following file: ~~~ # egrep 'dhcp|UID' /usr/share/doc/setup*/uidgid NAME UID GID HOME SHELL PACKAGES dhcpd 177 177 / /sbin/nologin dhcp # ~~~ This is rather a cosmetic issue which will get fixed in shadow-utils by: http://pkgs.devel.redhat.com/cgit/rpms/shadow-utils/commit/?h=rhel-9-main&id=1fa6b1e5d511c256338e427b077886b0f2ef4776 Therefore closing this as NOTABUG.