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

Question:

Question: I accidentally deleted admin user name

I accidentally deleted admin user name and saved it. Now I unable to change system settings. Even though the user name shows as "admin" in Finder/Home folder, when I enter "admin" as User Name it says it is incorrect.

I found some help on how to change password by logging-in in the recovery mode using your Apple ID. But I cannot change User Name by doing it, just the password. Thank you.

MacBook Air, macOS High Sierra (10.13.3)

Posted on

Reply

Mar 5, 2018 11:39 AM in response to Irina_Timox In response to Irina_Timox

I suggest making a new administrator account. The easiest way to do that is to re-run the Setup Assistant, which is what you used to set up your Mac when it was new (or after you reinstalled macOS). This will not delete any users that are in the system already.


Turn off the Mac and start it up in Single User Mode. You do that by pressing the Power button and holding on Command+S.

When all the text has stopped scrolling, type in the following:


/sbin/fsck -fy

/sbin/mount -uw /
rm /var/db/.AppleSetupDone
reboot now


Please note that Single User Mode will use an American keyboard layout, which may be different than the built-in keyboard if you're from outside the US.

Every time you turn on your Mac, macOS will check if the file .AppleSetupDone is present. If it isn't, it will run the Setup Assistant and let you set up a new administrator account.

Mar 5, 2018 11:39 AM

Reply Helpful
User profile for user: Irina_Timox

Question: I accidentally deleted admin user name