RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 693483 - Duplicate GIDs
Summary: Duplicate GIDs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Identity_Management_Guide
Version: 6.1
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Deon Ballard
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
: 697887 698240 698258 698671 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-04 19:27 UTC by Sigbjorn Lie
Modified: 2015-01-04 23:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 18:21:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1533 0 normal SHIPPED_LIVE Moderate: ipa security and bug fix update 2011-12-06 01:23:31 UTC

Description Sigbjorn Lie 2011-04-04 19:27:43 UTC
There seem to be a bug in the relation between user private groups and public groups. When a user is created, the private group is created with same GID as the users UID. Looks OK until I create a public group with the same GID. Read on.

# ipa user-add user1 --uid=50201 --first="User" --last="Name"
------------------
Added user "user1"
------------------
  User login: user1
  First name: User
  Last name: Name
  Full name: User Name
  Display name: User Name
  Initials: UN
  Home directory: /home/user1
  GECOS field: user1
  Login shell: /bin/bash
  Kerberos principal: user1.COM
  UID: 50201

# ipa group-find --private --gid=50201
---------------
1 group matched
---------------
  Group name: user1
  Description: User private group for user1
  GID: 50201
----------------------------
Number of entries returned 1
----------------------------

# ipa group-add group1 --gid=50201 --desc="Group1"
--------------------
Added group "group1"
--------------------
  Group name: group1
  Description: Group1
  GID: 50201

So far so good, but look what happens when I use getent to get the GID for the user private group and the public group:

# getent group group1
group1:*:50201:
# getent group user1
user1:*:378400003:

A random GID has been selected for the user private group.

If I do this the other way around, creating a new user, then looking up the GID for the users private group using getent, followed by creating a group with the same GID, and looking up the groups GID using getent, the result is reversed. Also if I look up the public group using ipa group-find a different GID is returned than what was returned by getent. All this happens without a single error or warning from IPA.

# ipa user-add user2 --uid=50202 --first="User" --last="Name"
------------------
Added user "user2"
------------------
  User login: user2
  First name: User
  Last name: Name
  Full name: User Name
  Display name: User Name
  Initials: UN
  Home directory: /home/user2
  GECOS field: user2
  Login shell: /bin/bash
  Kerberos principal: user2.COM
  UID: 50202


# getent group user2
user2:*:50202:



# ipa group-add group2 --gid=50202 --desc="Group2"
--------------------
Added group "group2"
--------------------
  Group name: group2
  Description: Group2
  GID: 50202


# getent group user2
user2:*:50202:


# getent group group2
group2:*:378400004:


# ipa group-find group2
---------------
1 group matched
---------------
  Group name: group2
  Description: Group2
  GID: 50202
----------------------------
Number of entries returned 1
----------------------------

Comment 2 RHEL Program Management 2011-04-04 19:43:35 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Dmitri Pal 2011-04-04 19:44:20 UTC
https://fedorahosted.org/freeipa/ticket/1156

Comment 4 Rob Crittenden 2011-05-11 18:02:50 UTC
*** Bug 697887 has been marked as a duplicate of this bug. ***

Comment 5 Rob Crittenden 2011-05-11 18:03:32 UTC
Duplicate UIDs are also possible.

Comment 6 Rob Crittenden 2011-05-11 18:04:58 UTC
We are going to treat this as a documentation issue

Comment 7 Dmitri Pal 2011-05-13 21:53:19 UTC
*** Bug 698671 has been marked as a duplicate of this bug. ***

Comment 8 Michael Hideo 2011-05-30 23:59:15 UTC
Hi Deon, over to you. - Mike

Comment 9 Deon Ballard 2011-07-14 22:31:05 UTC
The basic situation is that the DNA Plug-in makes sure that all *server* assigned UID/GID numbers are unique, because it assigns a discete range to each server or replica and then numbers are assigned sequentially. So, there's no overlap and no duplication. However, the DNA Plug-in doesn't enforce numbers that are *manually* assigned, so the duplicate situation can occur.

I added a note the GID/UID range management section:
http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/96.2/html/Enterprise_Identity_Management_Guide/Managing-Unique_UID_and_GID_Attributes.html

And to the adding users sectoin (near the bottom of the page):
http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/96.2/html/Enterprise_Identity_Management_Guide/adding-users.html

And to the adding groups section (just scroll a little):
http://documentation-stage.bne.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/96.2/html/Enterprise_Identity_Management_Guide/user-groups.html#Configuring_IPA_Groups-Creating_IPA_Groups

Comment 10 Deon Ballard 2011-07-14 22:33:30 UTC
*** Bug 698240 has been marked as a duplicate of this bug. ***

Comment 11 Deon Ballard 2011-07-14 22:34:09 UTC
*** Bug 698258 has been marked as a duplicate of this bug. ***

Comment 14 Jenny Severance 2011-10-26 15:48:57 UTC
Please explain what was changed in the code with  "ipa-2.1.0-1.el6"  if this is supposed to be a documentation bug?

Comment 15 Rob Crittenden 2011-10-26 17:33:15 UTC
Fixed-in version was set inadvertently, cleared.

Comment 17 errata-xmlrpc 2011-12-06 18:21:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1533.html


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