Bug 2156900

Summary: /usr/lib/sysusers.d/basic.conf:9: Conflict with earlier configuration for user 'root', ignoring line.
Product: [Fedora] Fedora Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: alciregi, dtardon, fedoraproject, filbranden, karsten, lnykryn, lucab, mosvald, mruprich, msekleta, ovasik, pavel, ryncsn, systemd-maint, yuwatana, zbyszek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-253~rc1-1.fc38 systemd-253~rc2-2.fc38 systemd-251.13-4.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-02 20:18:15 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:

Description Jan Pazdziora (Red Hat) 2022-12-29 11:04:01 UTC
Description of problem:

Installing systemd or running systemd-sysusers produces warning.

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

setup-2.14.3-1.fc38.noarch
systemd-252.4-598.fc38.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. podman run --rm registry.fedoraproject.org/fedora:rawhide bash -c 'dnf install -y systemd && systemd-sysusers'

Actual results:

[...]
  Running scriptlet: systemd-resolved-252.4-598.fc38.x86_64               17/18 
  Installing       : systemd-252.4-598.fc38.x86_64                        18/18 
  Running scriptlet: systemd-252.4-598.fc38.x86_64                        18/18 
/usr/lib/sysusers.d/basic.conf:9: Conflict with earlier configuration for user 'root', ignoring line.
Creating group 'utmp' with GID 22.
Creating group 'input' with GID 104.
Creating group 'kvm' with GID 36.
Creating group 'render' with GID 105.
Creating group 'sgx' with GID 106.
Creating group 'systemd-journal' with GID 190.
Creating group 'systemd-network' with GID 192.
Creating user 'systemd-network' (systemd Network Management) with UID 192 and GID 192.
Creating group 'systemd-oom' with GID 999.
Creating user 'systemd-oom' (systemd Userspace OOM Killer) with UID 999 and GID 999.
Creating group 'systemd-resolve' with GID 193.
Creating user 'systemd-resolve' (systemd Resolver) with UID 193 and GID 193.

  Running scriptlet: systemd-resolved-252.4-598.fc38.x86_64               18/18 
  Running scriptlet: systemd-252.4-598.fc38.x86_64                        18/18 
/usr/lib/sysusers.d/basic.conf:9: Conflict with earlier configuration for user 'root', ignoring line.

  Verifying        : cryptsetup-libs-2.6.0-1.fc38.x86_64                   1/18 
  Verifying        : dbus-1:1.14.4-1.fc38.x86_64                           2/18 
[...]
  systemd-resolved-252.4-598.fc38.x86_64                                        
  xkeyboard-config-2.36-3.fc38.noarch                                           

Complete!
/usr/lib/sysusers.d/basic.conf:9: Conflict with earlier configuration for user 'root', ignoring line.

Expected results:

No such warning.

Additional info:

This is a regression against Fedora 37 with

setup-2.14.1-2.fc37.noarch
systemd-251.10-588.fc37.x86_64

It is caused by a new file 20-setup-users.conf which got added in https://src.fedoraproject.org/rpms/setup/c/9174b59bde57a991c284c10dac749d061f93aaad?branch=rawhide and produces conflict with the basic.conf file:

# grep 'u root' /usr/lib/sysusers.d/*
/usr/lib/sysusers.d/20-setup-users.conf:u root 0:0 "Super User" /root /bin/bash
/usr/lib/sysusers.d/basic.conf:u root    0     "Super User" /root

On Fedora 37, /usr/lib/sysusers.d/20-*.conf do not exist.

Comment 1 Martin Osvald 🛹 2022-12-29 14:18:05 UTC
Thank you very much for reporting this problem Jan!

I am switching this to systemd component as according to what I found some time ago this is a systemd-sysusers problem where it cannot skip silently all user entries with the same elements although it is supposed to do that.

For more information about this behavior/warning message see the discussion here:

https://pagure.io/setup/pull-request/46#comment-180394

This conflicting message appears to be harmless (but should be definitely silenced):

https://pagure.io/setup/pull-request/46#comment-180438

CCing also Luca Bruno to be aware of this report.

Comment 2 Martin Osvald 🛹 2023-01-25 06:31:18 UTC
*** Bug 2163787 has been marked as a duplicate of this bug. ***

Comment 3 Zbigniew Jędrzejewski-Szmek 2023-01-25 16:06:09 UTC
This should be fixed in rawhide now. Please reopen if it still occurs.

Comment 4 Michal Ruprich 2023-01-31 10:05:00 UTC
Hi Zbigniew,

I've just hit this with systemd-253~rc1-3.fc38.x86_64. Simple reproducer, try to install tcpdump or wireshark in Rawhide.
# cat /etc/redhat-release
Fedora release 38 (Rawhide)
# rpm -q systemd
systemd-253~rc1-3.fc38.x86_64
# dnf -y install tcpdump
....
Running transaction
  Preparing        :                                                                                               1/1 
  Running scriptlet: tcpdump-14:4.99.3-2.fc38.x86_64                                                               1/1 
  Installing       : tcpdump-14:4.99.3-2.fc38.x86_64                                                               1/1 
  Running scriptlet: tcpdump-14:4.99.3-2.fc38.x86_64                                                               1/1 
/usr/lib/sysusers.d/basic.conf:9: Conflict with earlier configuration for user 'root', ignoring line.

  Verifying        : tcpdump-14:4.99.3-2.fc38.x86_64                                                               1/1 
Completion plugin: Generating completion cache...
Installed: tcpdump-14:4.99.3-2.fc38.x86_64

Installed:
  tcpdump-14:4.99.3-2.fc38.x86_64                                                                                      

Complete!

# cat /usr/lib/sysusers.d/tcpdump.conf
#Type Name       ID                  GECOS              Home directory Shell
u     tcpdump    72                  "tcpdump"          -              -

I don't think this is an issue in tcpdump, the sysusers file is pretty simple.

Regads,
Michal

Comment 5 Zbigniew Jędrzejewski-Szmek 2023-01-31 12:11:20 UTC
Yes, it looks like a bug in the detection to filter out matching duplicates.

Comment 6 Zbigniew Jędrzejewski-Szmek 2023-01-31 16:18:32 UTC
https://github.com/systemd/systemd/pull/26270
(but also https://github.com/systemd/systemd/pull/26269)

Comment 7 Fedora Update System 2023-02-02 20:11:45 UTC
FEDORA-2023-2ac77d299f has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-2ac77d299f

Comment 8 Fedora Update System 2023-02-02 20:18:15 UTC
FEDORA-2023-2ac77d299f has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-03-03 19:55:00 UTC
FEDORA-2023-f72fbc711a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f72fbc711a

Comment 10 Fedora Update System 2023-03-04 03:10:10 UTC
FEDORA-2023-f72fbc711a has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f72fbc711a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f72fbc711a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-03-05 02:31:25 UTC
FEDORA-2023-f72fbc711a has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f72fbc711a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f72fbc711a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-03-07 01:33:10 UTC
FEDORA-2023-f72fbc711a has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.