Bug 189066

Summary: system-config-users gives old GID to new users and changes GID of old users with the new ones
Product: [Fedora] Fedora Reporter: Josep <josep.puigdemont>
Component: system-config-usersAssignee: Nils Philippsen <nphilipp>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-05 10:53:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josep 2006-04-15 11:37:46 UTC
I made a clean install of FC5, and created a user named "josep" with firstboot.
The UID seemed to be 500 and its GID 500. The home directory was created with
the following UID/GID:
$ ls -ldn /home/josep
drwx------ 47 500 500 4096 15 abr 13:20 /home/josep

Also the typical ~/.bash_profile and other files alike (~/.gtkrc) have the same
UID/GID numbers.


After a while I created another user with system-config-users, named "mia". When
I look at its ID I guet unexpected results:
$ id mia
uid=501(mia) gid=500(mia) grups=500(mia)

mia's home directory has the following UID/GID:
$ ls -ldn /home/mia
drwx------ 4 501 500 4096 14 abr 13:10 /home/mia

This seems to be wrong, I guess somehow system-config-users used the wrong GID
counter or something.

This wouldn't be a big problem unless that now I have a mix up of files
belonging to different groups. I believe that all files created after the new
user was added have been given the "wrong" group ID.


Additional info:
Looking at /etc/group, it has these two lines (among others):
josep:!!:501:
mia:x:500:

In the same way, /ets/passwd has the following:
josep:x:500:501:Josep Puigdemont:/home/josep:/bin/bash
mia:x:501:500:Mia Olsson:/home/mia:/bin/bash

Nedlees to say, I didn't manually tempered with either file, I only used system
tools.

If that's relevant, in both files the entry related to "josep" comes always
before the entry related to "mia". 

I also created a third user, but it got the correct UID:GID: 503:503, adding a
fourth one did also give correct numbers.

I plan to manually fix this, by editing the appropiate files, and using "chown"
where needed, but I'll wait a while before acting, in case you need more
information from me.

Comment 1 Nils Philippsen 2007-02-01 16:20:03 UTC
Sorry for getting back on this so late. The current version of the package,
system-config-users-1.2.47, should have some fixes which should avoid that
situation, can you check whether this fixes it for you?

Comment 2 Josep 2007-02-01 21:56:54 UTC
When it came out I installed FC6, and did the same process of creating two new
users, etc, and that problem didn't appear so I guess this is must be fixed now.

For me it's fine to closed the issue now, as I don't think I could help much in
trying to reproduce/debug it, and since I guess I'm the only one that reported
this problem, we can assume it must have been something weird happening on my side.

Thanks.