fedora-users October 2011 archive
Main Archive Page > Month Archives  > fedora-users archives
fedora-users: Re: updating users and groups (was Re: Announcing

Re: updating users and groups (was Re: Announcing the release of Fedora 16 Beta!!)

From: Patrick O'Callaghan <pocallaghan_at_nospam>
Date: Wed Oct 05 2011 - 03:02:06 GMT
To: users@lists.fedoraproject.org

On Tue, 2011-10-04 at 17:56 -0600, Peter Gueckel wrote:
> I recommend that you manually change the user and group IDs (UID & GID) prior
> to upgrading the system.
>
> On the old system:
>
> usermod -g 1000 username
> usermod -u 1000 username
>
> Then run:
>
> chown -R username:username directory
> chgrp -R username:username directory
>
> for all of your directories.

Don't just do this blindly, especially on large systems with multiple
users. There are two potential problems:

1) You may already have files with user=1000 and/or group=1000. Nothing
in the current Fedora prevents this. Creating a new user.group of
1000.1000 means these files will now belong to user and/or group, which
is probably not what you want.

2) "chown -R ... directory" also assumes that everything in the tree
below "directory" should have the same ownership. This is not a safe
assumption in the general case.

IOW you need to a) check that no 1000.1000 files exist, and b) only
change ownership of files belonging to the (old) values of user and
group. In fact to be really paranoid this should be done twice, once for
user and once for group.

Shell scripts using "find ..." are left as an exercise for the reader.

poc

-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines