Reset user password
Reset password command
To reset a user's password, use the following command on the server where Databasus is running:
docker exec -it databasus ./main --new-password="YourNewSecurePassword123" --email="owner@example.com"Parameters
The command accepts the following parameters:
- --new-password: The new password, at least 8 characters long. Make sure it's secure and contains a mix of letters, numbers and special characters.
- --email: The email address of the account whose password you want to reset (e.g.,
owner@example.com). An instance created before the first account administered it still carries the placeholder addressadminuntil its owner replaces it, so passadminthere.
List administrator accounts
If you do not remember which address administers the instance, list the administrator accounts on the server where Databasus is running:
docker exec -it databasus ./main --list-adminsThe output names every administrator account with its email address, display name, creation date and active state, and marks the one the instance recognizes as its administrator. It prints no password, no password hash and no token. On an instance where nobody has created an account yet, it reports that the instance has no administrator.
Create an account from the console
To provision an account without signing up in the browser, for example from a deployment script, create it on the server where Databasus is running:
docker exec -it databasus ./main --create-user --email="ops@example.com" --password="YourSecurePassword123" --role=adminThe command accepts the following parameters:
- --email: The email address of the new account. It must be a valid email address.
- --password: The password of the new account, at least 8 characters long.
- --role:
adminormember. - --name: An optional display name. Without it, the account is named after the part of the address before the
@.
The account is active at once and signs in with that address and password, whether or not open registration is enabled. On an instance that holds no account yet, the account you create administers the instance, so the first one must use --role=admin. An administrator created later this way is an ordinary administrator.
Running the command again for an existing account with the same role succeeds and changes nothing, so a deployment can run it on every rollout. It does not change the password then: rotate the password with the --new-password reset command above. If the address belongs to an account with another role, a deactivated or invited account, or an account that signs in through Google or GitHub, the command fails and changes nothing.
Stop requiring a sign-in code
An instance can require a six-digit code emailed at sign-in on top of the password. If the mail server stops delivering those codes, nobody gets in with a password, and a password reset alone does not help. Switch the second factor off on the server where Databasus is running:
docker exec -it databasus ./main --disable-2faThe command reports whether it changed anything, succeeds without complaint when the second factor is already off, and records the change in the audit log. The next password sign-in then needs no code, and an administrator can turn the setting back on once mail works again.