Bug 2225157

Summary: Backport fix to support user:group notation by sysusers.generate-pre.sh script
Product: Red Hat Enterprise Linux 9 Reporter: Martin Osvald 🛹 <mosvald>
Component: systemdAssignee: systemd maint <systemd-maint>
Status: CLOSED DUPLICATE QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: dtardon, systemd-maint
Target Milestone: rcFlags: pm-rhel: mirror+
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: 2023-07-25 08:21:49 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: 2095381    

Description Martin Osvald 🛹 2023-07-24 12:31:23 UTC
Description of problem:

Please, backport the below patch to RHEL9 so that pkgs like cyrus-imapd can run under a different primary group:

https://src.fedoraproject.org/rpms/systemd/c/83301531c0aa22ffc155096826d8f5250c6a880a?branch=rawhide


Version-Release number of selected component (if applicable):

systemd-rpm-macros-252-15.el9.noarch


How reproducible:

Always


Steps to Reproduce:

1. Have the below in a file as a param to %sysusers_create_compat macro:
~~~
#Type Name     ID             GECOS                 Home directory Shell
g     saslauth 76
g     mail     12
u     cyrus    76:mail        "Cyrus IMAP Server"   /var/lib/imap  /sbin/nologin
m     cyrus    saslauth
~~~


Actual results:

~~~
# dnf install cyrus-imapd-3.4.1-9.el9.x86_64.rpm cyrus-imapd-libs-3.4.1-9.el9.x86_64.rpm cyrus-imapd-utils-3.4.1-9.el9.x86_64.rpm perl-Cyrus-3.4.1-9.el9.x86_64.rpm
...
groupadd: invalid group ID '76:mail'
useradd: invalid user ID '76:mail'
~~~


Expected results:

No errors, user&groups get created properly.


Additional info:

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

Comment 1 David Tardon 2023-07-25 08:21:49 UTC

*** This bug has been marked as a duplicate of bug 2217149 ***