Bug 80624 - GID != UID
Product: Fedora
Classification: Fedora
Component: system-config-users (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nils Philippsen
Depends On:
Blocks: 79579 CambridgeTarget
  Show dependency treegraph
Reported: 2002-12-28 18:01 EST by starback
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-23 11:39:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description starback 2002-12-28 18:01:19 EST
Description of problem:

Private gids aren't the same as uids, even when that would be possible.

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


How reproducible:

Steps to Reproduce:
1. Start redhat-config-users and add a user
2. Check create private group and specify user id manually.
3. Select a higher uid than the existing ones
Actual results:

The gid for the new user's private group will be the next free gid.
On a fresh system it will be 500.

Expected results:

I expected the gid of the new user's private group to be the same
as the uid, as it's convenient to have uid = gid for private groups.

Additional info:
Comment 1 Brent Fox 2003-01-07 15:58:21 EST
nalin, is there a way that libuser could tell us what the lowest unallocated uid
and gid is?
Comment 2 Brent Fox 2003-01-15 18:00:25 EST
Changing component to libuser since it is what decides what UID to allocate to a
new user and group.
Comment 3 Miloslav Trmač 2004-09-01 13:46:39 EDT
The lowest unallocated uid/gid is available as

When creating an user, s-c-users currently:
* creates an user entity
  This also calls lu_user_default (), filling the entity with
  a default (first unallocated) UID and GID and interpreting the
  config file, which by default sets GID == UID [without checking
  whether the GID already exists and without making sure the
  group gets created, but that's another story]
* modifies the user entity, including setting the UID manually,
  if needed
* if a private group is desired:
  - creates a group entity
    This calls lu_group_default(), filling a default GID
  - sets user->GID = group->GID
  - creates the group
* creates the user

I can't see any reasonable place where libuser would cause the GID
to be equal to UID.

s-c-users, OTOH, has the following possibilities:
* check whether "UID" is a free GID value, and set it in the
  group entity manually if it is free
* use the GID from user entity, check whether it is a free GID value,
  and set it in the group entity if it is free
  (this depends on the default libuser config which specifies
  userdefaults/LU_GIDNUMBER = %u).
Comment 4 Nils Philippsen 2004-09-15 05:24:03 EDT
system-config-users-1.2.19-1 should have a fix for this.

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