Creating an Admin Account in Single User Mode

Configurare noua (How To)

Situatie

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.

Solutie

Pasi de urmat

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.

Tip solutie

Permanent

Voteaza

(10 din 25 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?