Apple Event: May 7th at 7 am PT

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

Accidentally deleted the admin user

I accidentally deleted the admin user . Now I can't change my user to admin . Now it is asking an administrator's name and password to allow it and there is no administrator name or password . Is there any way I can revert back my changes . Please answer my question immediately .

MacBook Air 13", 10.13

Posted on Feb 16, 2019 7:51 AM

Reply
Question marked as Best reply

Posted on Feb 16, 2019 8:52 AM


You can create a new administrator account by restarting the Apple Setup.


Even though this Setup Assistant only runs once when you first install Mac OS X / macOS, it remains on your computer and is prevented from running by the presences of a hidden file called <.AppleSetupDone> in a system folder on your Mac.


Therefore, to have the Setup Assistant run again so you can create a fresh admin account, you simply need to remove this file




  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold ⌘ + S
  2. until you see a black screen with white lettering. (If you end up back
  3. on the login screen after a flash of the black screen with white
  4. lettering, enter your password and it will return to the black screen.)
  5. Check and repair the drive by typing /sbin/fsck -fy then ↩ enter - as directed by the on-screen text.
  6. Mount the drive as read-write by typing /sbin/mount -uw / then ↩ enter.
  7. Remove the Apple Setup Done file by typing
  8. rm /var/db/.AppleSetupDone then ↩ enter.
  9. Reboot by typing reboot then ↩ enter.
  10. Complete the setup process, creating a new admin account.


ref: https://apple.stackexchange.com/questions/164331/i-dont-have-administrator-account-on-my-mac


ref: How To Recover Lost Admin Rights On macOS High Sierra and Sierra, Mac OS X El Capitan And Yosemite - miapple.me




1 reply
Question marked as Best reply

Feb 16, 2019 8:52 AM in response to itish26


You can create a new administrator account by restarting the Apple Setup.


Even though this Setup Assistant only runs once when you first install Mac OS X / macOS, it remains on your computer and is prevented from running by the presences of a hidden file called <.AppleSetupDone> in a system folder on your Mac.


Therefore, to have the Setup Assistant run again so you can create a fresh admin account, you simply need to remove this file




  1. Boot into Single User Mode: Start/restart your Mac. As soon as you hear the startup tone, press and hold ⌘ + S
  2. until you see a black screen with white lettering. (If you end up back
  3. on the login screen after a flash of the black screen with white
  4. lettering, enter your password and it will return to the black screen.)
  5. Check and repair the drive by typing /sbin/fsck -fy then ↩ enter - as directed by the on-screen text.
  6. Mount the drive as read-write by typing /sbin/mount -uw / then ↩ enter.
  7. Remove the Apple Setup Done file by typing
  8. rm /var/db/.AppleSetupDone then ↩ enter.
  9. Reboot by typing reboot then ↩ enter.
  10. Complete the setup process, creating a new admin account.


ref: https://apple.stackexchange.com/questions/164331/i-dont-have-administrator-account-on-my-mac


ref: How To Recover Lost Admin Rights On macOS High Sierra and Sierra, Mac OS X El Capitan And Yosemite - miapple.me




Accidentally deleted the admin user

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