Summary
JSS needs CLI commands for managing user passwords. Currently there's no way to reset a password without manually editing account JSON files and hashing with bcrypt.
Proposed commands
jss passwd <username> # Interactive password reset
jss passwd <username> --password <pw> # Non-interactive password reset
jss passwd <username> --generate # Generate and print a random password
Context
Currently the only way to reset a password is:
- Find the account UUID in
_username_index.json
- Hash the new password with bcryptjs
- Manually edit the account JSON file
This should be a one-liner for server admins.
Implementation
- Add
passwd subcommand to bin/jss.js
- Load account by username from
_username_index.json
- Hash new password with bcryptjs
- Write updated account file
Summary
JSS needs CLI commands for managing user passwords. Currently there's no way to reset a password without manually editing account JSON files and hashing with bcrypt.
Proposed commands
Context
Currently the only way to reset a password is:
_username_index.jsonThis should be a one-liner for server admins.
Implementation
passwdsubcommand tobin/jss.js_username_index.json