You are not logged in.

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

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

OpenVAS: Initial setup instruction unclear

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

Last edited by tugoese (2025-03-13 14:25:47)

Offline

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

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

Re: OpenVAS: Initial setup instruction unclear

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.

Online

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

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

Re: OpenVAS: Initial setup instruction unclear

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,454

Re: OpenVAS: Initial setup instruction unclear

[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: 39

Re: OpenVAS: Initial setup instruction unclear

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,270

Re: OpenVAS: Initial setup instruction unclear

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

Online

#7 2025-03-08 02:29:37

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

Re: OpenVAS: Initial setup instruction unclear

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 2025-03-08 02:33:24

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

Re: OpenVAS: Initial setup instruction unclear

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

Offline

#9 2025-03-08 02:42:23

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

Re: OpenVAS: Initial setup instruction unclear

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 2025-03-08 15:51:47

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

Re: OpenVAS: Initial setup instruction unclear

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 2025-03-08 17:13:10

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

Re: OpenVAS: Initial setup instruction unclear

~ 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 2025-03-08 17:50:28

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

Re: OpenVAS: Initial setup instruction unclear

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

Offline

#13 2025-03-09 00:30:06

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

Re: OpenVAS: Initial setup instruction unclear

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

Offline

#14 2025-03-09 00:34:23

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

Re: OpenVAS: Initial setup instruction unclear

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

did you create the gvm user?

Offline

#15 2025-03-09 00:45:54

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

Re: OpenVAS: Initial setup instruction unclear

Yeah; as postgres user

Offline

#16 2025-03-09 10:31:25

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

Re: OpenVAS: Initial setup instruction unclear

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 2025-03-09 11:41:07

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

Re: OpenVAS: Initial setup instruction unclear

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

Offline

#18 2025-03-19 12:02:19

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

Re: OpenVAS: Initial setup instruction unclear

Bump

Offline

#19 2025-03-19 15:01:14

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

Re: OpenVAS: Initial setup instruction unclear

For someone that's complaining about people "patronizing" you and how you are already "done", you sure are demanding other people's help. It's classic Help Vampire behavior.

Don't bump - it's considered rude here. Instead, carefully read the comments made by various people that are trying to help. Also read the output of your last post and think for 2 seconds about what `/usr/bin/nologin` means. Then go back and figure out how the gvm user got created that way in the first place. Tip: it's NOT the `createuser` command.

Online

Board footer

Powered by FluxBB