Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 594256 - wrong users and groups creation in spec file
Summary: wrong users and groups creation in spec file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.0
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Andreas Schwab
QA Contact: Petr Muller
URL:
Whiteboard:
Depends On:
Blocks: 593683
TreeView+ depends on / blocked
 
Reported: 2010-05-20 14:43 UTC by Peter Vrabec
Modified: 2016-11-24 12:03 UTC (History)
5 users (show)

Fixed In Version: glibc-2.12-1.3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 20:29:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Peter Vrabec 2010-05-20 14:43:38 UTC
Description of problem:
Please fix user/group creation in your spec file[1]. There were problems when
(UID != GID) && (UID<200) [2]. For example:
tryitd:x:194:482:TryIt:/:/sbin/nologin

Problem was caused by change/fix of shadow-utis behaviour. useradd does not
create group with same GID as user's UID for IDs < 200 (static/reserved) unless
it's done this way:

getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
  useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
    -c "qemu user" qemu


This issue should be fixed as soon as possible. Note, it can't be resolved by
any update once we have RHEL6 GA. Please fix it in Fedora too. thnx.

--------
[1] https://fedoraproject.org/wiki/Packaging:UsersAndGroups 
[2] https://bugzilla.redhat.com/show_bug.cgi?id=593683

Comment 2 Petr Muller 2010-08-19 13:40:40 UTC
# diff 2.12-1.2.el6/glibc.spec 2.12-1.3.el6/glibc.spec -u
<snippet>

-/usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
-  -c "NSCD Daemon" -u 28 nscd > /dev/null 2>&1 || :
+getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd
+getent passwd nscd >/dev/null ||
+  /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \
+                   -c "NSCD Daemon" -u 28 -g nscd nscd
</snippet>

Moving to VERIFIED.

Comment 3 releng-rhel@redhat.com 2010-11-10 20:29:21 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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