I have setup this morning a new Kali 2023 purple, installed gvm, then I did
sudo gvm-check-setup
A lot of OKs but at the end the following error occurs
ERROR: No users found. You need to create at least one user to log in.
FIX: create a user by running ‘sudo runuser -u _gvm – gvmd --create-user= --password=’
I did issue the fix but it did not help. I checked
/var/log/gvm/gvmd.log
I see a lot of this type of message
md manage:WARNING:2023-11-14 13h27.57 utc:3077965: init_manage_open_db: sql_open failed
md main:MESSAGE:2023-11-14 13h29.27 utc:3078746: Greenbone Vulnerability Manager version 23.0.0 (DB revision 255)
md manage:WARNING:2023-11-14 13h29.27 utc:3078747: sql_open: PQconnectStart to ‘gvmd’ failed: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?
md manage:WARNING:2023-11-14 13h29.27 utc:3078747: init_manage_open_db: sql_open failed
Postgresql 16 is up and running and I can connect as you can notice and I can see a user _gvm with no role attributes. So what is missing?
└─$ sudo su - postgres
postgres@kalisierac:~$ psql
psql (16.0 (Debian 16.0-2))
Type "help" for help.
postgres=# select version();
version
----------------------------------------------------------------------------------------------------------
PostgreSQL 16.0 (Debian 16.0-2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 13.2.0-4) 13.2.0, 64-bit
(1 row)
postgres=# \du
List of roles
Role name | Attributes
-----------+------------------------------------------------------------
_gvm |
dba | Superuser, No inheritance, Cannot login
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS