Skip to content

Add resetPassword option to command-line tool #1400

Description

@sosyz

I noticed this discussion #1308 and would like to propose adding a new command option for password reset.

./answer resetPassword [email]

During execution, the admin would be prompted interactively to enter a new password, rather than passing it directly as a command-line argument (for better security and usability).

This feature would simplify password management for admins who don’t use SMTP or prefer manual resets.


Example CLI Flow

$ ./answer resetPassword user@example.com
[INFO] You are about to reset the password for user: user@example.com
Enter new password: ********
Confirm new password: ********
[SUCCESS] Password for user@example.com has been updated successfully.

Notes

  • The command should verify that the provided email exists before proceeding.

  • The password input should be hidden as the user types (no plain-text echo).

  • The command could log the action — including the admin username, timestamp, and target email — in the Activity table for audit purposes.


Should we allow the admin to press Enter (provide an empty input) and let the system automatically generate a secure random password for the user?

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for Feature.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions