Benches macOS

3

Changing your UID and GID

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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...

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    Bill Capehart

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  2. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.

  3. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    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.