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
-
Open a terminal where socAdmin runs
docker exec -it <container> socadmin --reset-password admin@example.comGo to the directory that holds
socadmin.db(or set the sameDATA_DIRthe server uses), then run:./socadmin --reset-password admin@example.comThe
-itflags matter on Docker: the command asks questions and needs an interactive terminal. -
Confirm the account
socAdmin shows the account it found and asks you to type
RESETfollowed 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 -
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. -
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. |