Bug 2138822

Summary: [RFE] dhcp use systemd-sysusers
Product: [Fedora] Fedora Reporter: Martin Osvald 🛹 <mosvald>
Component: dhcpAssignee: Martin Osvald 🛹 <mosvald>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jorton, mosvald, pavel, pemensik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dhcp-4.4.3-5.P1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-31 16:31:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2095396    

Description Martin Osvald 🛹 2022-10-31 11:03:26 UTC
This bug was initially created as a copy of Bug #2095396

I am copying this bug because: 

It needs to get into Fedora first before implementing it in RHEL9.


Description of problem:
dhcp is using static useradd scripts

Version-Release number of selected component (if applicable):
dhcp-4.4.2-17.b1.el9

How reproducible:
100%

Steps to Reproduce:
1. review %pre
2.
3.

Actual results:
%pre server
# /usr/share/doc/setup/uidgid
%global gid_uid 177
getent group dhcpd >/dev/null || groupadd --force --gid %{gid_uid} --system dhcpd
if ! getent passwd dhcpd >/dev/null ; then
    if ! getent passwd %{gid_uid} >/dev/null ; then
      useradd --system --uid %{gid_uid} --gid dhcpd --home / --shell /sbin/nologin --comment "DHCP server" dhcpd
    else
      useradd --system --gid dhcpd --home / --shell /sbin/nologin --comment "DHCP server" dhcpd
    fi
fi
exit 0


Expected results:
use of system-sysusers 

Additional info:
https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html
https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format

Comment 2 Fedora Update System 2022-10-31 15:57:45 UTC
FEDORA-2022-b9f1cedaaf has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b9f1cedaaf

Comment 3 Fedora Update System 2022-10-31 16:31:26 UTC
FEDORA-2022-b9f1cedaaf has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.