Skip to content

Instantly share code, notes, and snippets.

@rubenarakelyan
Created December 27, 2023 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rubenarakelyan/2b6ad14b3a6b1f1b21595df80f6986d5 to your computer and use it in GitHub Desktop.
Save rubenarakelyan/2b6ad14b3a6b1f1b21595df80f6986d5 to your computer and use it in GitHub Desktop.
Change macOS password in single user mode

Change macOS password in single user mode

  1. Hold ⌘+S on startup
  2. mount -uw / (fsck -fy is not needed)
  3. launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist (or /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6)
  4. dscl . passwd /Users/username (without a trailing slash) and enter a new password. You can ignore the error about com.apple.DirectoryServices.plist.
  5. reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment