Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ 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
~~~
Comment 2Martin Osvald 🛹
2022-07-19 11:48:49 UTC
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.