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

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…

Still having the same issue. Fresh kali install using postgresql 12 ( never had 11 installed) and the aforementioned command returns no errors and doesn’t create said user.

From the GVMD log

Blockquote
md main:MESSAGE:2020-08-24 10h49.27 utc:286525: Greenbone Vulnerability Manager version 9.0.1 (DB revision 221)
md manage: INFO:2020-08-24 10h49.27 utc:286525: Creating user.
md manage:WARNING:2020-08-24 10h49.27 utc:286525: sql_exec_internal: PQexec failed: ERROR: cannot change name of input parameter “lvl”
HINT: Use DROP FUNCTION level_max_severity(text,text) first.
(7)
md manage:WARNING:2020-08-24 10h49.27 utc:286525: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION level_max_severity (text, text) RETURNS double precision AS ‘/usr/lib/libgvm-pg-server’, ‘sql_level_max_severity’ LANGUAGE C;
md manage:WARNING:2020-08-24 10h49.27 utc:286525: sqlv: sql_exec_internal failed
md main:MESSAGE:2020-08-24 10h49.37 utc:286527: Greenbone Vulnerability Manager version 9.0.1 (DB revision 221)
md manage: INFO:2020-08-24 10h49.37 utc:286527: Getting users.
md manage:WARNING:2020-08-24 10h49.37 utc:286527: sql_exec_internal: PQexec failed: ERROR: cannot change name of input parameter “lvl”
HINT: Use DROP FUNCTION level_max_severity(text,text) first.
(7)
md manage:WARNING:2020-08-24 10h49.37 utc:286527: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION level_max_severity (text, text) RETURNS double precision AS ‘/usr/lib/libgvm-pg-server’, ‘sql_level_max_severity’ LANGUAGE C;
md manage:WARNING:2020-08-24 10h49.37 utc:286527: sqlv: sql_exec_internal failed

Blockquote

any other thoughts ?

PLEASE get back to the Kali Maintainer, open a case there, here is nothing we can do or support.

The GSE (Greenbone Source Edition) is for self-compiling from our OpenSource GIT repository.
If someone build a broken or not working binary packet, Greenbone is NOT responsible and can do NOTHING about it. It is the fundermatal nature of free software to give the user freedom, even ship broken or not working packets like Kali is doing again and again.

Compile it on your own self, or use a Greenbone Community Edition that are your only two options that are supported here.

I am really not sure if this is an error with the setup on Kali Linux or if it is some mistake in our db code. I’ll try to check that.

1 Like

@Japher did you start from scratch or did you migrate your setup and data from GVM/OpenVAS 9? Currently we think this could be a migration issue.

1 Like

This means that the existing database is from a 20.08 install. Best thing would be to make sure you remove that existing db.

2 Likes

Please somebody help me i’m new with this tool when i tried to run gvm. i’m not getting any password
user:admin
password: blank

[>] Creating database
could not change directory to “/root”: Permission denied
createuser: error: creation of new role failed: ERROR: role “_gvm” already exists
could not change directory to “/root”: Permission denied
createdb: error: database creation failed: ERROR: database “gvmd” already exists
could not change directory to “/root”: Permission denied
ERROR: role “dba” already exists
could not change directory to “/root”: Permission denied
NOTICE: role “_gvm” is already a member of role “dba”
GRANT ROLE
could not change directory to “/root”: Permission denied
ERROR: extension “uuid-ossp” already exists

When I install the new version openvas,create user maybe failed.
gvmd --create-user=cd --password=pwd --role=Admin
gvmd --users
but not show anything.

You need to take a look at the gvmd.log file for possible errors and problems. It is very likely that your database setup has an issue.

thanks for your reply