Hi,
if you want help please create a real question and just don’t post screenshots. Error outputs should always be included in your message as preformatted texts.
Same error here following the documentation ( Building from Source - Greenbone Community Documentation) with ubuntu 22.04 at this step:
/usr/local/sbin/gvmd --create-user=admin --password=‘’
Postgresql is well started:
administrateur@gvm:~/source/openvas-scanner-23.8.2/rust/scannerctl$ sudo systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Tue 2024-08-13 14:32:38 UTC; 14min ago
Main PID: 27849 (code=exited, status=0/SUCCESS)
CPU: 1ms
août 13 14:32:38 gvm systemd[1]: Starting PostgreSQL RDBMS…
août 13 14:32:38 gvm systemd[1]: Finished PostgreSQL RDBMS.
There was no message “User created.” so following the documentation see below the gvmd.log
administrateur@gvm:~/source/openvas-scanner-23.8.2/rust/scannerctl$ sudo /usr/local/sbin/gvmd --create-user=admin --password=‘pass’
administrateur@gvm:~/source/openvas-scanner-23.8.2/rust/scannerctl$ sudo cat /var/log/gvm/gvmd.log
md main:MESSAGE:2024-08-13 14h36.04 utc:28449: Greenbone Vulnerability Manager version 23.8.1 (DB revision 256)
md manage: INFO:2024-08-13 14h36.04 utc:28449: Creating user.
md manage:WARNING:2024-08-13 14h36.04 utc:28449: sql_open: PQconnectPoll failed
md manage:WARNING:2024-08-13 14h36.04 utc:28449: 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:2024-08-13 14h36.04 utc:28449: init_manage_open_db: sql_open failed
md main:MESSAGE:2024-08-13 14h36.43 utc:28456: Greenbone Vulnerability Manager version 23.8.1 (DB revision 256)
md manage: INFO:2024-08-13 14h36.43 utc:28456: Creating user.
md manage:WARNING:2024-08-13 14h36.43 utc:28456: sql_open: PQconnectPoll failed
md manage:WARNING:2024-08-13 14h36.43 utc:28456: 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:2024-08-13 14h36.43 utc:28456: init_manage_open_db: sql_open failed
md main:MESSAGE:2024-08-13 14h42.51 utc:28487: Greenbone Vulnerability Manager version 23.8.1 (DB revision 256)
md manage: INFO:2024-08-13 14h42.51 utc:28487: Creating user.
md manage:WARNING:2024-08-13 14h42.51 utc:28487: sql_open: PQconnectPoll failed
md manage:WARNING:2024-08-13 14h42.51 utc:28487: 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:2024-08-13 14h42.51 utc:28487: init_manage_open_db: sql_open failed
md main:MESSAGE:2024-08-13 14h43.32 utc:28530: Greenbone Vulnerability Manager version 23.8.1 (DB revision 256)
md manage: INFO:2024-08-13 14h43.32 utc:28530: Creating user.
md manage:WARNING:2024-08-13 14h43.32 utc:28530: sql_open: PQconnectPoll failed
md manage:WARNING:2024-08-13 14h43.32 utc:28530: 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:2024-08-13 14h43.32 utc:28530: init_manage_open_db: sql_open failed
If you are executing GVMD as root to create the user or change the password, you should note that the user context is being passed to PostgreSQL where there is no root user. You must execute user creation or password change commands as the user gvm
(_gvm
on Kali) .
sudo -E -u gvm -g gvm gvmd --user=admin --new-password='<password>'
So it seems something is missing from the documentation ? Because i just follow it. I’m on ubuntu for information.
Anyway thanks for your reply, i will test this
Yes, that’s exactly the thought I had when I saw your question. This will hopefully be added in the near future.
Not sure if there is actually missing something in the documentation because at no point it mention e.g. the following used command:
sudo /usr/local/sbin/gvmd --create-user=admin --password=‘pass’
AFAICT the most important part is to follow the documentation exactly and use the same terminal for all commands as various variables are set / used which might not be available when switching terminals.
I have re run the install process, all is working fine.