Bug 2139054

Summary: [RFE] cyrus-imapd user systemd-sysusers
Product: [Fedora] Fedora Reporter: Martin Osvald 🛹 <mosvald>
Component: cyrus-imapdAssignee: Martin Osvald 🛹 <mosvald>
Status: MODIFIED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: fhrdina, jorton, j, mosvald, pavel, vanmeeuwen+fedora, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2095381    

Description Martin Osvald 🛹 2022-11-01 07:34:42 UTC
This bug was initially created as a copy of Bug #2095381

I am copying this bug because: 

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


Description of problem:
cyrus-imapd is using static useradd scripts

Version-Release number of selected component (if applicable):
cyrus-imapd-3.4.1-6.el9.src.rpm

How reproducible:
100%

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

Actual results:
%pre
# 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

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 1 Martin Osvald 🛹 2022-11-02 14:56:28 UTC
This cannot be implemented without fixing sysusers.generate-pre.sh script first:

https://src.fedoraproject.org/rpms/systemd/pull-request/94

Comment 2 Fedora Update System 2023-07-21 12:36:00 UTC
FEDORA-2023-877ef165e7 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-877ef165e7