7

In the event that you have forgotten the login password to your Mac (for whatever reasons). What possibilities exist to reset the password without having the OS X installation disc(s) ?

2
8

Recovery HD

The simplest way may be to use the Recovery HD.

  1. Boot into the Recovery HD (hold ⌥ alt/option at boot and select the Recovery HD).

  2. Once it has booted, click Utilities, then Terminal.

  3. Type resetpassword then ↩ enter.

  4. Follow the instructions.

Restarting Setup Assistant

In addition to using the Recovery HD, you can also restart the Setup Assistant, create a new Administrator account, then use that account to reset the password to the original account.

You can restart the Setup Assistant by performing the following:

  1. Boot into Single User Mode (hold ⌘ cmd + S at boot).

  2. Mount the drive by typing /sbin/mount -uw / then ↩ enter.

  3. Remove the Apple Setup Done file by typing rm /var/db/.AppleSetupDone then ↩ enter.

  4. Reboot by typing reboot then ↩ enter.

  5. Continue setup, making sure not to transfer data.

  6. Setup a new administrator account. You can use this account to reset the password to the original account (through System Preferences → Users & Groups).

The new account can then be deleted once the original account has been recovered.

1
  • Using the Setup Assistant worked like a charm for me, thanks! – MisterBla Dec 27 '14 at 1:48
4

Another option (in addition to using resetpassword or creating a new admin account) is to use dscl in single user mode.

  1. Hold command-S on startup.
  2. Run mount -uw /. fsck -fy is not needed.
  3. Run launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist in 10.7 and later, or launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6 and earlier.
  4. Run dscl . -passwd /Users/username (where username is replaced with the username of the account but -passwd is not replaced with anything) and enter a new password. If there is an error about com.apple.DirectoryServices.plist, you can ignore it.
  5. Run reboot.

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