After hasing admin password unable to login into the /admin page. #1567

Closed
opened 2026-02-05 01:15:26 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @sebasdt on GitHub (Apr 16, 2023).

Subject of the issue

After I changed my admin password to a more secure password, my vaultwarden instance is still saying I need to secure it.
This also resulted in me not able to log into the admin page.

Deployment environment

I'm using portainer and vaultwarden has its own bind volume for saving everything persitantly.

  • vaultwarden version:
    Latest stable version: 1.28.1
  • Install method:
    portainer (docker stack)

  • Clients used:

  • Reverse proxy and version:

  • MySQL/MariaDB or PostgreSQL version:

  • Other relevant details:
    Looking into the vaultwarden volume I dont see a config.json that could conflict with the docker env's

Steps to reproduce

  • Set up Vaultwarden with plain text admin token
    
  • After Vaultwarden is up and running with plain text token, generate a hashed token with argon2
    
  • Change ADMIN_TOKEN to hashed token and restart Vaultwarden
    
  • Vaultwarden logs warning about using a plain text token with ADMIN_TOKEN set to a hashed token
    

Expected behaviour

Im able to log into the admin page and that the logs dont show I need to switch to a more secure password

Actual behaviour

The /admin page is saying: "Error: Invalid admin token, please try again." and not letting me log in.

Troubleshooting data

Logs
[NOTICE] You are using a plain textADMIN_TOKEN` which is insecure.

Please generate a secure Argon2 PHC string by using vaultwarden hash or argon2.

See: https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token
`

docker-compose yml admin env:
NOTE THIS IS NOT MY TOKEN BUT IT DOES LOOK LIKE THIS!
environment: ADMIN_TOKEN: $$argon2id$$v=19$$m=19456,t=2,p=1$$UUZxK1FZMkZoRHFQRlVrTXZvS0E3bHpNQW55c2dBN2NORzdsa0Nxd1JhND0$$cUoId+JBUsJutlG4rfDZayExfjq4TCt48aBc9qsc3UI

Originally created by @sebasdt on GitHub (Apr 16, 2023). <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> After I changed my admin password to a more secure password, my vaultwarden instance is still saying I need to secure it. This also resulted in me not able to log into the admin page. ### Deployment environment I'm using portainer and vaultwarden has its own bind volume for saving everything persitantly. <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: Latest stable version: 1.28.1 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: portainer (docker stack) * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> * Reverse proxy and version: <!-- if applicable --> * MySQL/MariaDB or PostgreSQL version: <!-- if applicable --> * Other relevant details: Looking into the vaultwarden volume I dont see a config.json that could conflict with the docker env's ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> - Set up Vaultwarden with plain text admin token - After Vaultwarden is up and running with plain text token, generate a hashed token with argon2 - Change ADMIN_TOKEN to hashed token and restart Vaultwarden - Vaultwarden logs warning about using a plain text token with ADMIN_TOKEN set to a hashed token ### Expected behaviour <!-- Tell us what you expected to happen --> Im able to log into the admin page and that the logs dont show I need to switch to a more secure password ### Actual behaviour <!-- Tell us what actually happened --> The /admin page is saying: "Error: Invalid admin token, please try again." and not letting me log in. ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> Logs ` [NOTICE] You are using a plain text `ADMIN_TOKEN` which is insecure. Please generate a secure Argon2 PHC string by using `vaultwarden hash` or `argon2`. See: https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token ` **docker-compose yml admin env:** NOTE THIS IS NOT MY TOKEN BUT IT DOES LOOK LIKE THIS! ` environment: ADMIN_TOKEN: $$argon2id$$v=19$$m=19456,t=2,p=1$$UUZxK1FZMkZoRHFQRlVrTXZvS0E3bHpNQW55c2dBN2NORzdsa0Nxd1JhND0$$cUoId+JBUsJutlG4rfDZayExfjq4TCt48aBc9qsc3UI `
Author
Owner

@BlackDex commented on GitHub (Apr 16, 2023):

Try to put single quotes around it '.
Also, make sure you have run docker compose up -d, and that you do not have a config.json file in your data folder. That will override all environment variables.

@BlackDex commented on GitHub (Apr 16, 2023): Try to put single quotes around it `'`. Also, make sure you have run `docker compose up -d`, and that you do not have a `config.json` file in your data folder. That will override all environment variables.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1567