The first thing you need to be is an administrator to reset the password of your Mac.
The steps are very easy,
Step 1: dscl Command
Open the Terminal app on your Mac and type the below command.
dscl . -passwd /Users/userName new-password
Example:
dscl . -passwd /Users/c2c dj%3dg5C
Note, you will see a message "Permission denied. Please enter the user's old password:" Once you enter your old password correctly, the password of the user will be changed!
If you provide a small-length password you will see an error and the reset password will fail.
Step 2: Validate
If you changed the password of the currently logged-in user, you can lock your Mac/Macbook by clicking on the Apple logo on the Menu and selecting "Lock Screen"
Now when you will try to log in, the old password will not work!

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!