Reset Password via CLI
The user:reset-password command allows administrators to reset a user’s password from the command line without knowing the current password. This is useful for recovering locked-out accounts or administrative password changes.
docker exec -it slink slink user:reset-password --email=<email>When --password is omitted, the command prompts for the new password with hidden input and asks you to confirm it. The password is never displayed on screen.
Options
Section titled “Options”| Option | Alias | Required | Description |
|---|---|---|---|
--email | Yes | Email address of the user whose password to reset. If omitted, you are prompted. | |
--password | -p | No | Set the new password inline. If omitted, you are prompted (with confirmation). |
Related Commands
Section titled “Related Commands”user:createcreates new user accountsuser:activateactivates pending user accountsuser:grant:rolegrants roles to usersuser:revoke:rolerevokes roles from users
Errors
Section titled “Errors”| Message | Cause |
|---|---|
Error: User not found | No user exists with the given email. |
Error: Passwords do not match. | The password and confirmation entered at the interactive prompt differ. |