Can't log in as administrator

So this might seem stupid, but when I first got my macbook (a couple of years ago) I made a typo when I entered my name as the administrator user. So my name has been misspelled ever since I first got this computer, until today when I finally decided to change it (under 'Users and Groups').


But now it seems that I'm not an administrator anymore and can't log in as one. When I go to 'Users & Groups' now and click the lock, it asks me to enter a username and password, and doesn't accept either the old details (my name with a typo) or the new ones (the correct spelling).


Not really sure what I can do now - any ideas?

Posted on May 20, 2018 3:16 PM

Reply

Similar questions

2 replies

May 21, 2018 4:00 AM in response to aliddell

Hi aliddell,


It appears that you improperly changed your account username. Doing this can cause errors like this if not done correctly. If possible, revert the name change you made and then follow the steps in this article to change your username: Change the name of your macOS user account and home folder - Apple Support


If you need an administrator account in order to perform these changes, an exploit exists in macOS that permits you to re-run Setup Assistant and use it to create a new administrator account. Setup Assistant will not delete any accounts in this process. To perform this exploit:


  1. Boot Single User Mode by holding down Command-S while you turn on or restart your Mac. Release the keys when white text appears on a black screen. Wait for the text to stop moving. (If FileVault is on, unlock the startup disk by logging into your account; this will continue the boot process.)
  2. When the text stops moving, execute these commands in order, very carefully:
    1. mount -uw / (mounts the internal hard drive as read-write)
    2. rm /var/db/.AppleSetupDone (removes the file telling macOS that Setup Assistant has already been run)
    3. reboot (tells your Mac to restart immediately)
  3. Your Mac should restart to Setup Assistant. Continue through the assistant until you're prompted to transfer data. Choose not to transfer any data; this will permit you to create a new administrator account on the next screen. To help you distinguish this new account from your actual account, consider giving it a generic or random name.
  4. When Setup Assistant is completed, you'll automatically be logged into the new administrator account. Reverse the name change you made on your actual account, then (if desired) rename it via the instructions in the link above.
  5. To make your actual account an administrator, open Users and Groups preferences in System Preferences, then click on the lock icon. Authenticate using the credentials for the temporary administrator account. Select your actual account, then check the box next to "Allow user to administer this computer".
  6. Restart your Mac, then log into your actual user and verify that your files are present and things are working normally.
  7. If desired, delete the temporary administrator account in Users and Groups preferences.


Notes:

  • If a firmware password (different than a login password) is set, it must first be disabled before Single User Mode can be booted.
  • In step 2b, there is a single space between rm and the first slash. There is no space between the third slash and the period next to it.


Hope this helps!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't log in as administrator

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