website stat

Changing users’ UID/GID

NFS demands that the UID and GID set on the directories being exported to be the same between client and server.

Having said so, I had to ensure that my user’s UID/GID was the same on the client (Mac OS X) and on the server (Ubuntu). The procedure for changing is the same on both but I chose to do it on the server since it had less files.

The operation is quite straightforward: change the uid and gid and update permissions. To change the UID just do

$ usermod -u

Same operation is done for the GID

$ groupmod -g

Now we need to update file’s permissions. This should do fine

$ sudo find / -user
-exec chown {} \;

$ sudo find / -group
-exec chown : {} \;

That’s it. Hope it will help someone.


No Responses to “Changing users’ UID/GID”

Comments are closed.