guides Resetting a password

Resetting a password

socAdmin accounts are local, so there is no reset email. Reset a password from the command line on the server.

The --reset-password flag sets a new password for an existing account. It needs access to the machine or container where socAdmin stores its data: anyone with that access is already able to read the socAdmin database.

Reset a password

  1. Open a terminal where socAdmin runs

    docker exec -it <container> socadmin --reset-password admin@example.com

    The -it flags matter on Docker: the command asks questions and needs an interactive terminal.

  2. Confirm the account

    socAdmin shows the account it found and asks you to type RESET followed by the email:

    About to reset password for: admin@example.com (id=1, role=admin)
    Type "RESET admin@example.com" to confirm: RESET admin@example.com
  3. Type the new password twice

    The input is hidden. The password must have at least 10 characters with an uppercase letter, a lowercase letter, a digit and a special character.

    New password:
    Confirm new password:
    Password updated for admin@example.com. All refresh tokens revoked.
  4. Sign in

    Every existing session for that account is signed out. Sign in with the new password.

The server doesn’t need to be stopped: the command updates the database and exits without starting a second server.

If it fails

Message What it means
You don't have any permissions for "…" No account with that email in this socadmin.db. Check the email, and that you’re pointing at the right data directory.
confirmation mismatch, aborted The confirmation text didn’t match exactly. Type RESET, a space, then the email.
passwords do not match The two entries differ. Run the command again.
password must be at least 10 characters The new password doesn’t meet the policy.