0

I've just bought an M2 MB Air to replaced my aging intel macbook.

I've got a home server running Ubuntu 22.04 and if provides NFSv4 mounts. My UID under Ubuntu is 1000. When I tryed chaning my UID on my M2 machine it had a meltdown. It wouldnt let me access anything and kept telling me that it couldnt verify icloud etc. I assume that this is becase the UIDs of some of the folders in ~/Library were still set to 501 (when I tried to chnage them to 1000 I got permission refused errors). This works fine on my old intel machine. I ended up having to erase and reinstall on the M2 machine (and it was hard work to get this to happen -- a few times I would get errors trying to erase and reinstall). I assume that Ventura on an M2 locks the UIDs of certain folders as an extra security?

Is it possible to change your UID on an M2 Mac (setting up Kerbros on a home network seems overkill).

6
  • Why do you think you need to change your UID? What problem do you believe you are solving? Mar 5, 2023 at 15:49
  • Did you verify that the directory was exported by the NFS server and the client’s (macOS) IP address is in /etc/exports?
    – Allan
    Mar 5, 2023 at 16:02
  • I want to change the UIDs so the the UIDs (so files owners and groups, and by implication permissions) match between the NFS server and client. Otherwise the Mac mounts the NFS disk and the file owners on the mounted disk are effectively incorrect Mar 5, 2023 at 17:31
  • Yes -- the directrory is exported by the NFS server and the clients can all mount it. Mar 5, 2023 at 17:32
  • @NickSillito Well, what you need to do is configure the NFS server correctly, not try to break the Mac. You may find serverfault.com/questions/514118/… and superuser.com/questions/1682950/… helpful. Mar 5, 2023 at 22:24

1 Answer 1

1

I haven't been able to figure out a way to change a user's in MacOS Ventura. As near as I can tell, it's impossible. There are so many places in the system which store your keychain, access to your Apple ID, etc., that if you try changing the uid in the advanced options of the UI, it will end up making your account non-functional.

I discovered this the hard way, but fortunately, I had created a second administrator account on the system, so I was able to use this to recover. So first, I logged into that second account, and deleted my first account. I didn't bother backing up my home directory since I hadn't stored anything in it yet --- It was a brand-new Macbook Air M2, after all. :-)

I then opened a Terminal window, and ran the command "sudo su", and with the root shell, I then ran the following commands:

# sysadminctl interactive -addUser appleseed --FullName "Johnny Appleseed" UID 15612
# sysadminctl interactive -secureTokenOn tytso

(Replace "appleseed", "Johnny Appleseed", and "15612" as appropriate.)

Then open the System Preferences, select "Users & Groups", and set a password via "Reset Password", and then enable the account as an Administrator (if desired). Then reboot.

Viola! A user account set with the desired User ID. You can now login to the new user account, and MacOS will go through the normal new user dialog boxes asking you for your Apple ID, etc.

Note: if you look at the Advanced Options for the newly created user before you reboot, you will see 501 or 502 user id, as opposed to the one that you set via sysadminctl. Have faith! After you reboot, it will display the UID that was set via sysadminctl.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .