Skip to content

Add jss passwd command for password management - #233

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-232-passwd-cli
Mar 24, 2026
Merged

Add jss passwd command for password management#233
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-232-passwd-cli

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

Summary

  • Adds a jss passwd <username> CLI subcommand for changing user passwords
  • Supports three modes: --password <pw> for non-interactive use, --generate to auto-generate and print a random password, or interactive prompt with confirmation (hidden input on TTY)
  • Looks up accounts via _username_index.json, hashes with bcryptjs (same pattern as src/idp/accounts.js), updates the account JSON file with new hash and passwordChangedAt timestamp

Fixes #232

Test plan

  • jss passwd alice --password newpass123 -r ./data updates Alice's account hash
  • jss passwd alice --generate -r ./data generates and prints a random password
  • jss passwd alice -r ./data prompts interactively, requires confirmation match
  • Non-existent username prints error and exits 1
  • Missing _username_index.json prints descriptive error and exits 1

@melvincarvalho
melvincarvalho requested a review from Copilot March 23, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@melvincarvalho
melvincarvalho requested a review from Copilot March 23, 2026 12:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@melvincarvalho
melvincarvalho merged commit 3e1e84b into gh-pages Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add password management CLI commands

2 participants