Is it possible to reset admin password?

Hi .
Forgot my password . Are there ways to reset admin password?

@martin.wacker How does one hack the admin account? :slight_smile:

Should I make complete clean install again? Is it the only option?

Hi,
assuming you don’t have emailing (and password recovery) enabled, probably the most straightforward way is to use “settings template”.

In your ayon-docker directory, create settings/template.json file with the following content:

{
  "users": [
    {
      "name": "admin",
      "password": "yournewpassword",
      "isAdmin": true,
      "forceUpdate": true
    }
  ]
}

Then, run the following command:

make setup

or directly

docker compose exec -T server python -m setup - < settings/template.json

Template is used to create a default configuration, but it could be used at any time, to update core
config such as users and access groups. Just remember to use forceUpdate flag to update existing users.

Another method is to use the API. If you have a service user created in your system, you probably know
it’s API key (from ASH configuration for example). Then you can use CURL or another client to reset the password.

curl -X PATCH "https://yourserver/api/users/admin/password" \
  -H "Content-Type: application/json" \
  -H "x-api-key: serviceapikeyhere" \
  -d '{ "password": "yournewpassword" }'
1 Like