Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Changing your UID and GID

I have a Mac needing to be integrated into our organization's linux network. The owner has a GIDs and a UID on the other side and we need to reconcile it on his Mac, preferably without setting up a new Mac account. I'm not sure I can have him do the same thing I did for mine since I jumped right in with the right UIDs and GIDs almost as soon as I pulled my rig out of the box.

Is there and "easy and safe" path of least resistance here? (Note his "new" GIDs and UIDs are NOT the same number). I'd follow the "google search" items I've found out there if it were my machine but this one isn't mine...

Macbook Pro & G3 iMac, Mac OS X (10.6.2), Mandriva & Fedora Linux, MPICH1&2, Cluster & Grid Computing, Fortran, NCL, IDL

Posted on Dec 7, 2009 9:08 AM

Reply
3 replies

Dec 7, 2009 9:24 AM in response to Bill Capehart

UID can be changed from GUI as follows. go to system preferences->accounts. unlock the lock at the bottom. select an account, control-click and choose "advanced options". you can change the UID there. you'll have to recursively change permissions on the home directory after you do this of course. not sure why you wnat to change GID and to what. leopard and snow leopard use default GID=20 (staff). I would not try to change it. you can of course but I'm not clear why you'd want to.

Dec 7, 2009 9:36 AM in response to V.K.

Thanks VK: Not everyone in the org (e.g., studnets) can't go everywhere so groups are needed.

I'm aware that the gid and uids can be created and changed at Accounts windows, but I was trying to recall if it's as simple as doing a "sudo chown -Rfv me:us *" before rebooting. If it's as easy as that, then shucks, but I kept seeing recommendations for dscl.

Dec 7, 2009 9:44 AM in response to Bill Capehart

it's NOT that easy. first you need to change the directory services record using dscl or the GUI method I mentioned earlier. THEN you do something like

sudo chown -R `id -un`:`id -gn` ~


and it will change the permissions correctly on your home directory. (adjust the above for a different user)

using dscl changing UID and GUID is done as follows

sudo dscl . create /Users/username PrimaryGroupID 450
sudo dscl . create /Users/username UniqueID 450


the above example will set UID and GID to 450.

Changing your UID and GID

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.