Computers, Laptops & Tablets Apple Can't Log in to Your Mac? Create a New Admin Account Can't Access Any of Your User Accounts? You Can Still Create a New Admin Account By Tom Nelson Writer Tom Nelson is an engineer, programmer, network manager, and computer network and systems designer who has written for Other World Computing,and others. our editorial process Facebook Twitter Tom Nelson Updated January 20, 2020 Apple Macs iPad Tweet Share Email One troubleshooting tip I always recommend is to create a spare admin user account on your Mac. Its purpose is to provide you with an admin user account that is pristine. This account hasn’t had any changes to its preference files and doesn’t contain any data beyond what OS X adds when the account is created. A spare admin account can be very helpful when you’re having trouble with your Mac. For example, when you try to log into your Mac and it repeatedly freezes up, and you’ve already tried resetting the PRAM or the SMC. Or, even worse, you can’t log in at all; instead, you see a message that says "unable to log in to the user account at this time." Unfortunately, even though creating a spare admin account is easy, many of us procrastinate until it’s too late. Lifewire / Theresa Chiechi Actually, it’s never too late. If for some reason you find yourself locked out of your Mac, either because you have forgotten your user account password or your Mac is acting up on you, it is still possible to force your Mac to create a brand new administrator account with a new user ID and password letting you hopefully regain access to your Mac. Once you have administrative access to your Mac, you can reset your old forgotten password and then log out and log back in with your regular account. This method of gaining access to your Mac has a few drawbacks. It won’t work if you have encrypted your Mac’s drive using FileVault, or set up a firmware passwords that you have forgotten the password to. If you're ready, you can still create another admin account by performing the following steps. Creating an Admin Account in Single User Mode Start by turning off your Mac. If you're not able to shut down normally, press and hold the power switch. Once your Mac shuts down, you’re going to restart it in a special startup environment called Single User mode, which boots your Mac into a Terminal-like interface where you can run commands directly from a prompt. You can use Single User mode for many different troubleshooting processes, including repairing a startup drive that won't start up. To boot to Single User mode, start your Mac while holding down the command + S keys. Your Mac will display scrolling lines of text as it boots up. Once the scrolling stops, you’ll see a command prompt in the form of a ":/ root#" (without the quotation marks). The ":/ root#" is the command line prompt. At this point, your Mac is running, but the startup drive hasn’t mounted. You need to mount the startup drive, so you can access the files that are located on it. To do this, at the prompt, type or copy/paste the following text: /sbin/mount -uw / Press enter or return on your keyboard. Your startup drive is now mounted; you can access its files and folders from the command prompt. We’re going to force OS X to think that when you restart your Mac, it’s the very first time you’ve booted into the currently installed version of OS X. This will make your Mac behave the way it did the first time you turned it on, when it guided you through the process of creating an administrator user account. This process will not remove or alter any of your existing system or user data; it will just allow you to create one new admin user account. To restart your Mac in this special mode, we need to remove one file that tells the OS whether the one-time setup process has already been performed. Type or copy/paste the following text at the prompt: rm /var/db/.applesetupdone Press enter or return. With the applesetupdone file removed, the next time you restart your Mac, you will be guided through the process of creating the necessary admin account. Enter the following at the prompt: Reboot Press enter or return. Your Mac will restart and display the Welcome to Mac screen. Follow the step-by-step guide to create your new admin user account. Once you finish creating the account, your Mac will log you in with the new account. You can then proceed with whatever troubleshooting steps you need to perform. You can find additional tips that may help with whatever problems you’re having in the Mac Troubleshooting Tips category.