-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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 [email protected]
[INFO] You are about to reset the password for user: [email protected]
Enter new password: ********
Confirm new password: ********
[SUCCESS] Password for [email protected] 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?