Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 693483 - Duplicate GIDs
Duplicate GIDs
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Identity_Management_Guide (Show other bugs)
6.1
Unspecified Linux
unspecified Severity high
: rc
: ---
Assigned To: Deon Ballard
Chandrasekar Kannan
: Documentation
: 697887 698240 698258 698671 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-04 15:27 EDT by Sigbjorn Lie
Modified: 2015-01-04 18:47 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 13:21:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1533 normal SHIPPED_LIVE Moderate: ipa security and bug fix update 2011-12-05 20:23:31 EST

  None (edit)
Description Sigbjorn Lie 2011-04-04 15:27:43 EDT
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@IX.TEST.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@IX.TEST.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 Product and Program Management 2011-04-04 15:43:35 EDT
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 15:44:20 EDT
https://fedorahosted.org/freeipa/ticket/1156
Comment 4 Rob Crittenden 2011-05-11 14:02:50 EDT
*** Bug 697887 has been marked as a duplicate of this bug. ***
Comment 5 Rob Crittenden 2011-05-11 14:03:32 EDT
Duplicate UIDs are also possible.
Comment 6 Rob Crittenden 2011-05-11 14:04:58 EDT
We are going to treat this as a documentation issue
Comment 7 Dmitri Pal 2011-05-13 17:53:19 EDT
*** Bug 698671 has been marked as a duplicate of this bug. ***
Comment 8 Michael Hideo 2011-05-30 19:59:15 EDT
Hi Deon, over to you. - Mike
Comment 9 Deon Ballard 2011-07-14 18:31:05 EDT
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 18:33:30 EDT
*** Bug 698240 has been marked as a duplicate of this bug. ***
Comment 11 Deon Ballard 2011-07-14 18:34:09 EDT
*** Bug 698258 has been marked as a duplicate of this bug. ***
Comment 14 Jenny Galipeau 2011-10-26 11:48:57 EDT
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 13:33:15 EDT
Fixed-in version was set inadvertently, cleared.
Comment 17 errata-xmlrpc 2011-12-06 13:21:22 EST
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.