Comment 12 for bug 542183

Revision history for this message
Peter Valdemar Mørch (pmorch) wrote :

In order to be clear:

Bug #553746 "Cannot Change User and Group ID" is marked as a duplicate of this one (by Milan, btw), Which is why I'm commenting here.

In the original text for that that bug, it says:
> Furthermore, adding a new user gives you no opportunity to set the User ID.

And that is what _I_ need: A new user with a specific user ID. (I have to connect to an NFS volume, where my files already pre-exist with a specific user and group ID - 1000 or 1001 just won't cut it)

Perhaps my situation isn't relevant for this bug, and I should open a new bug for setting the User ID when creating a new user.

But anyway, for my situation, I guess I'll create the new user and group, hand-edit /etc/passwd and /etc/group and then do something like this:

sudo find / -o -uid $olduid -print0 | sudo xargs -0 chown $newuid
sudo find / -o -uid $oldgid -print0 | sudo xargs -0 chgrp $newgid