Reset password via terminal.

How to reset a user’s password from the terminal on OS X.

Instructions

  1. Reset the password

    sudo /usr/bin/dscl . -passwd /Users/username <newpassword> sudo security set-keychain-password -o <oldpassword> -p <newpassword> /Users/username/Library/Keychains/login.keychain
  2. Clear the command history

    history -c

 

Related articles