2012-02-20

How to reset your OS X Lion password


Ran into an issue today where a user had completely forgotten all passwords on the computer.
Turns out there's a way to reset it without even needing the OS X DVD.
  1. Boot into Single User Mode (hold down Command+S while booting)
  2. At the root prompt (# prompt), enter the following commands:
  3. /sbin/fsck -fy
    This performs a disk check before making any changes to the system.
  4. /sbin/mount -uw /
    This makes the root filesystem writable.
  5. launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
    This starts up the service allowing you to change the password.
  6. passwd username
    It should prompt you to change the password of username
  7. Assuming it went through, type reboot and you should be able to login with your new password.