User's are deleted automatically?

Environment

Operating system: Kali LInux
Kernel: 5.10.0-kali7-amd64
Installation method / source: sudo apt install openvas

Several times, the users seems to delete themselves.
This happen several times now and I keep creating new user.

Right now, I’m facing problem and where gvmd will not start, gsa will not start and I will explain:

when I run:
sudo gvm-check-setup

Step 5: Checking Postgresql DB and user ... 
        OK: Postgresql version and default port are OK.
 gvmd      | _gvm     | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
        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=<name> --password=<password>'

 ERROR: Your GVM-21.4.0 installation is not yet complete!

So I run the suggested command. This is the exact command suggested by the output:

sudo runuser -u _gvm -- gvmd --create-user=admin --password=Password123

there is no output from the command, but the gvm-check-setup still says the same thing. So I check the logs:

md manage:   INFO:2021-12-16 19h12.23 utc:65761:    Creating user.
md manage:WARNING:2021-12-16 19h12.23 utc:65761: sql_exec_internal: PQexec failed: ERROR:  must be owner of aggregate group_concat
 (7)
md manage:WARNING:2021-12-16 19h12.23 utc:65761: sql_exec_internal: SQL: DROP AGGREGATE IF EXISTS group_concat (text, text);
md manage:WARNING:2021-12-16 19h12.23 utc:65761: sqlv: sql_exec_internal failed

How can I fix this. The package is installed from the repository in Kali Linux and I’m using the exact command from the sudo gvm-check-setup command.

Of course the user isn’t deleted automatically. It is just never created because the db setup is broken. Sadly I can’t image why it broke. I am not very familiar with the setup on Kali. Personally I would delete the gvmd db in postgres and afterwards run Kalis gvm-setup script to hopefully re-create the db from scratch.

2 Likes

No, the user was created. I know this because I was using GSO on this system for weeks. It was working fine for a week, then suddenly I could not log in. I had to create the user again. Then it happened again yesterday. This output is not from new installation process. It’s from a system that was working fine for several weeks.

In the end, I reinstalled the complete Kali installation and reinstalled GVM from repository. Works fine now. The previous version of Kali was a few years old and had many package conflicts because it was running a lot of different software. So, hopefully, fresh installation will be better.

I suppose you did install a Kali update that switched the PostgeSQL version and the db didn’t got migrated correctly to the new version. No user is deleted automatically from our side!

1 Like

Not sure what happened. Like I said, it happened twice. First time I noticed when I could not log in. Second time, sudo gvm-start would not start the GSO, so I ran sudo gvm-check-setup and you can see the results above.