How to reset Mac OS X adminstrator password?

How to reset Mac OS X adminstrator password?


Hi there
I have just upgraded to El Capitan from Yosemite 10.10. The problem is I could not launch completely a patch file through Terminal since the process ask for the password. Would any one can instruct me how to to reset the Administrator password in Mac OS X 10.11 El Capitan?


At for Mac OS X 10.11, you need to reset the password through recovery partition mode. Use resetpassword command line to get your task done!


Well, more specifically, no matter which OS X version (El Capitan 10.11, Yosemite 10.1, Mavericks 10.9,…) using, the only way to retrieve or reset the admin password is using OS X Utilities from recovery partition.

  1. Restart the mac, keep hold down command + R until you see the Apple logo to go to recovery mode. Click on Utilities at the top menu, select Terminal.
  2. Enter the following command line.


  1. Choose the user account at Select user account box.
  2. Enter your new password, then fill the password for second time to confirm —> Enter a hint —> Click on Save button.
    You now are ready to restart your Mac from  at the menu.