Hello everyone and thank you in advance for your help, I’m new here and this is my first post, I apologize if somehow I mis-posted this question, I could not find an answer in previous posts using the search functions.
I installed GVM Community Edition directly on a fresh Kali installation, with virtually no customizations:
Operating system: Kali 2021.3
Kernel: Linux kali 5.14.0-kali2-amd64 #1 SMP Debian 5.14.9-2kali1 (2021-10-04) x86_64 GNU/Linux
Installation method / source: standard package manager.
The scanner runs fine, postgresql 14 is listening on port 5433/tcp, everything’s alright.
So, here’s my question:
I had a python script that extracted more information from the old sqlite database (mostly from the “hosts”, “hosts_identifiers” and “host_details” tables) to further customize my LaTeX reporting, but now that GVM has transitioned to postgresql I cannot connect anymore to the database directly via a script to collect data from those tables since I don’t know the password…
As far as I understand, during the installation process an ad-hoc postgresql user has been created for gvmd with a (possibly?) random password and only local connections are allowed. I have basically no previous experience with postgres. Is there a default password to access the database via command line?
here’s what I tried:
psql -h localhost -p 5433 -U postgres --no-passworddoesn’t work. I tried to launch that command as standard user, with sudo and as _gvm and postgres users with no luck. I assume that postgres user doesn’t exist.
psql -h localhost -p 5433 -U gvm --no-passworddoesn’t work either. I am pretty sure that user gvm exists, I can’t prove it though…
To create a new “superuser” - from what I can tell - I still need a valid postgres account with admin privileges.
Can any one of you point me to the right direction?