5

I need to factory reset my Macbook but cannot recall the password. So I used Cmd+R during startup and go to terminal and typed 'resetpassword' according to this advice https://discussions.apple.com/thread/5309334?tstart=0

Now 'Reset Password' application appears but there is nothing where I have to select the volume containing the user account. Why does this happen?

  • On my Mavericks machine, a graphical window pops up when I type resetpassword --help so it's not clear where your setup has gone different. Have you tried booting in single user mode and typing passwd user with the short name of the user you intend to change? – bmike Dec 21 '13 at 2:11
  • If I boot in single user mode, it asks me to enter the password, so I don't understand what you mean – user67275 Dec 21 '13 at 3:07
  • You're making little sense. In the other post from you (apple.stackexchange.com/questions/114601/…) you say that this is a MacBook you bought from someone else. So the data on it is not yours, then why not simply install a new OS X? – Thomas Tempelmann Dec 22 '13 at 1:04
6

The Mac was probably encrypted with FileVault 2.

You don't normally have to enter a password to start up in single user mode, but if FileVault 2 is enabled, you do. If FileVault 2 is enabled, you can't use the Reset Password application to reset the password of an account either.

If FileVault is enabled, I don't think there is any way to erase and reinstall OS X without knowing the password or the encryption key. When I enabled FileVault on a VM and started up from the recovery partition, the erase tab was missing from Disk Utility, and I couldn't create another partition from Disk Utility. When I tried selecting Reinstall OS X, the list of volumes did not include the Macintosh HD volume.

If the previous owner enabled the option to store the recovery key with Apple, you might be able to retrieve the recovery key by contacting Apple support:

Typing in the wrong login password three times prompts you if you have the ability to retreive your key from Apple. Click the triangle-button next to the prompt that appears to reveal a Recovery Key text field (which replaces the password text field) and AppleCare contact information, along with your computer's Serial Number and a Record Number. You need to provide these pieces of information in order for AppleCare to retrieve your recovery key.

If you can't get the recovery key from Apple and you can't contact the previous owner, your only option might be to replace the hard drive.

(I also copied and pasted instructions for three ways to reset the password of an account below. None of them can be used if FileVault 2 is enabled and you don't know the password though.)

Using Reset Password.app on the recovery partition

  1. Hold command-R on startup.
  2. Select Utilities > Terminal.
  3. Run resetpassword, which opens the Reset Password application.
  4. Select the volume and account and reset the password.

Using dscl in single user mode

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist in 10.7 or later or launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6 or earlier.
  4. Run dscl . passwd /Users/username newpassword, where username is the username and newpassword is the new password.
  5. Run reboot.

Creating a new admin account

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run rm /var/db/.AppleSetupDone.
  4. Run reboot.
  5. Go through the steps of creating a new account.
  6. Reset the password of the old account from the Users & Groups preference pane.
| improve this answer | |
  • I was able to get around this by erasing the disk from Disk Utility. – Choylton B. Higginbottom Sep 16 '16 at 18:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .