Unable to change default admin password

Hello,

I’m currently running the latest version of Greenbone, deployed on Ubuntu via Portainer for easier management. The docker-compose.yml content was copied into Portainer and successfully deployed. I’m able to log in, but the option to change the admin password through the web interface is greyed out. I decided to use the CLI to change it, but I’m encountering the following error:

root@9f9055362415:/# gvmd --user=admin --new-password='ExamplePassword"
md   main:WARNING:2025-05-15 14h15.01 utc:270: init_semaphore_set: error getting semaphore set: Permission denied
md   main:MESSAGE:2025-05-15 14h15.01 utc:270:    Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage:   INFO:2025-05-15 14h15.01 utc:270:    Modifying user password.
md manage:WARNING:2025-05-15 14h15.01 utc:270: sql_open: PQconnectPoll failed
md manage:WARNING:2025-05-15 14h15.01 utc:270: sql_open: PQerrorMessage (conn): connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  role "root" does not exist
md manage:WARNING:2025-05-15 14h15.01 utc:270: init_manage_open_db: sql_open failed

I’ve tried running it with sudo, but no luck. It’s hosted on an external WAN. I have no idea why, but something seems to be preventing me from changing the password. No modifications have been made, other than changing the default port it’s hosted on.

Has anyone encountered this issue before and managed to resolve it?

Thanks!

@davex your postgresql connection is not working. you need to fix it.

Eero

I’ve managed to get it working now, thanks.

You need to run gvmd as the gvmd user. the system user root is not allowed to access the postgres database via the unix socket.

It’s also documented

2 Likes