Bug 715413 - cgred group added with gid 500
Summary: cgred group added with gid 500
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcgroup
Version: 6.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Schiffer
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
: 719226 (view as bug list)
Depends On:
Blocks: 1020640
TreeView+ depends on / blocked
 
Reported: 2011-06-22 20:06 UTC by Rob Marti
Modified: 2018-11-14 11:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Prior to this update, when installing the libcgroup package, a new group "cgred" was erroneously created as a user group (starting with GID 500) and not as a system group (with GID lower than 500). As a result, newly created users could have had UID different to GID. With this update, the "cgred" group is now created correctly as the system group with GID lower than 500. This update does not change GID of the "cgred" group if the group already exists on the system.
Clone Of:
: 1020640 (view as bug list)
Environment:
Last Closed: 2011-08-31 09:19:30 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1225 0 normal SHIPPED_LIVE libcgroup bug fix update 2011-08-31 09:19:22 UTC

Description Rob Marti 2011-06-22 20:06:11 UTC
Description of problem:
After deploying a new server, I noticed that our user account uid/gid's were one off - for example:

cxc028:x:500:501::/home/cxc028:/bin/bash
rjm002:x:501:502::/home/rjm002:/bin/bash
nwl002:x:502:503::/home/nwl002:/bin/bash

looking in /etc/group gave me my answer:

cgred:x:500:

Is there a reason this system group wasn't added with the -r flag?  The libcgroup rpm runs:

[14:41:42][root@LnxBBColl01d][/root]-> rpm -q --scripts libcgroup
preinstall scriptlet (using /bin/sh):
getent group cgred >/dev/null || groupadd cgred

Version-Release number of selected component (if applicable):
libcgroup-0.37-2.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install libcgroup
2. getent group cgred
  
Actual results:
cgred:x:500:

Expected results:
cgred:x:499:

Additional info:

Comment 1 Rob Marti 2011-06-22 20:16:31 UTC
Correction - Expected results should be cgred:x:498: since cyrus-sasl installed with getent group saslauth >/dev/null || groupadd -r saslauth

Comment 4 Jim Perrin 2011-06-22 20:56:15 UTC
Agreed. This isn't a huge thing, but it's definitely an annoyance and should be resolved. It also changes the expected user/group relationship so folks may get some unexpected behavior from certain tools.

Comment 8 Jan Safranek 2011-07-07 07:38:52 UTC
*** Bug 719226 has been marked as a duplicate of this bug. ***

Comment 11 Steve Snodgrass 2011-07-27 15:36:55 UTC
I just ran into this myself, except cgred stole group 1010 which conflicts with one of my users, and made my puppet manifest crash and burn.  Even worse, I think this is getting installed by puppet as some dependency, so it's a somewhat random race condition whether things work right or not.  The groupadd command in this RPM should definitely use the -r option.

Comment 12 Petr Kovar 2011-07-27 20:59:19 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, when installing the libcgroup package, a new group "cgred" was erroneously created as a user group (starting with GID 500) and not as a system group (with GID lower than 500). As a result, newly created users could have had UID different to GID. With this update, the "cgred" group is now created correctly as the system group with GID lower than 500. This update does not change GID of the "cgred" group if the group already exists on the system.

Comment 13 Mike Gahagan 2011-08-10 18:22:13 UTC
tested by removing the libcgroup from RHEL 6.1 and installing 0.37-3.el6 in its place. If the cgred group already exists with gid 500 it is left alone. Removed libcgroup package again and deleted the cgred group. When reinstalling libcgroup I got a cgred group with gid 495 which was the next available gid < 500 so this bug can be verified.

Comment 14 errata-xmlrpc 2011-08-31 09:19:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1225.html

Comment 15 Fred New 2011-11-08 06:51:18 UTC
Here it is November and libcgroup-0.37-2.el6.x86_64 is still all that's available for RHEL 6.  Since it appears that 0.37-3.el6 will never get released to the public, could we get a workaround for this annoyance?

That is, what files will need chgrp after we do something like
    groupmod -g 495 cgred
?

Comment 16 Jan Safranek 2011-11-08 13:23:15 UTC
I can see the errata was issued on 2011-08-31 and it was a public one. I dunno why you don't see it. Please contact your Red Hat support.

(In reply to comment #15)
> That is, what files will need chgrp after we do something like
>     groupmod -g 495 cgred

Only /bin/cgexec.
/var/run/cgred.socket should be owned by cgred too, but it's dynamically created (and chown-ed) by cgred service.

Comment 17 Jeremy Eder 2011-11-08 13:33:30 UTC
Hi Fred,

I see the errata was posted, but the package is for some reason not available for download on RHN.  I've contacted our release engineering team to resolve this, and will post an update to this BZ once the package is available on RHN.

In the interim, Jan has posted the instructions you were looking for.  I would also like to offer the source RPM for libcgroup-0.37-3 here:

ftp://ftp.redhat.com/pub/redhat/linux/enterprise/6Server/en/os/SRPMS/libcgroup-0.37-3.el6.src.rpm

Comment 18 Fred New 2011-11-08 13:58:54 UTC
Thanks Jan and Jeremy.  I noticed that the sgid bit turned off when I changed the group for /bin/cgexec, so in case anyone else does this you need
     groupmod -g 495 cgred
     chgrp cgred /bin/cgexec
     chmod g+s /bin/cgexec

Comment 19 Jeremy Eder 2011-11-09 11:25:07 UTC
Hi Fred,

This errata was there all along, pushed out through the FasTrack channel:
https://rhn.redhat.com/rhn/software/packages/details/Overview.do?pid=642971

FasTrack provides a means by which errata can be pushed ahead of the next minor release.  You can add "RHEL Server FasTrack" to your system's channel entitlements on RHN, then use yum (I just tested this OK), or download the RPM directly from the link above.

As a note, an updated libcgroup (libcgroup-0.37-3 is in the beta) will ship in the regular RHEL6.2 channel once that's released.


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