Bug 1309709 - Installation tries to create user with static uid/gid, fails if uid/gid already exists.
Installation tries to create user with static uid/gid, fails if uid/gid alrea...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rtkit (Show other bugs)
7.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Michal Sekletar
qe-baseos-daemons
:
Depends On:
Blocks: 1400961 1472751
  Show dependency treegraph
 
Reported: 2016-02-18 09:31 EST by weimann
Modified: 2017-08-21 04:36 EDT (History)
2 users (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
Description weimann 2016-02-18 09:31:42 EST
Description of problem:

rtkit rpm tries to create user/group rtkit with static uid/gid 172. This fails if another package was installed previously that got assigned this uid. 

This results in GNOME not logging in at all (and a subsequent message that something went wrong), and error messages like 

 > dbus-daemon[756]: Unknown username "rtkit" in message bus configuration file


If I manually change the uid/gid of the conflicting user (unbound in my case) and reinstall rtkit, everything works as expected. 


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

0.11-10.el7


How reproducible:

Happens for every workstation build in my environment. 


Actual results:

user/group rtkit are not created, rtkit doesn't work. 

Expected results:

user rtkit gets assigned a *free*, not a static uid/gid and uses this. 

Additional info:

See the %pre section in the spec file for the rtkit rpm: 
https://git.centos.org/blob/rpms!rtkit/88c2c1e7a968cf0e62c6ad474e1915dccc7b229a/SPECS!rtkit.spec
Comment 5 Michal Sekletar 2017-07-11 09:13:37 EDT
(In reply to weimann from comment #0)
> Expected results:
> 
> user rtkit gets assigned a *free*, not a static uid/gid and uses this. 
> 

This is actually expected. rtkit has static uid/gid reservation (see /usr/share/doc/setup-2.8.71/uidgid). 

Here in %pre from unbound-libs that create unbound user,

getent group unbound >/dev/null || groupadd -r unbound
getent passwd unbound >/dev/null || \
useradd -r -g unbound -d /etc/unbound -s /sbin/nologin \
-c "Unbound DNS resolver" unbound

Above seems to be correct. Script creates system user and group that should get dynamically allocated uid/gid from range SYS_UID_MIN-SYS_UID_MAX.

$ egrep 'SYS_UID_(MIN|MAX)' /etc/login.defs 
SYS_UID_MIN               201
SYS_UID_MAX               999

I don't understand how is it possible that on your system unbound user has UID that is smaller than 201.

Note You need to log in before you can comment on or make changes to this bug.