Not able to create admin account - gvm-start not running due to several errors in KALI LINUX

Hello everyone.

Just updated my kali distribution with GVM 11. After running gvm-check-setup it produced a FIX that requested to define an Admin account in order to proceed. Trying to create an Admin account as instructed it was never possible to set it up although it seemed to accept the command.
When trying to run gvm-start, several errors didn’t make it possible for it to run.
Is it a known error or what?
Thank you in advance.

Please note this is not GOS related, Kali != GOS. We can´t help you with uncoordinated Kali packets, please get back to the Kali Maintainers.

I have the issue too and cannot post to Kali forum (no posts or replies allowed). Running runuser -u _gvm – gvmd --get-users
does nothing.
Running runuser -u _gvm – gvmd --create-user= --new-password=’
does nothing.

Also,

When running gvm-check-setup (GVM 11 installation), gives me the following FIX which does ot work

FIX: create a Admin user by running ‘sudo runuser -u _gvm – gvmd --create-user= --new-password=’

sudo runuser -u _gvm – gvmd --create-user=Admin --new-password=12345

ERROR: Your GVM-11 installation is not yet complete!
AND when running gvm-start gives me the following erros…

Job for gvmd.service failed because a timeout was exceeded.
See “systemctl status gvmd.service” and “journalctl -xe” for details.
Job for ospd-openvas.service failed because the service did not take the steps required by its unit configuration.
See “systemctl status ospd-openvas.service” and “journalctl -xe” for details

Please note that the GVM-11 packages in Kali are (AFAIK) currently the ones of Debian “unstable” which are only a few days old. These packages probably received not much (user-)testing yet and have still a few issues which needs to be sorted out by the Debian / Kali maintainers (Greenbone isn’t involved in providing and maintaining these packages):

https://bugs.kali.org/view.php?id=6615
https://bugs.kali.org/view.php?id=6618
https://bugs.kali.org/view.php?id=6619
https://bugs.kali.org/view.php?id=6624
https://bugs.kali.org/view.php?id=6625
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966632
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966641
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966715
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967046

I would suggest to do a little bit more testing / debugging (e.g. by checking the /var/log/gvm/*) and give as much feedback as possible back to the Debian / Kali maintainers to get the packages into a stable state.

Concerning this:

It seems the gvm-check-setup script is expecting exactly one admin user (see code below), if you create a different user like Admin it will always throw this FIX line even if a user was created.

I would assume that this is a bug in the gvm-check-setup script. As Greenbone isn’t maintaining this script please raise a bugreport about this at https://bugs.kali.org.

2 Likes

May be useful to you how I fixed it. As this was an update from an installation with OpenVAS it had Postgresql 11 on the machine. I used the instructions here to update the Postgresql and update the clusters and it then worked. It took digging into gvmd.log file to find the “version mismatch” that was the clue. https://www.gab.lc/articles/upgrade_postgresql_12 That done you’ll see the “user created” after running the command specified in the FIX:

1 Like

If a migration from OpenVAS-9 to GVM-11 is done on Kali there seems to be a documentation on how to do a full migration shipped with the gvm package which is also available here:

A shorter note about using gvmd --migrate after an upgrade from one major release to another one is also available in the source repository of GVMD:

Hi Panos,
Did you launch the gvm-setup after installation?
With a clean new gvm 11 installation on Kali 2020.2, the gvm-setup worked fine for me, with the only issue that it did not create (or show) the admin user.
So I run (careful: – gvmd instead of – gvmd):
sudo runuser -u _gvm – gvmd --create-user=Administrator
and the new admin user was successully created (showing the new pasword).

1 Like

Seems the kali maintainer are aware of the previously mentioned bugs in the gvm-check-setup:

  1. Issue with gvm-check-setup
    ERROR: No users found. You need to create at least one user to log in.
    I will change the test in the gvm-check-setup script, it’s not correct (for the moment It will always fail if you don’t have a user named admin).
    And the command is not correct too. It should be ‘sudo runuser -u _gvm – gvmd --create-user= --password=’
    I will fix it.

-> https://bugs.kali.org/view.php?id=6615#c13164

This works for me. It was really frustrating to loose all my previous targets, but now I have gvm running.

One thing:
sudo runuser -u _gvm – gvmd --create-user=Admin --new-password=12345
has a typo; the right command line is
sudo runuser -u _gvm – gvmd --create-user=Admin --new-password=12345
did you see? there was a “–” instead a “–”

Thank a lot

Sorry, this is odd…
There was some kind of autocorrector that changes two contiguous minus for some kind of line

Dear All,

After my today’s KALI update, I run gvm-setup (with errors concerning gvmd) and then gvm-check-setup which came up with a FIX concerning database.

Nevertheless, I run gvm-start which came up with error too (and didn’t start).

Looking into gvmd.log, I found the following statements:

QUOTE

(7)
md manage:WARNING:2020-08-05 12h36.50 utc:4448: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/usr/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-08-05 12h36.50 utc:4448: sqlv: sql_exec_internal failed
md main:MESSAGE:2020-08-05 12h40.37 utc:4549: Greenbone Vulnerability Manager version 9.0.1 (DB revision 221)
md manage: INFO:2020-08-05 12h40.37 utc:4549: Getting scanners.
md manage:WARNING:2020-08-05 12h40.37 utc:4549: sql_exec_internal: PQexec failed: ERROR: incompatible library “/usr/lib/libgvm-pg-server.so”: version mismatch
DETAIL: Server is version 11, library is version 12.
(7)
md manage:WARNING:2020-08-05 12h40.37 utc:4549: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/usr/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-08-05 12h40.37 utc:4549: sqlv: sql_exec_internal failed

UNQUOTE

Any ideas?

You need to update your postgres cluster. Also mentioned at https://bugs.kali.org/view.php?id=6615#c13167

2 Likes

Follow this instructions.

Steps

  1. apt update
  2. apt install --yes postgresql-12
  3. pg_dropcluster 12 main --stop
  4. pg_upgradecluster 11 main
  5. Access Postgres using terminal and delete gvm database.
  6. Launch gvm-setup
  7. Check the gvm status and the error will disappear

It will fix the issue and generate a password for you.

If you encounter issues login in for the first time, perform step 5 and 6 again.

1 Like

Hi,

Tried to reset admin password on GVM 11 Kali Linux with command - gvmd --user=admin --new-password=new_password and nothing happens (default password not changing)

tried to add new user - the same issue, nothing happens.

Any ideas?

same issue here i have tried to reset the admin password and create new user…but i always obtain :
Login Failed. Invalid password or username.
someone has solved this issue? thanks

Try deleting the gvm database using postgres as super admin.

Then run gvm-setup again. It will create a new set of password with default username as admin

Try deleting the gvm database using postgres as super admin.

Then run gvm-setup again. It will create a new set of password with default username as admin

I would not suggest this type of commands here, someone might look for a solution and accidentally drops his GMVD production database :wink: So just tell the Kali Maintainers they have to invest into their packets and the installer.

1 Like

Just coming to say I have the same issue with no users getting created. I did a fresh install of Kali and a fresh install of GVM. I get the “no users found” error running check-setup.

runuser -u _gvm – gvmd --create-user=admin --new-password=12345 <- reports no errors

runuser -u _gvm – gvmd --get-users <- returns no users.

gvm-start times out and does not start.

edit: dropping the database and re-running setup had no effect either.

Maybe I’ll start over with Debian…