Benches macOS

9

Creating an administrator account with ha…

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I have a standard account and i wish to create more accounts, but when i go to "users and groups" and click the "lock" icon it asks me to enter a administrator username and password whereas i don't have an admin account, so i am locked out of major changes

9 replies

Sign in or join Beachball Help to reply.

  1. 0

    dialabrain

    Imported from the Apple Support Forums via the Wayback Machine 🔗

  2. 0

    John Galt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Are there any Admin users in that Preference pane? You can see them even if it's locked.

  3. 0

    Dhruv179

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I'm sorry, no, there aren't any

  4. 0

    Dhruv179

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    i tried the "rm /var/db/.AppleSetupDone" command but it says no such file exists

  5. 0

    dialabrain

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I don't know if it was moved or the article was incorrect. Try…

    rm /private/var/db/.AppleSetupDone
    

  6. 0

    leroydouglas

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    A hidden file in the Finder, however it shows

    I just tried from Finder>GO>Go to Folder copy and paste:

     /var/db/.AppleSetupDone
    

    it opened the private/var/db/.AppleSetupDone and showed it is there.

    did you try

    sudo rm /var/db/.AppleSetupDone
    

  7. 0

    Dhruv179

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I tried, however it still didn't work and it still shows no directory found, thank you for helping though

  8. 0

    Dhruv179

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Yes i tried this command as well, but no luck, it still shows no directory found.

    appreciate your help

  9. 0

    John Galt

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    As I understand it, you have a Mac with no useful Administrator accounts. Of course that is not supposed to be possible, but if that really is the case you can use the following technique to create a new, temporary Administrator account, the sole purpose of which will be to log in as an Administrator that can give your normal account Admin privileges.

    There may be other techniques to recover from the "impossible" circumstance in which you find yourself, but the following is one that I have successfully used in the past.

    Please read everything that follows before continuing. If you have only the one computer you will need to print this for reference.

    Prerequisites:

    • If you have not done so already, create a reliable backup in the event something unexpected occurs.
    • If you configured an EFI Firmware Password, that will preclude recovery, unless you know that password.
      • A Firmware Password precludes starting a Mac in single-user mode, so you will need to temporarily remove it before continuing.
    • If you encrypted your startup volume with FileVault, its password will also be required to unlock the disk.
      • That password may or may not be the same login password you have been accustomed to using.

    Confirm each of the above prerequisites before continuing.

    Then,

    • Power on or restart your Mac.
    • At the chime or grey screen, hold ⌘ and S on your keyboard (two fingers) to enter single-user mode.
    • At the localhost:/ root# prompt, type

    fsck -fy

    ...and press Return.

    This is a simple check for file system integrity and is optional. It may take a few minutes to complete during which time various messages will appear. None of them are relevant unless they indicate some unrecoverable error. Be patient. If you get concerned that the system has stalled or become unresponsive press the Return key. Nothing will happen other than to echo the Return character, advancing the text on the screen, confirming your Mac has not completely frozen.

    When the integrity check completes pressing the Return key will result in the localhost prompt again, waiting for your input.

    At the localhost:/ root# prompt, type each of the following lines, exactly as written, including capitalization, one line at a time, each line followed by the Return key.

    mount -uw /

    cd /var/db

    rm /.AppleS*

    reboot

    There is a single space character after the word "mount" and a single space character preceding the first "slash" ( / ) character in each line. There are no others. If you omit those space characters you'll get an error, but you won't break anything.

    A few lines of text may appear after you type the first command. If you think nothing is happening, or if you get lost while typing, just press the Return key like you did before. The localhost:/ root# prompt will reappear when your Mac is ready for you.

    After typing the reboot command the Mac will restart, and then take you through the entire setup and registration process that you have not seen since you originally unboxed it. Do not be concerned—none of the above deletes any information. All your pre-existing user accounts will still available, assuming they were intact prior to beginning this procedure.

    Do not elect to transfer your information from another Mac: When the "Transfer Information to This Mac" screen appears, select "Don't transfer any information now" and press Continue.

    There is no need to sign in to iCloud, so select Set Up Later and confirm.

    At the "Create a Computer Account" screen, create the new, temporary account using a different "Full name" and "Account name" than the one you already use.

    Choose Express Set Up, choose a light / dark look, and Continue.

    • When the setup assistant completes, you will be logged in under that new account. Use System Preferences to change your usual account (the one that had been changed to Standard) to "Allow user to administer this computer".

    Log out, log in under your normal account and verify you can use it without restriction.

    After that, you can safely delete the temporary account you just created by following these instructions: Delete a user or group - Apple Support. Before removing it, confirm you don't need any of the files you might have created in that Account.