Closed fahrenhe1t closed 2 years ago
You need to run gvmd with the dedicated user and not root. See https://greenbone.github.io/docs/latest/22.4/container/index.html#setting-up-an-admin-user
> docker exec greenbone-community-edition_gvmd_1 id
uid=0(root) gid=0(root) groups=0(root)
> docker exec -u gvmd greenbone-community-edition_gvmd_1 id
uid=1001(gvmd) gid=1001(gvmd) groups=1001(gvmd)
Expected behavior
When rolling out Greenbone Community Edition with greenbone/gvmd:oldstable or greenbone/gvmd:stable, it is suggested to change the console admin password with a derivative of:
docker exec -it gvmd gvmd --user=admin --new-password=<password>
Actual behavior
The shell command outputs an error:
role "root" does not exist
GVM versions
gsa: greenbone/gsa:stable gvm: greenbone/gvmd:stable openvas-scanner: greenbone/ospd-openvas:oldstable postgres: greenbone/pg-gvm:stable
Environment
Operating system:
Linux server 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
Logfiles
gvmd log:
pg-gvm log:
WORKAROUND
I found I can add the root role in PostgreSQL manually, then changing the password works: