You are not logged in.

#1 2025-03-06 15:54:44

tugoese
Member
Registered: 2023-10-15
Posts: 38

OpenVAS: Initial Setup

The wiki says: 

# chown -R gvm:gvm /var/lib/openvas
[gvm]$ greenbone-nvt-sync && openvas --update-vt-info

The latter does that mean I need to switch to gvm user while in postgres? also they're asking for a password

I use the blackarch repo

Offline

#2 2025-03-06 16:19:48

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,237

Re: OpenVAS: Initial Setup

blackarch isn't supported here, so you'll have to reproduce the "asking for a password" question on an Arch install and give us the full error.

As for the Wiki nomenclature: # means run as root and $ run as non-root, so `[gvm]$` means run as the gvm user. You should be using a Privilege escalation tool to become those users, for example: `sudo -iu postgres` and `sudo -iu gvm`. It's typically easier to first become root (sudo -i) and then become postgres/gvm (use `exit` to return to root in between) to avoid password prompts for those users, but that all depends on your sudoers setup and if you're even using sudo in the first place as your escalation tool.

Offline

#3 2025-03-07 01:13:03

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

It's not an error; I just didn't expect that switching users in postgres would require a password. I tried resetting it with `psql`, but it still doesn't work. Is it possible to bypass this by modifying the sudoers?

Offline

#4 2025-03-07 10:00:34

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,389

Re: OpenVAS: Initial Setup

[postgres]$ psql gvmd
# create role dba with superuser noinherit;
# grant dba to gvm;
# create extension "uuid-ossp";
# \q

The # in this codebox looks like  a prompt from psql and NOT from the shell .
Ensure you run those commands while being logged in as postgres user, not root.

All other # I see in "Initial setup" do mean run-as-root .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2025-03-07 12:15:44

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

It's already done, sire. I'm aware of that; please don't patronize me.

sudo -iu postgres
[postgres@exe0 ~]$ psql gvmd
psql (17.2)
Type "help" for help.

gvmd=# create role dba with superuser noinherit;
ERROR:  role "dba" already exists

Offline

#6 2025-03-07 15:27:15

twelveeighty
Member
From: Alberta, Canada
Registered: 2011-09-04
Posts: 1,237

Re: OpenVAS: Initial Setup

If you're already "done", please mark your post as SOLVED.

Offline

#7 Yesterday 02:29:37

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

Not yet; I'm still stuck on the login. I've already set all methods to 'trust' in my pg_hba.conf file, but I'm still encountering issues.

I don't believe PostgreSQL prompted me to create a password during the installation.

Instruction unclear.

Offline

#8 Yesterday 02:33:24

mackin_cheese
Member
Registered: 2025-01-07
Posts: 258

Re: OpenVAS: Initial Setup

Did you see in the wiki, the page you referenced, that the package is broken?

Offline

#9 Yesterday 02:42:23

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

mackin_cheese wrote:

Did you see in the wiki, the page you referenced, that the package is broken?

Have you seen my first post?

Offline

#10 Yesterday 15:51:47

loqs
Member
Registered: 2014-03-06
Posts: 18,341

Re: OpenVAS: Initial Setup

tugoese wrote:

Not yet; I'm still stuck on the login. I've already set all methods to 'trust' in my pg_hba.conf file, but I'm still encountering issues.

What command is failing with what output? https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#11 Yesterday 17:13:10

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

~ sudo -iu postgres
...
[postgres@exe0 ~]$ sudo -iu gvm
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

[sudo] password for postgres:

Offline

#12 Yesterday 17:50:28

Whoracle
Member
Registered: 2010-11-02
Posts: 90

Re: OpenVAS: Initial Setup

You're trying to sudo from the postgres user. Try exiting that shell and sudoing from root.

Offline

#13 Today 00:30:06

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

su
...
[root@exe0 akx]# sudo -iu gvm
This account is currently not available.

Offline

#14 Today 00:34:23

mackin_cheese
Member
Registered: 2025-01-07
Posts: 258

Re: OpenVAS: Initial Setup

tugoese wrote:
su
...
[root@exe0 akx]# sudo -iu gvm
This account is currently not available.

did you create the gvm user?

Offline

#15 Today 00:45:54

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

Yeah; as postgres user

Offline

#16 Today 10:31:25

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,389

Re: OpenVAS: Initial Setup

Please post the output of

$ getent passwd | grep gvm

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#17 Today 11:41:07

tugoese
Member
Registered: 2023-10-15
Posts: 38

Re: OpenVAS: Initial Setup

$ getent passwd | grep gvm
gvm:x:951:951:User for Greenbone Vulnerability Mangement:/:/usr/bin/nologin

Offline

Board footer

Powered by FluxBB