pw user reset_passwd
The pw user reset_passwd command resets the password of an existing user.
pw user reset_passwd <user_name> -new <new password>
- <user_name> — A string representing a user name. A user with this name must already exist.
- -new — A new password
To reset the password of user1 to netpro123, run the following command:
# pw user reset_passwd user1 -new netpro123
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*