Reset admin or user password

I’ve manage to successfully deploy greenbone with community containers, however I’m facing two issues:

  1. I’m not able to change default admin/admin password either from gvmd container cli using gvmd command nor from Web GUI (It gives me “Unknwon error”)
  2. Same for user that I’ve created separately - when I’m logged as admin (using admin / admin) I’m not able to change user password it gives me also “Unknwon error”

For both I’ve tried web and gvmd command inside container (here there is nothing displayed)

When I’m trying to do that in gvmd container the only thing I’m getting is error:

greenbone-community-container_pg-gvm_1               | 2024-11-23 22:56:41.934 UTC [42529] root@gvmd FATAL:  role "root" does not exist
greenbone-community-container_gvmd_1                 | md   main:WARNING:2024-11-23 22h56.41 utc:43042: init_semaphore_set: error getting semaphore set: Permission denied
greenbone-community-container_gvmd_1                 | md   main:MESSAGE:2024-11-23 22h56.41 utc:43042:    Greenbone Vulnerability Manager version 24.0.0 (DB revision 256)
greenbone-community-container_gvmd_1                 | md manage:   INFO:2024-11-23 22h56.41 utc:43042:    Modifying user password.
greenbone-community-container_gvmd_1                 | md manage:WARNING:2024-11-23 22h56.41 utc:43042: sql_open: PQconnectPoll failed
greenbone-community-container_gvmd_1                 | md manage:WARNING:2024-11-23 22h56.41 utc:43042: sql_open: PQerrorMessage (conn): FATAL:  role "root" does not exist
greenbone-community-container_gvmd_1                 | md manage:WARNING:2024-11-23 22h56.41 utc:43042: init_manage_open_db: sql_open failed

Login into your instance and run gvmd

sudo  -u %your_gmv_user%  gvmd --user=admin --new-password=<password>

You need to find the username for your installation and put it into the sudo command.
But it seems you have a deeper permission problem in your installation.

1 Like

I also applied the following commands and my issue resolved.

sudo -E -u _gvm -g _gvm gvmd --user=admin --new-password=123456