Giter Club home page Giter Club logo

gvm_install's People

Contributors

antonionovaescronapp avatar antonionovaesjr avatar aretsmarvin avatar equinoxefr avatar gorges avatar itiligent avatar jarli01 avatar rybli avatar tonoitp avatar xenago avatar yu210148 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gvm_install's Issues

Having an issue at building gsa

Having an issue at building gsa, after line 141 i think, it all goes well untill there, but after make command, "browserslist:caniuse-lite is outdated, run the next command yarn upgrade" is shown, i cant seem to find a solution to it?

no scanconfigs on 21.04

Hey there,
just cross with an issue witch seems to be repetable.
I've tested twice on fresh ubuntu install with same results.

By just running the script on a fresh ubuntu install (with just update+upgrade), we end up with 0 scan configs in "https://GVMHOST/scanconfigs".

The scanconfigs should have presets of scanners like:

Base
Discovery
Full and fast

Are you guys seeing this as well?

some ideas to make the script more pretty

Hi,

I have some ideas to make the script more pretty.

write config file

cat > /etc/systemd/system/disable_thp.service << EOF
[Unit]
Description=Disable THP"

[Service]
Type=simple

EOF

switch user to exec lots of commands

su - gvm << EOF
touch 1.txt
touch 2.txt
touch 3.txt
EOF

use python venv not PYTHONPATH

PYTHONPATH not work on some OS, you can use venv instead.
https://docs.python.org/3/library/venv.html

This new version does not work for me - No results in the report

I tried both version (20 & 21) on Ubuntu 20.04 and both do not return any issue in the report. The report is there but pretty much empty.
On the exact same box and in the exact same environment I went back to a version of install_gvm.sh that we had downloaded in January and the 20 version is working as expected.

GVM Version 20 Doesn't Detect NMAP on Debian 10

Once the script finishes and all the feeds are updated on a Debian 10 host when installing version 20 I'm able to create a scan but when it runs the Check for enabled / working Port scanner plugin reports that nmap wasn't found:


Detection Result

The host wasn't scanned due to the following possible reasons:

  • No Port scanner plugin from the "Port scanners" family is included in this scan configuration. Recommended: Nmap (NASL wrapper).
  • The Port scanner plugin reached a timeout during the port scanning phase. Please either choose a port range for this target containing less ports or raise the "scanner_plugins_timeout" scanner preference to a higher timeout.

Seems to work on Ubuntu 20.04 so I'm thinking it either has something to do with the versions of nmap differing. However, I've tried pulling down the latest nmap and compiling it from source with no joy.

It may have something to do with the path on the Debian host. Not sure what yet.

kev.

Issue with Install

Trying to use the install script on Ubuntu 20.04.4 LTS

Seems to be some issue with not being able to create/change into /tmp/gvm-source and for a while after for the first block of error.

Second block seems to start around line 256 with adding the gvm account to sudoers.

Error 1

sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
./install_gvm.sh: line 140: cd: /tmp/gvm-source: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudosudo: : unable to change directory to /home/gvm: No such file or directory
unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudosudo: unable to change directory to /home/gvm: No such file or directory
: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
cp: cannot stat '/tmp/gvm-source/openvas-scanner-21.4.4/config/redis-openvas.conf': No such file or directory
chown: cannot access '/etc/redis/redis-openvas.conf': No such file or directory
./install_gvm.sh: line 236: /opt/gvm/etc/openvas/openvas.conf: No such file or directory
chown: cannot access '/opt/gvm/etc/openvas/openvas.conf': No such file or directory

Error 2

Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xe" for details.
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/gvm/sbin:/opt/gvm/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
Sleeping for 30 seconds...
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.
This account is currently not available.
This account is currently not available.
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: sudo: unable to change directory to /home/gvm: No such file or directory
unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudosudo: unable to execute /usr/sbin/nologin: No such file or directory
: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
sudo: unable to change directory to /home/gvm: No such file or directory
sudo: unable to execute /usr/sbin/nologin: No such file or directory
This account is currently not available.
This account is currently not available.

I've tried running as the ubuntu user with sudo, as well as changing to root and running the script as well. Looked through the existing issues and all closed ones for a possible solution but did not seem to find any that shared my issue. If I seemed to miss something please let me know and I will close out this issue.

Thanks.

No login via smb while scanning

Hello,
I've used this wonderful script for the first time on a Ubuntu 20.04.3 VM and as far as I could see it went well and created a working GSA version 21.04. I was able to create tasks and scanned linux machines. I did not manage to get the openvas-smb working it seems. The scanning process did not even try to login to windows machines (ssh on linux works well). The resulting reports do not contain a "smb"-row in the "Host Authentication" table, so I suspect the openvas-smb is not active/loaded/linked (no idea how to verify that). The build process did not show any errors or warnings regarding openvas-smb (I will rerun it and try to capture the output to be sure).
Any ideas?
Kind Regards
Juergen

Excuse me

May I use your install.sh to successfully install, but this error message appears, I donโ€™t know how to solve it? Is there any other solution available?

This script checks and reports an outdated or end-of-life scan engine for the following environ-
ments:

  • Greenbone Source Edition (GSE)
  • Greenbone Security Manager TRIAL (formerly Greenbone Community Edition (GCE))
    used for this scan.
    . . . continues on next page . . .
    OTE: While this is not, in and of itself, a security vulnerability, a severity is reported to make
    you aware of a possible decreased scan coverage or missing detection of vulnerabilities on the
    target due to e.g.:
  • missing functionalities
  • missing bug๏ฟฝxes
  • incompatibilities within the feed
    Vulnerability Detection Result
    Installed GVM Libraries (gvm-libs) version:
    21.4.1
    Latest available GVM Libraries (gvm-libs) version: 21.4.3
    Reference URL(s) for the latest available version: https://community.greenbone.n
    ,โ†’ et/t/gvm-21-04-stable-initial-release-2021-04-16/8942

Post script run: "GMP service is down"

After running the install_gvm.sh to completion with no errors presented on a clean and minimum build of Ubuntu 20.04 (just SSH installed), I received the the error message on the webUI when trying to log into GVM:

"GMP service is down".

Screenshot at 2020-08-14 05-00-04

The best I can find so far is the following:

# sudo systemctl status gvm.service
โ— gvm.service - Control the OpenVAS GVM service
     Loaded: loaded (/etc/systemd/system/gvm.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-08-14 10:56:15 UTC; 3s ago
TriggeredBy: โ— gvm.path
    Process: 50607 ExecStart=/opt/gvm/sbin/gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock (code=exited, status=1/FAILURE)
   Main PID: 50607 (code=exited, status=1/FAILURE)

Aug 14 10:56:15 vm-openvas systemd[1]: Started Control the OpenVAS GVM service.
Aug 14 10:56:15 vm-openvas systemd[1]: gvm.service: Main process exited, code=exited, status=1/FAILURE
Aug 14 10:56:15 vm-openvas systemd[1]: gvm.service: Failed with result 'exit-code'.

Attempting
# systemctl restart gvm.service; systemctl status gvm.service
returns the similar
Active: failed (Result: exit-code)
message as well.

Suggestions and guidance is welcomed. Thanks in advance.

Failed to verify scanner and GMP Service is down

Hello,

At the end of the installation i noticed the error failed to verify scanner.
I waited 5m then i used the commands gvmd --get-scanners to get the list of the scanner, so i get the UUID.

I verified the scanner with the command:
gvmd --verify-scanner=myUUID
And it worked.

After that i run the UI, and if i try to login i get the error GMP Service is down.

Looking at services from the termina, the service gvm.service is down:

gvm@VA:~$ systemctl status gvm.service 
โ— gvm.service - Control the OpenVAS GVM service
     Loaded: loaded (/etc/systemd/system/gvm.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-09-04 09:44:20 CEST; 27min ago
TriggeredBy: โ— gvm.path
    Process: 51074 ExecStart=/opt/gvm/sbin/gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock (co>
   Main PID: 51074 (code=exited, status=1/FAILURE)
gvm@VA:~$ systemctl start gvm.service 

I try to restart the service but still not working.

What can i verify in this case?

Thank you in advance.

Certain Optional Dependencies Missing

While trying to create credential exes for credentialed scans I ran across the exes downloading as 0KB.

Did some digging and found that the install script does not contain a number of the optional dependencies required for creating credentialed scan packages and some other features.

Ran the following code found here: https://greenbone.github.io/docs/gvm-21.04/index.html#id22 and got credential scan packages working.

I will most likely work on editing the code and testing this week and do another pull request.

Just making an issue for those who may run into the same issue.

It's possible for the feed updates to clobber eachother

Currently, the feed updates are assigned random times to run each day so it is possible--although unlikely--they might get assigned times that are too close to each other. It might be better if the first one to get set up is assigned a random time then the others are executed say, maybe an hour later from each other.

In the unlikely event that you're affected by this I'd recommend manually editing the gvm user's crontab to space the feed updates out as a workaround.

I'm not sure when I'll get a chance to address this but I thought it should be documented.

kev.

New install on Ubuntu 20.04.3 not starting

Just did a clean install of Ubuntu 20.04.3 with nothing installed other than openSSH. I ran the suggested default install commands:

wget https://raw.githubusercontent.com/yu210148/gvm_install/master/install_gvm.sh
chmod +x install_gvm.sh
sudo ./install_gvm.sh -v 21 -u

Install seems to finish successfully, but no GUI or service responds on https://xxx.xxx.xxx.xxx
I rebooted the server, still nothing.

The user I made before running the install script now has this in his home folder:

root@gvmsource:/home/gvm# ls -al
total 5748
drwxr-xr-x 11 gvm gvm 4096 Dec 22 07:15 .
drwxr-xr-x 3 root root 4096 Dec 22 07:03 ..
-rw------- 1 gvm gvm 203 Dec 22 07:15 .bash_history
-rw-r--r-- 1 gvm gvm 220 Feb 25 2020 .bash_logout
-rw-r--r-- 1 gvm gvm 3771 Feb 25 2020 .bashrc
drwx------ 2 gvm gvm 4096 Dec 22 07:07 .cache
drwxrwxr-x 7 gvm gvm 4096 Oct 12 12:16 gsa-21.4.3
-rw-rw-r-- 1 gvm gvm 2683994 Dec 22 07:13 gsa-21.4.3.tar.gz
drwxrwxr-x 9 gvm gvm 4096 Oct 12 06:59 gvmd-21.4.4
-rw-rw-r-- 1 gvm gvm 1031202 Dec 22 07:13 gvmd-21.4.4.tar.gz
drwxrwxr-x 11 gvm gvm 4096 Oct 11 14:38 gvm-libs-21.4.3
-rw-rw-r-- 1 gvm gvm 297761 Dec 22 07:13 gvm-libs-21.4.3.tar.gz
-rwxrwxr-x 1 gvm gvm 32069 Dec 22 07:10 install_gvm.sh
drwxr-xr-x 2 root root 4096 Dec 22 07:12 node_modules
drwxrwxr-x 12 gvm gvm 4096 Oct 11 15:37 openvas-scanner-21.4.3
-rw-rw-r-- 1 gvm gvm 454482 Dec 22 07:13 openvas-scanner-21.4.3.tar.gz
drwxrwxr-x 8 gvm gvm 4096 Apr 15 2021 openvas-smb-21.4.0
-rw-rw-r-- 1 gvm gvm 1082191 Dec 22 07:13 openvas-smb-21.4.0.tar.gz
drwxrwxr-x 6 gvm gvm 4096 Oct 12 13:50 ospd-21.4.4
-rw-rw-r-- 1 gvm gvm 127090 Dec 22 07:13 ospd-21.4.4.tar.gz
drwxrwxr-x 7 gvm gvm 4096 Oct 12 12:05 ospd-openvas-21.4.3
-rw-rw-r-- 1 gvm gvm 91272 Dec 22 07:13 ospd-openvas-21.4.3.tar.gz
-rw-r--r-- 1 gvm gvm 807 Feb 25 2020 .profile
-rw-r--r-- 1 gvm gvm 0 Dec 22 07:07 .sudo_as_admin_successful
-rw-rw-r-- 1 gvm gvm 180 Dec 22 07:10 .wget-hsts
-rw-r--r-- 1 root root 86 Dec 22 07:12 yarn.lock

Advice please?

Please help on listening address.

This installs well on a fresh install on ubuntu 20.04 and I can run it from the local machine fine.

What do I need to change so I can access it from a remote machine on the same network ??

Problem creating a Scan Config

Hi There!

thanks for your Install script.
I was trying to install GVM for the last 2 days but I always got this error:

Failed to find config 'daba56c8-73ec-11df-a475-002264764cea'

no matter which Distro I tried (Ubuntu 20.04 Server, Kali 2020.1, newest Kali, Debian) I always get the same issue above when I try to run scans.

Some Logs I got:

ospd-openvasd.log: 

OSPD[41878] 2021-04-22 07:52:54,014: ERROR: (ospd.server) Error sending data to the client. [Errno 32] Broken pipe
OSPD[41878] 2021-04-22 07:52:54,344: INFO: (ospd.main) Shutting-down server ...
OSPD[1159] 2021-04-22 07:53:52,905: INFO: (ospd.main) Starting OSPd OpenVAS version 20.8.3.dev1.
OSPD[1159] 2021-04-22 07:56:59,111: ERROR: (ospd_openvas.openvas) OpenVAS Scanner failed to load VTs. Command '['openvas', '--update-vt-info']' died with <Signals.SIGABRT: 6>.


gvmd.log:

event config:MESSAGE:2021-04-22 08h22.20 UTC:14332: Config could not be created by gvmadmin
event config:MESSAGE:2021-04-22 08h22.22 UTC:14343: Config could not be created by gvmadmin
event config:MESSAGE:2021-04-22 08h22.22 UTC:14348: Config could not be created by gvmadmin


Isnยดt it possible to provide a .OVA file in order to easy deploy?

Question - Scan Configs

Regarding the scan configs which get included by default, at there any other that you @yu210148 import by default?

If so what are they, and do you have a trusted source to get additional configs from?

Use tag instead of branch

Hi, a little suggestion,

Instead of using branch to clone the repositories, you can use tags to get a specific and "stable" version.

For example: sudo -Hiu gvm git clone -b v21.4.0 https://github.com/greenbone/gvm-libs.git

Many thanks for your script, it's perfect.

Best regards

URL?

Pardon my noobish-ness here. I have a fresh install of Ubuntu 20.04 and i went ahead and ran this script... I've skimmed through all 300+ lines and I can't seem find the what the default URL is of the installation....

I believe what am asking is how to run the very first command of wget

wget

Hello I dont understand this line "wget https://raw.githubusercontent.com//gvm_install/master/install_gvm.sh" I am a newbie and very blunt, I am trying to run the script but when i use the above on the terminal it says "bash: account: No such file or directory" what am I supposed to do step by step please, imagine I dont know anything, please help me. I get confused with I dont know what you mean there or what I should put there and wget is saving as index.html and when i open in the editor i am seeing different things not the script

Empty reports

Hello,

Used your wonderful script to install GVM and the install went through fine. The daemons are all running, I am able to login to the UI. However, when I create a task to scan a target, I am returned a report that only contains the "Summary" and "Result Overview". The "Result per Host" is empty.
Not sure what the issue might be. Any clues on what I have done wrong ?
Thanks.

Uninstall Script

Is there a way to uninstall it?
Or at least disable it so it doesn't run and take up resources, updating and using TCP ports?

collect2: error: ld returned 1 exit status

Here is the process output on fresh installed Ubuntu 20.04:

[ 29%] Building C object samba/CMakeFiles/samba-static.dir/auth/pam_errors.c.o
[ 29%] Building C object samba/CMakeFiles/samba-static.dir/auth/sam.c.o
[ 29%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/common/flag_mapping.c.o
[ 30%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/cracknames.c.o
/opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c: In function โ€˜DsCrackNameUPNโ€™:
/opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c:247:2: warning: โ€˜krb5_princ_realmโ€™ is deprecated [-Wdeprecated-declarations]
  247 |  realm = krb5_princ_realm(smb_krb5_context->krb5_context, principal);
      |  ^~~~~
In file included from /usr/include/heimdal/krb5.h:967,
                 from /opt/gvm/openvas-smb/samba/lib/replace/system/kerberos.h:128,
                 from /opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c:29:
/usr/include/heimdal/krb5-protos.h:6374:1: note: declared here
 6374 | krb5_princ_realm (
      | ^~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c: In function โ€˜DsCrackNameOneNameโ€™:
/opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c:468:4: warning: โ€˜krb5_princ_realmโ€™ is deprecated [-Wdeprecated-declarations]
  468 |    realm = krb5_princ_realm(smb_krb5_context->krb5_context, principal);
      |    ^~~~~
In file included from /usr/include/heimdal/krb5.h:967,
                 from /opt/gvm/openvas-smb/samba/lib/replace/system/kerberos.h:128,
                 from /opt/gvm/openvas-smb/samba/dsdb/samdb/cracknames.c:29:
/usr/include/heimdal/krb5-protos.h:6374:1: note: declared here
 6374 | krb5_princ_realm (
      | ^~~~~~~~~~~~~~~~
[ 30%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/entryUUID.c.o
[ 30%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/extended_dn.c.o
[ 31%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/kludge_acl.c.o
[ 31%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/local_password.c.o
[ 31%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/objectguid.c.o
[ 32%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/partition.c.o
[ 32%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/password_hash.c.o
[ 32%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/rootdse.c.o
[ 32%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/samba3sam.c.o
[ 34%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/samldb.c.o
[ 34%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/schema.c.o
/opt/gvm/openvas-smb/samba/dsdb/samdb/ldb_modules/schema.c: In function โ€˜schema_check_attributes_syntaxโ€™:
/opt/gvm/openvas-smb/samba/dsdb/samdb/ldb_modules/schema.c:943:6: warning: assignment discards โ€˜constโ€™ qualifier from pointer target type [-Wdiscarded-qualifiers]
  943 |  msg = sctx->orig_req->op.add.message;
      |      ^
[ 34%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/ldb_modules/schema_syntax.c.o
[ 35%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/samdb.c.o
[ 35%] Building C object samba/CMakeFiles/samba-static.dir/dsdb/samdb/samdb_privilege.c.o
[ 35%] Building C object samba/CMakeFiles/samba-static.dir/lib/charset/charcnv.c.o
[ 36%] Building C object samba/CMakeFiles/samba-static.dir/lib/charset/iconv.c.o
[ 36%] Building C object samba/CMakeFiles/samba-static.dir/lib/charset/util_unistr.c.o
[ 36%] Building C object samba/CMakeFiles/samba-static.dir/libcli/auth/credentials.c.o
[ 36%] Building C object samba/CMakeFiles/samba-static.dir/libcli/auth/smbdes.c.o
[ 37%] Building C object samba/CMakeFiles/samba-static.dir/libcli/auth/smbencrypt.c.o
[ 37%] Building C object samba/CMakeFiles/samba-static.dir/libcli/cliconnect.c.o
[ 37%] Building C object samba/CMakeFiles/samba-static.dir/libcli/clifile.c.o
[ 38%] Building C object samba/CMakeFiles/samba-static.dir/libcli/composite/composite.c.o
[ 38%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_bind.c.o
[ 38%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap.c.o
[ 39%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_client.c.o
[ 39%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_controls.c.o
[ 39%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_ildap.c.o
[ 39%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_msg.c.o
[ 40%] Building C object samba/CMakeFiles/samba-static.dir/libcli/ldap/ldap_ndr.c.o
[ 40%] Building C object samba/CMakeFiles/samba-static.dir/libcli/nbt/namequery.c.o
[ 40%] Building C object samba/CMakeFiles/samba-static.dir/libcli/nbt/nbtname.c.o
[ 41%] Building C object samba/CMakeFiles/samba-static.dir/libcli/nbt/nbtsocket.c.o
[ 41%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/clisession.c.o
[ 41%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/clisocket.c.o
[ 42%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/clitransport.c.o
[ 42%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/clitree.c.o
[ 42%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawacl.c.o
[ 42%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawdate.c.o
[ 43%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/raweas.c.o
[ 43%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawfile.c.o
[ 43%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawfileinfo.c.o
[ 44%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawfsinfo.c.o
[ 44%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawnegotiate.c.o
[ 44%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawnotify.c.o
[ 45%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawreadwrite.c.o
[ 45%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawrequest.c.o
[ 45%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawsetfileinfo.c.o
[ 45%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/rawtrans.c.o
[ 46%] Building C object samba/CMakeFiles/samba-static.dir/libcli/raw/smb_signing.c.o
[ 46%] Building C object samba/CMakeFiles/samba-static.dir/libcli/resolve/bcast.c.o
[ 46%] Building C object samba/CMakeFiles/samba-static.dir/libcli/resolve/host.c.o
[ 47%] Building C object samba/CMakeFiles/samba-static.dir/libcli/resolve/nbtlist.c.o
[ 47%] Building C object samba/CMakeFiles/samba-static.dir/libcli/resolve/resolve.c.o
[ 47%] Building C object samba/CMakeFiles/samba-static.dir/libcli/resolve/wins.c.o
[ 48%] Building C object samba/CMakeFiles/samba-static.dir/libcli/security/dom_sid.c.o
[ 48%] Building C object samba/CMakeFiles/samba-static.dir/libcli/security/privilege.c.o
[ 48%] Building C object samba/CMakeFiles/samba-static.dir/libcli/security/sddl.c.o
[ 48%] Building C object samba/CMakeFiles/samba-static.dir/libcli/security/security_descriptor.c.o
[ 49%] Building C object samba/CMakeFiles/samba-static.dir/libcli/security/security_token.c.o
[ 49%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/cancel.c.o
[ 49%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/close.c.o
[ 50%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/connect.c.o
[ 50%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/create.c.o
[ 50%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/ioctl.c.o
[ 51%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/negprot.c.o
[ 51%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/read.c.o
[ 51%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/request.c.o
[ 51%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/session.c.o
[ 52%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/tcon.c.o
[ 52%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/transport.c.o
[ 52%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb2/write.c.o
[ 53%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb_composite/connect.c.o
[ 53%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb_composite/savefile.c.o
[ 53%] Building C object samba/CMakeFiles/samba-static.dir/libcli/smb_composite/sesssetup.c.o
[ 54%] Building C object samba/CMakeFiles/samba-static.dir/libcli/util/asn1.c.o
[ 54%] Building C object samba/CMakeFiles/samba-static.dir/libcli/util/doserr.c.o
[ 54%] Building C object samba/CMakeFiles/samba-static.dir/libcli/util/errormap.c.o
[ 54%] Building C object samba/CMakeFiles/samba-static.dir/libcli/util/nterr.c.o
[ 55%] Building C object samba/CMakeFiles/samba-static.dir/lib/cmdline/credentials.c.o
[ 55%] Building C object samba/CMakeFiles/samba-static.dir/lib/cmdline/popt_common.c.o
[ 55%] Building C object samba/CMakeFiles/samba-static.dir/lib/cmdline/popt_credentials.c.o
[ 56%] Building C object samba/CMakeFiles/samba-static.dir/lib/com/classes/simple.c.o
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:90:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *, struct GUID *)โ€™} from incompatible pointer type โ€˜WERROR (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *, struct IUnknown **)โ€™ {aka โ€˜struct <anonymous> (*)(struct IUnknown *, void *, struct GUID *, struct IUnknown **)โ€™} [-Wincompatible-pointer-types]
   90 |  simpleclass_IUnknown_QueryInterface,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:90:2: note: (near initialization for โ€˜simple_classobject_vtable.QueryInterface_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:91:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *)โ€™} from incompatible pointer type โ€˜uint32_t (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜unsigned int (*)(struct IUnknown *, void *)โ€™} [-Wincompatible-pointer-types]
   91 |  simpleclass_IUnknown_AddRef,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:91:2: note: (near initialization for โ€˜simple_classobject_vtable.AddRef_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:92:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *)โ€™} from incompatible pointer type โ€˜uint32_t (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜unsigned int (*)(struct IUnknown *, void *)โ€™} [-Wincompatible-pointer-types]
   92 |  simpleclass_IUnknown_Release,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:92:2: note: (near initialization for โ€˜simple_classobject_vtable.Release_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:93:2: warning: initialization of โ€˜struct composite_context * (*)(struct IClassFactory *, TALLOC_CTX *, struct MInterfacePointer *, struct GUID *)โ€™ {aka โ€˜struct composite_context * (*)(struct IClassFactory *, void *, struct MInterfacePointer *, struct GUID *)โ€™} from incompatible pointer type โ€˜WERROR (*)(struct IClassFactory *, TALLOC_CTX *, struct IUnknown *, struct GUID *, struct IUnknown **)โ€™ {aka โ€˜struct <anonymous> (*)(struct IClassFactory *, void *, struct IUnknown *, struct GUID *, struct IUnknown **)โ€™} [-Wincompatible-pointer-types]
   93 |  simpleclass_IClassFactory_CreateInstance,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:93:2: note: (near initialization for โ€˜simple_classobject_vtable.CreateInstance_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:101:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *, struct GUID *)โ€™} from incompatible pointer type โ€˜WERROR (*)(struct IUnknown *, TALLOC_CTX *, struct GUID *, struct IUnknown **)โ€™ {aka โ€˜struct <anonymous> (*)(struct IUnknown *, void *, struct GUID *, struct IUnknown **)โ€™} [-Wincompatible-pointer-types]
  101 |  simple_IUnknown_QueryInterface,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:101:2: note: (near initialization for โ€˜simple_IStream_vtable.QueryInterface_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:102:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *)โ€™} from incompatible pointer type โ€˜uint32_t (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜unsigned int (*)(struct IUnknown *, void *)โ€™} [-Wincompatible-pointer-types]
  102 |  simple_IUnknown_AddRef,
      |  ^~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:102:2: note: (near initialization for โ€˜simple_IStream_vtable.AddRef_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:103:2: warning: initialization of โ€˜struct composite_context * (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜struct composite_context * (*)(struct IUnknown *, void *)โ€™} from incompatible pointer type โ€˜uint32_t (*)(struct IUnknown *, TALLOC_CTX *)โ€™ {aka โ€˜unsigned int (*)(struct IUnknown *, void *)โ€™} [-Wincompatible-pointer-types]
  103 |  simple_IUnknown_Release,
      |  ^~~~~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:103:2: note: (near initialization for โ€˜simple_IStream_vtable.Release_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:104:2: warning: initialization of โ€˜struct composite_context * (*)(struct IStream *, TALLOC_CTX *, uint32_t,  uint32_t *)โ€™ {aka โ€˜struct composite_context * (*)(struct IStream *, void *, unsigned int,  unsigned int *)โ€™} from incompatible pointer type โ€˜WERROR (*)(struct IStream *, TALLOC_CTX *, uint8_t *, uint32_t,  uint32_t *, uint32_t)โ€™ {aka โ€˜struct <anonymous> (*)(struct IStream *, void *, unsigned char *, unsigned int,  unsigned int *, unsigned int)โ€™} [-Wincompatible-pointer-types]
  104 |  simple_IStream_Read,
      |  ^~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:104:2: note: (near initialization for โ€˜simple_IStream_vtable.Read_sendโ€™)
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:105:2: warning: initialization of โ€˜struct composite_context * (*)(struct IStream *, TALLOC_CTX *, uint8_t *, uint32_t)โ€™ {aka โ€˜struct composite_context * (*)(struct IStream *, void *, unsigned char *, unsigned int)โ€™} from incompatible pointer type โ€˜WERROR (*)(struct IStream *, TALLOC_CTX *, uint8_t *, uint32_t,  uint32_t)โ€™ {aka โ€˜struct <anonymous> (*)(struct IStream *, void *, unsigned char *, unsigned int,  unsigned int)โ€™} [-Wincompatible-pointer-types]
  105 |  simple_IStream_Write
      |  ^~~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/com/classes/simple.c:105:2: note: (near initialization for โ€˜simple_IStream_vtable.Write_sendโ€™)
[ 56%] Building C object samba/CMakeFiles/samba-static.dir/lib/com/dcom/main.c.o
[ 56%] Building C object samba/CMakeFiles/samba-static.dir/lib/com/dcom/tables.c.o
[ 57%] Building C object samba/CMakeFiles/samba-static.dir/lib/com/main.c.o
[ 57%] Building C object samba/CMakeFiles/samba-static.dir/lib/compression/mszip.c.o
[ 57%] Building C object samba/CMakeFiles/samba-static.dir/lib/com/tables.c.o
[ 57%] Building C object samba/CMakeFiles/samba-static.dir/lib/crypto/arcfour.c.o
[ 58%] Building C object samba/CMakeFiles/samba-static.dir/lib/crypto/crc32.c.o
[ 58%] Building C object samba/CMakeFiles/samba-static.dir/lib/crypto/hmacmd5.c.o
[ 58%] Building C object samba/CMakeFiles/samba-static.dir/lib/crypto/md4.c.o
[ 59%] Building C object samba/CMakeFiles/samba-static.dir/lib/crypto/md5.c.o
[ 59%] Building C object samba/CMakeFiles/samba-static.dir/lib/db_wrap.c.o
[ 59%] Building C object samba/CMakeFiles/samba-static.dir/lib/events/events.c.o
[ 60%] Building C object samba/CMakeFiles/samba-static.dir/lib/events/events_standard.c.o
[ 60%] Building C object samba/CMakeFiles/samba-static.dir/lib/gendb.c.o
[ 60%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/attrib_handlers.c.o
[ 60%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_attributes.c.o
[ 61%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb.c.o
[ 61%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_controls.c.o
[ 61%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_debug.c.o
[ 62%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_dn.c.o
[ 62%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_ldif.c.o
[ 62%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_match.c.o
[ 63%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_modules.c.o
[ 63%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_msg.c.o
[ 63%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_parse.c.o
[ 63%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/ldb_utf8.c.o
[ 64%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/common/qsort.c.o
[ 64%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_ildap/ldb_ildap.c.o
[ 64%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_cache.c.o
[ 65%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_index.c.o
[ 65%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_pack.c.o
[ 65%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_search.c.o
[ 67%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_tdb.c.o
[ 67%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/ldb_tdb/ldb_tdb_wrap.c.o
[ 67%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/asq.c.o
[ 67%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/ldb_map.c.o
[ 68%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/ldb_map_inbound.c.o
[ 68%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/ldb_map_outbound.c.o
/opt/gvm/openvas-smb/samba/lib/ldb/modules/ldb_map_outbound.c: In function โ€˜ldb_msg_replaceโ€™:
/opt/gvm/openvas-smb/samba/lib/ldb/modules/ldb_map_outbound.c:199:18: warning: passing argument 1 of โ€˜talloc_freeโ€™ discards โ€˜constโ€™ qualifier from pointer target type [-Wdiscarded-qualifiers]
  199 |   talloc_free(old->name);
      |               ~~~^~~~~~
In file included from /opt/gvm/openvas-smb/samba/include/includes.h:83,
                 from /opt/gvm/openvas-smb/samba/lib/ldb/modules/ldb_map_outbound.c:27:
/opt/gvm/openvas-smb/samba/lib/talloc/talloc.h:127:23: note: expected โ€˜void *โ€™ but argument is of type โ€˜const char *โ€™
  127 | int talloc_free(void *ptr);
      |                 ~~~~~~^~~
[ 68%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/objectclass.c.o
[ 69%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/operational.c.o
/opt/gvm/openvas-smb/samba/lib/ldb/modules/operational.c: In function โ€˜operational_searchโ€™:
/opt/gvm/openvas-smb/samba/lib/ldb/modules/operational.c:247:45: warning: passing argument 1 of โ€˜ldb_parse_tree_attr_replaceโ€™ discards โ€˜constโ€™ qualifier from pointer target type [-Wdiscarded-qualifiers]
  247 |   ldb_parse_tree_attr_replace(req->op.search.tree,
      |                               ~~~~~~~~~~~~~~^~~~~
In file included from /opt/gvm/openvas-smb/samba/lib/ldb/include/includes.h:29,
                 from /opt/gvm/openvas-smb/samba/lib/ldb/modules/operational.c:78:
/opt/gvm/openvas-smb/samba/lib/ldb/include/ldb.h:1528:57: note: expected โ€˜struct ldb_parse_tree *โ€™ but argument is of type โ€˜const struct ldb_parse_tree *โ€™
 1528 | void ldb_parse_tree_attr_replace(struct ldb_parse_tree *tree,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~
[ 69%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/paged_results.c.o
[ 69%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/paged_searches.c.o
[ 70%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/rdn_name.c.o
[ 70%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/skel.c.o
[ 70%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/modules/sort.c.o
[ 70%] Building C object samba/CMakeFiles/samba-static.dir/lib/ldb/samba/ldif_handlers.c.o
[ 71%] Building C object samba/CMakeFiles/samba-static.dir/lib/messaging/messaging.c.o
[ 71%] Building C object samba/CMakeFiles/samba-static.dir/lib/replace/replace.c.o
[ 71%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_basic.c.o
[ 72%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr.c.o
[ 72%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_compression.c.o
[ 72%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_dcom.c.o
[ 73%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_drsuapi.c.o
[ 73%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_krb5pac.c.o
[ 73%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_misc.c.o
[ 73%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_orpc.c.o
[ 74%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_sec_helper.c.o
[ 74%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_spoolss_buf.c.o
[ 74%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/ndr_string.c.o
[ 75%] Building C object samba/CMakeFiles/samba-static.dir/librpc/ndr/uuid.c.o
[ 75%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_auth.c.o
[ 75%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc.c.o
[ 76%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_connect.c.o
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_ncacn_np_smb_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:150:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  150 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                  |
      |                                                                                  NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:150:3: note: in expansion of macro โ€˜DEBUGโ€™
  150 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:150:34: note: format string is defined here
  150 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_ncacn_np_smb2_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:255:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  255 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb2_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                   |
      |                                                                                   NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:255:3: note: in expansion of macro โ€˜DEBUGโ€™
  255 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb2_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:255:34: note: format string is defined here
  255 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_np_smb2_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_ncacn_ip_tcp_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:329:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  329 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_ip_tcp_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                  |
      |                                                                                  NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:329:3: note: in expansion of macro โ€˜DEBUGโ€™
  329 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_ip_tcp_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:329:34: note: format string is defined here
  329 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_ip_tcp_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_ncacn_unix_stream_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:406:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  406 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_unix_stream_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                                       |
      |                                                                                       NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:406:3: note: in expansion of macro โ€˜DEBUGโ€™
  406 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_unix_stream_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:406:34: note: format string is defined here
  406 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncacn_unix_stream_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_ncalrpc_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:473:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  473 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncalrpc_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                             |
      |                                                                             NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:473:3: note: in expansion of macro โ€˜DEBUGโ€™
  473 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncalrpc_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:473:34: note: format string is defined here
  473 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_ncalrpc_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_b_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:790:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  790 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_b_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                       |
      |                                                                       NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:790:3: note: in expansion of macro โ€˜DEBUGโ€™
  790 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_b_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:790:34: note: format string is defined here
  790 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_b_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_pipe_connect_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:918:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
  918 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                     |
      |                                                                     NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:918:3: note: in expansion of macro โ€˜DEBUGโ€™
  918 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:918:34: note: format string is defined here
  918 |   DEBUG(0,("failed NT status (%08x) in dcerpc_pipe_connect_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
In file included from /opt/gvm/openvas-smb/samba/lib/util/util.h:39,
                 from /opt/gvm/openvas-smb/samba/include/includes.h:86,
                 from /opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:27:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c: In function โ€˜dcerpc_secondary_connection_recvโ€™:
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:1105:12: warning: format โ€˜%xโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 2 has type โ€˜NTSTATUSโ€™ {aka โ€˜struct <anonymous>โ€™} [-Wformat=]
 1105 |   DEBUG(0,("failed NT status (%08x) in dcerpc_secondary_connection_recv\n", status));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~
      |                                                                             |
      |                                                                             NTSTATUS {aka struct <anonymous>}
/opt/gvm/openvas-smb/samba/lib/util/debug.h:51:12: note: in definition of macro โ€˜_DEBUGโ€™
   51 |   do_debug body; \
      |            ^~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:1105:3: note: in expansion of macro โ€˜DEBUGโ€™
 1105 |   DEBUG(0,("failed NT status (%08x) in dcerpc_secondary_connection_recv\n", status));
      |   ^~~~~
/opt/gvm/openvas-smb/samba/librpc/rpc/dcerpc_connect.c:1105:34: note: format string is defined here
 1105 |   DEBUG(0,("failed NT status (%08x) in dcerpc_secondary_connection_recv\n", status));
      |                               ~~~^
      |                                  |
      |                                  unsigned int
[ 76%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_error.c.o
[ 76%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_schannel.c.o
[ 76%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_smb2.c.o
[ 77%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_smb.c.o
[ 77%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_sock.c.o
[ 77%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/dcerpc_util.c.o
[ 78%] Building C object samba/CMakeFiles/samba-static.dir/librpc/rpc/table.c.o
[ 78%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/connect.c.o
[ 78%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/connect_multi.c.o
[ 79%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/interface.c.o
[ 79%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/netif.c.o
[ 79%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/socket.c.o
[ 79%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/socket_ipv4.c.o
[ 80%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/socket_ipv6.c.o
[ 80%] Building C object samba/CMakeFiles/samba-static.dir/lib/socket/socket_unix.c.o
[ 80%] Building C object samba/CMakeFiles/samba-static.dir/lib/stream/packet.c.o
[ 81%] Building C object samba/CMakeFiles/samba-static.dir/lib/talloc/talloc.c.o
[ 81%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/error.c.o
[ 81%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/freelist.c.o
[ 82%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/io.c.o
In file included from /opt/gvm/openvas-smb/samba/lib/tdb/common/io.c:30:
/opt/gvm/openvas-smb/samba/lib/tdb/common/io.c: In function โ€˜tdb_readโ€™:
/opt/gvm/openvas-smb/samba/lib/tdb/common/io.c:127:34: warning: format โ€˜%dโ€™ expects argument of type โ€˜intโ€™, but argument 6 has type โ€˜ssize_tโ€™ {aka โ€˜long intโ€™} [-Wformat=]
  127 |    TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_read failed at %d len=%d ret=%d (%s) map_size=%d\n",
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128 |      off, len, ret, strerror(errno), (int)tdb->map_size));
      |                ~~~
      |                |
      |                ssize_t {aka long int}
/opt/gvm/openvas-smb/samba/lib/tdb/common/tdb_private.h:74:36: note: in definition of macro โ€˜TDB_LOGโ€™
   74 | #define TDB_LOG(x) tdb->log.log_fn x
      |                                    ^
/opt/gvm/openvas-smb/samba/lib/tdb/common/io.c:127:69: note: format string is defined here
  127 |    TDB_LOG((tdb, TDB_DEBUG_FATAL,"tdb_read failed at %d len=%d ret=%d (%s) map_size=%d\n",
      |                                                                    ~^
      |                                                                     |
      |                                                                     int
      |                                                                    %ld
[ 82%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/lock.c.o
[ 82%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/open.c.o
[ 82%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/tdb.c.o
[ 83%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/transaction.c.o
[ 83%] Building C object samba/CMakeFiles/samba-static.dir/lib/tdb/common/traverse.c.o
[ 83%] Building C object samba/CMakeFiles/samba-static.dir/lib/tls/tls.c.o
[ 84%] Building C object samba/CMakeFiles/samba-static.dir/lib/tls/tlscert.c.o
/opt/gvm/openvas-smb/samba/lib/tls/tlscert.c: In function โ€˜tls_cert_generateโ€™:
/opt/gvm/openvas-smb/samba/lib/tls/tlscert.c:42:2: warning: โ€˜gnutls_x509_crtโ€™ is deprecated [-Wdeprecated-declarations]
   42 |  gnutls_x509_crt cacrt, crt;
      |  ^~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/tls/tlscert.c:42:2: warning: โ€˜gnutls_x509_crtโ€™ is deprecated [-Wdeprecated-declarations]
/opt/gvm/openvas-smb/samba/lib/tls/tlscert.c:43:2: warning: โ€˜gnutls_x509_privkeyโ€™ is deprecated [-Wdeprecated-declarations]
   43 |  gnutls_x509_privkey key, cakey;
      |  ^~~~~~~~~~~~~~~~~~~
/opt/gvm/openvas-smb/samba/lib/tls/tlscert.c:43:2: warning: โ€˜gnutls_x509_privkeyโ€™ is deprecated [-Wdeprecated-declarations]
[ 84%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/data_blob.c.o
[ 84%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/debug.c.o
[ 85%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/fault.c.o
[ 85%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/genrand.c.o
[ 85%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/idtree.c.o
[ 85%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/module.c.o
[ 86%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/ms_fnmatch.c.o
[ 86%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/signal.c.o
[ 86%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/system.c.o
[ 87%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/time.c.o
[ 87%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/unix_privs.c.o
[ 87%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/util.c.o
[ 88%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/util_file.c.o
[ 88%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/util_str.c.o
[ 88%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/util_strlist.c.o
[ 88%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/util_tdb.c.o
/opt/gvm/openvas-smb/samba/lib/util/util_tdb.c: In function โ€˜tdb_unpackโ€™:
/opt/gvm/openvas-smb/samba/lib/util/util_tdb.c:485:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  485 |    *p = (void *)IVAL(buf, 0);
      |         ^
[ 89%] Building C object samba/CMakeFiles/samba-static.dir/lib/util/xfile.c.o
[ 89%] Building C object samba/CMakeFiles/samba-static.dir/nbt_server/wins/wins_ldb.c.o
[ 89%] Building C object samba/CMakeFiles/samba-static.dir/nsswitch/wb_common.c.o
[ 90%] Building C object samba/CMakeFiles/samba-static.dir/param/loadparm.c.o
[ 90%] Building C object samba/CMakeFiles/samba-static.dir/param/params.c.o
[ 90%] Building C object samba/CMakeFiles/samba-static.dir/param/secrets.c.o
[ 91%] Building C object samba/CMakeFiles/samba-static.dir/param/util.c.o
[ 91%] Building C object samba/CMakeFiles/samba-static.dir/dynconfig.c.o
[ 91%] Linking C static library libsamba-static.a
[ 91%] Built target samba-static
Scanning dependencies of target bin2c
[ 91%] Building C object winexe/CMakeFiles/bin2c.dir/bin2c.c.o
/opt/gvm/openvas-smb/winexe/bin2c.c: In function โ€˜mainโ€™:
/opt/gvm/openvas-smb/winexe/bin2c.c:24:33: warning: format โ€˜%uโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 3 has type โ€˜long intโ€™ [-Wformat=]
   24 |  printf("unsigned int %s_len = %u;\nunsigned char %s[] = {\n",
      |                                ~^
      |                                 |
      |                                 unsigned int
      |                                %lu
   25 |        base_fname, len, base_fname);
      |                    ~~~
      |                    |
      |                    long int
/opt/gvm/openvas-smb/winexe/bin2c.c:36:29: warning: format โ€˜%uโ€™ expects argument of type โ€˜unsigned intโ€™, but argument 4 has type โ€˜long intโ€™ [-Wformat=]
   36 |  fprintf(stderr, "%s_len = %u\n", argv[1], len);
      |                            ~^              ~~~
      |                             |              |
      |                             unsigned int   long int
      |                            %lu
[ 91%] Linking C executable bin2c
[ 91%] Built target bin2c
[ 92%] Generating winexesvc.exe
[ 92%] Generating winexesvc_exe.c
/opt/gvm/openvas-smb/winexe/winexesvc_exe_len = 305508
Scanning dependencies of target winexe
[ 92%] Building C object winexe/CMakeFiles/winexe.dir/winexe.c.o
[ 92%] Building C object winexe/CMakeFiles/winexe.dir/service.c.o
[ 93%] Building C object winexe/CMakeFiles/winexe.dir/async.c.o
[ 93%] Building C object winexe/CMakeFiles/winexe.dir/winexesvc_exe.c.o
[ 93%] Linking C executable winexe
/usr/bin/ld: cannot find -lunistring
/usr/bin/ld: cannot find -lunistring
collect2: error: ld returned 1 exit status
make[2]: *** [winexe/CMakeFiles/winexe.dir/build.make:140: winexe/winexe] Error 1
make[1]: *** [CMakeFiles/Makefile2:194: winexe/CMakeFiles/winexe.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
[  1%] Generating IDL tables
Scanning dependencies of target samba-static
[  1%] Generating IDL tables
[  2%] Building C object samba/CMakeFiles/samba-static.dir/librpc/gen_ndr/tables.c.o
[  2%] Linking C static library libsamba-static.a
[ 91%] Built target samba-static
[ 91%] Built target bin2c
[ 91%] Linking C executable winexe
/usr/bin/ld: cannot find -lunistring
/usr/bin/ld: cannot find -lunistring
collect2: error: ld returned 1 exit status
make[2]: *** [winexe/CMakeFiles/winexe.dir/build.make:140: winexe/winexe] Error 1
make[1]: *** [CMakeFiles/Makefile2:194: winexe/CMakeFiles/winexe.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Don't create unnecessary "Created OpenVAS Scanner"

It seems that the script is currently creating a second OpenVAS Scanner called "Created OpenVAS Scanner" besides the "OpenVAS Default" one here:

https://github.com/yu210148/gvm_install/blob/master/install_gvm.sh#L380

This is currently not necessary and is also causing issues for users choosing the "OpenVAS Default" and not the "Created OpenVAS Scanner". Instead you could update the ospd socket path to the required location with something like e.g. (AFAIK the uuid of the "OpenVAS Default" is always the same):

gvmd --modify-scanner=08b69003-5fc2-4037-a479-93b440211c73 --scanner-host=/opt/gvm/var/run/ospd.sock

See:

https://github.com/greenbone/gvmd/blob/gvmd-20.08/INSTALL.md#configure-the-default-ospd-scanner-socket-path

Error after start the scan

Thank you for title about GVM.
After instulled GVM 11 on ubuntu 20.04 and started scan I get the error message: "There is a pending feed update and the task ran with an outdated feed version". What is it and how I solve of this problem?
Thank you.

issue on scanning?

Hi
Currently installed GVM 21 on ubuntu 18.04
i checked that the databases are updated but it shows on the scan N/A any idas?
im testing the scan to a windows 7 which purposely has many vulnerabilities which should show on high

Thank you

image

image
image

EOL messages about gvm version

Seems the version of things that this script downloads when doing a version 21 install have reached end-of-life. At least according to the results report that I got during my last scan. Simply updating the version numbers to the latest causes build errors. The relevant lines seem to be those right after 148 in gvm_install.sh.

Service unavailable after boot

Hi guys,

This script worked fine, untill a few days ago. Now everytime after boot, when I try to verify the scanners, I get this error message:
Service unavailable.

When I rerun the install script, it works again, but this cost way to much time every time I boot up. Any toughts what it could be?

Install problem

Hi, I used your script to install openvas (GVM 11). It's helpful for me. But I have some problems after Installation.
It showed : The installation is done, but there may still be an update in progress.
Is that mean I install complete ? Then how do I operating GVM 11 after installation complete.
thanks!

Scanner fails after reboot

The install worked great... took a little over two hours. After I got it on and ran a test, I did a reboot of the machine. After the reboot, the scanner is not able to load and is giving me a Failure to verify scanner.

Could not connect to Scanner. Interrupting scan because GVM is exiting.

I used the script to install the GVM21 version on a Debian 10 OS.
I followed the instruction to wait for 24 hours after the installation to finish the update. I also restarted the VM and apply the Port Scanner changes on the Scan Config based on the other issues encountered.
When I did a test scan I encounter the errors:
Could not connect to Scanner.
Interrupting scan because GVM is exiting.
Screen Shot 2021-08-05 at 9 25 43 AM
This is also the result when I installed on a new Ubuntu 20.04 OS.
I also have a previous installation using the script on an Ubuntu 20.04 OS, and it works fine except that the References are not included on the .csv report. This is installed in a VirtualBox machine.
The other two that encountering this error are Debian 10 and Ubuntu 20.04 also that installed in a hypervisor. But that shouldn't affect right?

This is what I found on the gvmd.log.

md manage:WARNING:2021-08-05 02h14.17 UTC:1203: Could not connect to Scanner at /var/run/ospd/ospd.sock
md manage:WARNING:2021-08-05 02h14.17 UTC:1203: OSP start_scan da76cda6-494c-4cff-bac4-67617f30220a: Could not connect to Scanner
event task:MESSAGE:2021-08-05 02h14.17 UTC:1203: Status of task test scan (43e1b716-a4f4-4fd1-ae80-11b37efe3d6a) has changed to Done
event task:MESSAGE:2021-08-05 02h14.17 UTC:1203: Status of task test scan (43e1b716-a4f4-4fd1-ae80-11b37efe3d6a) has changed to Interrupted

What could be the solution for this?

GVMD_DATA not updating.

I'm getting "Too old (68 days) Please check the automatic synchronization of your system" for the the GVMD_DATA. I thought it was them not updating it but on a different install it's updating. Any ideas how I can update or troubleshoot this? Apologies I don't have more information for you. I'm kind of a noob with this product and am not sure where to look to troubleshoot.

Postgres setup fails during installation.

Hi, so installing v21 on Ubuntu 20.04 on GCP.

Seems the postgresql setup failed. I think this is because I'm using a low-spec e2-medium VM in GCP and with everything else going on in the script, the machine is bogged down at this point. Below are the logs showing the failures:

running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
    pg_ctlcluster 12 main start
Ver Cluster Port Status Owner    Data directory              Log file
12  main    5432 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
update-alternatives: using /usr/share/postgresql/12/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Setting up sysstat (12.2.0-2ubuntu0.1) ...
..........
Setting up postgresql-server-dev-12 (12.9-0ubuntu0.20.04.1) ...
Setting up postgresql-server-dev-all (214ubuntu0.1) ...
Processing triggers for systemd (245.4-4ubuntu3.16) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
createuser: error: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createdb: error: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable postgresql
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   137  100   137    0     0   2107      0 --:--:-- --:--:-- --:--:--  2107
100  291k    0  291k    0     0  2010k      0 --:--:-- --:--:-- --:--:-- 2010k
gvm-libs-21.4.4/
gvm-libs-21.4.4/.clang-format
gvm-libs-21.4.4/.codecov.yml
.........  

UUID=$(/opt/gvm/sbin/gvmd --get-scanners | grep Default | awk '{print $1}')
sleep 10
echo 
/opt/gvm/sbin/gvmd --modify-scanner=$UUID --scanner-host=/opt/gvm/var/run/ospd.sock
sleep 10
/opt/gvm/sbin/gvmd --verify-scanner=$UUID
/opt/gvm/sbin/gvmd --create-user gvmadmin --password=StrongPass
UUID=$(/opt/gvm/sbin/gvmd --get-users --verbose | grep admin | awk '{print $2}')
/opt/gvm/sbin/gvmd --modify-setting 78eceaec-3385-11ea-b237-28d24461215b --value $UUID

(gvmd:21293): md   main-CRITICAL **: 11:38:55.777: gvmd: g_option_context_parse: Missing argument for --value

FeedStatus 0T

Hello,

I have a problem with GVM after installing from your script.
Patient
Ubuntu 20.04
GVM 21

To be more precise,

After executing the script I had to manually create a user because I was not able to log on, After this operation FEED STATUS was everywhere seen as current but version is 0T

After performing some additional steps

gvmd --get-users --verbose
gvmd --modify-setting 78eceaec-3385-11ea-b237-28d24461215b --value <uuid_of_user>

and
runuser -u gvm -- greenbone-nvt-sync --rsync
sudo greenbone-scapdata-sync
sudo greenbone-certdata-sync
reboot

The situation has slightly improved

image

Do you have any idea how to fix FEED CERT and GVMD_DATA ?
Hello,

missing lines

Hi.

I think you are missing some commands/lines:
line 34 (after "systemctl restart postgresql"), missing "systemctl enable postgresql"
line 69 (in "openvas" section, after "cmake"), missing two lines:
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

Also, since this is a brand new install, I am not sure "touch .bashrc", then "mv .bashrc .bashrc.bak", execute, rm ".bashrc" then "mv .bashrc.bak .bashrc" steps are necessary, as ".bashrc" is surely empty.

Again, since this is a new install/creation, the "export PKG_CONFIG_PATH" don't need to include $PKG_CONFIG_PATH (as it's an empty string)

Just my 2p.

Thanks....

New GVM 21 install on Debian 10.11 has no scanner config

In trying to get this to work, I did a clean install of Debian 10.11, then ran suggested default installation:

apt install sudo
usermod -aG sudo # add your user to the sudoer's group
wget https://raw.githubusercontent.com/yu210148/gvm_install/master/install_gvm.sh
chmod +x install_gvm.sh
sudo -i
./install_gvm.sh

Install completed fine, feed updated fine and GUI works fine. When trying to start a new scan, there's no default scanner config available, and in place there's a random string (See below image link). When trying to add a new scanner config, exception is thrown with message that "said random string" could not be updated.

https://imgur.com/oVjfdt4

Which linux dist and version does this script work with out of the box? Ubuntu 20.04.3 with GVM 21 did not work either, reports are just empty, even after trying the suggested manual fix in regards to NMAP.

Installation Issue and Resolution

Not sure where the issue is, but I had to run the install process twice in order to be able to login to the service.

It then works and I have a sample scan running right now.

A few minor fixes

Going through this script now one line at a time. I found a few minor fixes I might recommend. I'll add them below and continue to edit this as I find them.

  1. The "greenbone-certdata-sync" script has the same NAT issue as the "greenbone-scrapdata-sync" script does. However, your script does not add the necessary sleep command for it. You'll want to insert a "sleep 300" at line #349 on "greenbone-certdata-sync".

  2. I think for the updates you'd be better off creating a small script with each of the four commands and sleep's in between each. While it's extremely unlikely to happen, it is possible with your script to end up with two of the download commands scheduled too close to one another.

Missing scan list and port list - possible solution

Hi, I installed GVM 20 on Ubuntu 20 using your script, but in my installation I noticed that 'scan configs' and 'port lists' were empty, and I was unable to start a scan task.
Searching in the logs and in this community thread https://community.greenbone.net/t/no-scan-list-no-port-lists-after-build-of-20-08/6360/9 I found a solution that is working for me:

mkdir -p /opt/gvm/var/lib/gvm/data-objects/gvmd
rsync -avrP rsync://feed.community.greenbone.net:/data-objects/gvmd/ /opt/gvm/var/lib/gvm/data-objects/gvmd/
chown -R gvm:gvm /opt/gvm/var/lib/gvm/
reboot

update GVM 20 in Ubuntu 20

Hi,

I have update GVM 20 install script for you reference.
The major change as below

  1. git clone source
  2. update greenbone-feed-sync for SCAP / CERT / GVMD_DATA (line 153 - 189)
  3. modify feed import owner for GVMD_DATA (line 236)

** GVM default install without scan config / port config / report template and must modify import owner via step 3.

the install_gmv.sh as below

#!/bin/bash
######################################################################
# Script to install Greenbone/OpenVAS on Ubuntu 20.04
#
# Note: run as root
#
# Usage: sudo ./install_gvm.sh
#
# Based on:
# https://kifarunix.com/install-and-setup-gvm-11-on-ubuntu-20-04/?amp
#
# Works-for-me as of 2020-05-12. Your experience may be different.
# Use at your own risk.
#
# Licensed under GPLv3 or later
######################################################################
apt-get update
apt-get upgrade
apt-get dist-upgrade
useradd -r -d /opt/gvm -c "GVM (OpenVAS) User" -s /bin/bash gvm
mkdir /opt/gvm
chown gvm:gvm /opt/gvm
apt-get -y install build-essential gcc g++ make bison flex libksba-dev curl redis libpcap-dev cmake git pkg-config libglib2.0-dev libgpgme-dev libgnutls28-dev uuid-dev libssh-gcrypt-dev libldap2-dev gnutls-bin libmicrohttpd-dev libhiredis-dev zlib1g-dev libxml2-dev libradcli-dev clang-format libldap2-dev doxygen nmap gcc-mingw-w64 xml-twig-tools libical-dev perl-base heimdal-dev libpopt-dev libsnmp-dev python3-setuptools python3-paramiko python3-lxml python3-defusedxml python3-dev gettext python3-polib xmltoman python3-pip texlive-fonts-recommended xsltproc texlive-latex-extra nodejs npm --no-install-recommends
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get -y install yarn
apt-get -y install postgresql postgresql-contrib postgresql-server-dev-all
sudo -Hiu postgres createuser gvm
sudo -Hiu postgres createdb -O gvm gvmd
sudo -Hiu postgres psql -c 'create role dba with superuser noinherit;' gvmd
sudo -Hiu postgres psql -c 'grant dba to gvm;' gvmd
sudo -Hiu postgres psql -c 'create extension "uuid-ossp";' gvmd
systemctl restart postgresql
systemctl enable postgresql
sed -i 's/\"$/\:\/opt\/gvm\/bin\:\/opt\/gvm\/sbin\:\/opt\/gvm\/\.local\/bin\"/g' /etc/environment
echo "/opt/gvm/lib" > /etc/ld.so.conf.d/gvm.conf
sudo -Hiu gvm mkdir /tmp/gvm-source
cd /tmp/gvm-source
sudo -Hiu gvm git clone -b gvm-libs-20.08 https://github.com/greenbone/gvm-libs.git
sudo -Hiu gvm git clone https://github.com/greenbone/openvas-smb.git
sudo -Hiu gvm git clone -b openvas-20.08 https://github.com/greenbone/openvas.git
sudo -Hiu gvm git clone -b ospd-20.08 https://github.com/greenbone/ospd.git
sudo -Hiu gvm git clone -b ospd-openvas-20.08 https://github.com/greenbone/ospd-openvas.git
sudo -Hiu gvm git clone -b gvmd-20.08 https://github.com/greenbone/gvmd.git
sudo -Hiu gvm git clone -b gsa-20.08 https://github.com/greenbone/gsa.git
sudo -Hiu gvm git clone https://github.com/greenbone/python-gvm.git
sudo -Hiu gvm git clone https://github.com/greenbone/gvm-tools.git
sudo -Hiu gvm cp --recursive /opt/gvm/* /tmp/gvm-source/
sudo -Hiu gvm touch /opt/gvm/.bashrc
sudo -Hiu gvm mv /opt/gvm/.bashrc /opt/gvm/.bashrc.bak # save original bashrc file 
sudo -Hiu gvm touch /opt/gvm/.bashrc
sudo -Hiu gvm echo "export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Build and Install GVM 11 Libraries
sudo -Hiu gvm echo "cd gvm-libs" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "mkdir build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Build and Install OpenVAS and OpenVAS SMB
sudo -Hiu gvm echo "cd ../../openvas-smb/" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "mkdir build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd ../../openvas" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "mkdir build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "sed -i 's/set (CMAKE_C_FLAGS_DEBUG\s.*\"\${CMAKE_C_FLAGS_DEBUG} \${COVERAGE_FLAGS}\")/set (CMAKE_C_FLAGS_DEBUG \"\${CMAKE_C_FLAGS_DEBUG} -Werror -Wno-error=deprecated-declarations\")/g' ../../openvas/CMakeLists.txt" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
# Leave gvm environment and clean up
sudo -Hiu gvm echo "exit" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
su gvm
sudo -Hiu gvm rm /opt/gvm/.bashrc
sudo -Hiu gvm mv /opt/gvm/.bashrc.bak /opt/gvm/.bashrc

# Configuring OpenVAS
ldconfig
cp /tmp/gvm-source/openvas/config/redis-openvas.conf /etc/redis/
chown redis:redis /etc/redis/redis-openvas.conf
echo "db_address = /run/redis-openvas/redis.sock" > /opt/gvm/etc/openvas/openvas.conf
chown gvm:gvm /opt/gvm/etc/openvas/openvas.conf
usermod -aG redis gvm
echo "net.core.somaxconn = 1024" >> /etc/sysctl.conf
echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf
sysctl -p
touch /etc/systemd/system/disable_thp.service
echo "[Unit]" > /etc/systemd/system/disable_thp.service
echo "Description=Disable Kernel Support for Transparent Huge Pages (THP)" >> /etc/systemd/system/disable_thp.service
echo -e "\n" >> /etc/systemd/system/disable_thp.service
echo "[Service]" >> /etc/systemd/system/disable_thp.service
echo "Type=simple" >> /etc/systemd/system/disable_thp.service
echo -e "ExecStart=/bin/sh -c \"echo 'never' > /sys/kernel/mm/transparent_hugepage/enabled && echo 'never' > /sys/kernel/mm/transparent_hugepage/defrag\"" >> /etc/systemd/system/disable_thp.service
echo -e "\n" >> /etc/systemd/system/disable_thp.service
echo "[Install]" >> /etc/systemd/system/disable_thp.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/disable_thp.service
systemctl daemon-reload
systemctl enable --now disable_thp
systemctl start redis-server@openvas
systemctl enable redis-server@openvas
echo "gvm ALL = NOPASSWD: /opt/gvm/sbin/openvas" > /etc/sudoers.d/gvm
sed 's/Defaults\s.*secure_path=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/snap\/bin\"/Defaults secure_path=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/snap\/bin:\/opt\/gvm\/sbin\"/g' /etc/sudoers | EDITOR='tee' visudo
echo "gvm ALL = NOPASSWD: /opt/gvm/sbin/gsad" >> /etc/sudoers.d/gvm

#Update OpenVAS NVTs
sudo -Hiu gvm touch /opt/gvm/.bashrc
sudo -Hiu gvm mv /opt/gvm/.bashrc /opt/gvm/.bashrc.bak # save original bashrc file 
sudo -Hiu gvm touch /opt/gvm/.bashrc

# This next command fails in get_community_feed function in greenbone-nvt-sync if the
# rsync calls are too close together as only one connection is allowed at a time. So we
# need to add a sleep command in that file to pause the sync so that the NAT connection can close
# file is in /opt/gvm/bin and the line to edit is 364. More info can be found by searching
# greenbone-nvt-sync rsync connection refused
#
# add in the following
#  # sleep to allow NAT connection to close                                                                                                                                                   
#  sleep 300
sudo -Hiu gvm echo "sed -i '364isleep 300' /opt/gvm/bin/greenbone-nvt-sync" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "Sleeping for 5 minutes" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "More info can be found by searching greenbone-nvt-sync rsync connection refused on Google" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "greenbone-nvt-sync" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc


sudo -Hiu gvm echo "sudo openvas --update-vt-info" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Build and Install Greenbone Vulnerability Manager
sudo -Hiu gvm echo "export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd /tmp/gvm-source/gvmd" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "mkdir build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Build and Install Greenbone Secuirty Assistant
sudo -Hiu gvm echo "cd ../../gsa" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "mkdir build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd build" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "make install" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Update GVM CERT and SCAP data from the feed servers
sudo -Hiu gvm echo "echo Sleeping 5 minutes" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "echo More info can be found by searching greenbone-nvt-sync rsync connection refused on Google" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "sleep 300" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc # allow a NAT connection to close
sudo -Hiu gvm echo "sed -i '368isleep 120' /opt/gvm/sbin/greenbone-feed-sync --type SCAP" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "echo Sleeping 2 minutes" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "echo More info can be found by searching greenbone-nvt-sync rsync connection refused on Google" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "greenbone-scapdata-sync" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "echo Sleeping 5 minutes" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "echo More info can be found by searching greenbone-nvt-sync rsync connection refused on Google" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "sleep 300" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc # allow a NAT connection to close
sudo -Hiu gvm echo "greenbone-certdata-sync" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
# Add sleep to future greenbone-certdata-sync calls (https://github.com/yu210148/gvm_install/issues/2 --Thanks kirk56k)
sudo -Hiu gvm echo "sed -i '349isleep 300' /opt/gvm/sbin/greenbone-feed-sync --type CERT" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "/opt/gvm/sbin/greenbone-feed-sync --type GVMD_DATA" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Set cron jobs to run once daily at random times
HOUR=$(shuf -i 0-23 -n 1)
MINUTE=$(shuf -i 0-59 -n 1)
sudo -Hiu gvm echo "(crontab -l 2>/dev/null; echo \"${MINUTE} ${HOUR} * * * /opt/gvm/sbin/greenbone-feed-sync --type SCAP\") | crontab -" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

HOUR=$(shuf -i 0-23 -n 1)
MINUTE=$(shuf -i 0-59 -n 1)
sudo -Hiu gvm echo "(crontab -l 2>/dev/null; echo \"${MINUTE} ${HOUR} * * * /opt/gvm/bin/greenbone-nvt-sync\") | crontab -" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

HOUR=$(shuf -i 0-23 -n 1)
MINUTE=$(shuf -i 0-59 -n 1)
sudo -Hiu gvm echo "(crontab -l 2>/dev/null; echo \"${MINUTE} ${HOUR} * * * /opt/gvm/sbin/greenbone-feed-sync --type CERT\") | crontab -" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

HOUR=$(shuf -i 0-23 -n 1)
MINUTE=$(shuf -i 0-59 -n 1)
sudo -Hiu gvm echo "(crontab -l 2>/dev/null; echo \"${MINUTE} ${HOUR} * * * /opt/gvm/sbin/greenbone-feed-sync --type GVMD_DATA\") | crontab -" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# I know this is kludgy as this should be run after the nvt sync but if it gets 
# run once a day that should do
HOUR=$(shuf -i 0-23 -n 1)
MINUTE=$(shuf -i 0-59 -n 1)
sudo -Hiu gvm echo "(crontab -l 2>/dev/null; echo \"${MINUTE} ${HOUR} * * * /usr/bin/sudo /opt/gvm/sbin/openvas --update-vt-info\") | crontab -" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Configure certs
sudo -Hiu gvm echo "gvm-manage-certs -a" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Build and Install OSPd and OSPd-OpenVAS

sudo -Hiu gvm echo "export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

sudo -Hiu gvm echo "mkdir -p /opt/gvm/lib/python3.8/site-packages/" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "export PYTHONPATH=/opt/gvm/lib/python3.8/site-packages" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "cd /tmp/gvm-source/ospd" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc 
sudo -Hiu gvm echo "python3 setup.py install --prefix=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

sudo -Hiu gvm echo "cd ../ospd-openvas" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo "python3 setup.py install --prefix=/opt/gvm" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Start OpenVAS Scanner, GSA and GVM services
# Start OpenVAS
sudo -Hiu gvm echo "/usr/bin/python3 /opt/gvm/bin/ospd-openvas --pid-file /opt/gvm/var/run/ospd-openvas.pid --log-file /opt/gvm/var/log/gvm/ospd-openvas.log --lock-file-dir /opt/gvm/var/run -u /opt/gvm/var/run/ospd.sock" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
# Start GVM
sudo -Hiu gvm echo "gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
# Start GSA
sudo -Hiu gvm echo "sudo gsad" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Check the status
#sudo -Hiu gvm echo "ps aux | grep -E \"ospd-openvas|gsad|gvmd\" | grep -v grep" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Wait a moment for the above to start up
sudo -Hiu gvm echo "sleep 10" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Create GVM Scanner
sudo -Hiu gvm echo -e "gvmd --create-scanner=\"Created OpenVAS Scanner\" --scanner-type=\"OpenVAS\" --scanner-host=/opt/gvm/var/run/ospd.sock" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

sudo -Hiu gvm echo "gvmd --get-scanners" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Verify newly created scanner
sudo -Hiu gvm echo -e "UUID=\$(gvmd --get-scanners | grep Created | awk '{print \$\1}')" | sed 's/\\//g' | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Wait a moment then verify the scanner
sudo -Hiu gvm echo "sleep 10" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
sudo -Hiu gvm echo -e "gvmd --verify-scanner=UUID" | sed 's/UUID/\$UUID/g' | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Create OpenVAS (GVM 11) Admin
sudo -Hiu gvm echo -e "gvmd --create-user gvmadmin --password=StrongPass" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Update feed sync GVMD_Data enable
sudo -Hiu gvm echo -e "gvmd --get-users --verbose | cut -d " " -f 2 | xargs gvmd --modify-setting 78eceaec-3385-11ea-b237-28d24461215b --value " | sudo -Hiu gvm tee -a /opt/gvm/.bashrc

# Leave gvm environment and clean up
sudo -Hiu gvm echo "exit" | sudo -Hiu gvm tee -a /opt/gvm/.bashrc
su gvm
# Debugging
#sudo -Hiu gvm mv /opt/gvm/.bashrc /opt/gvm/just-ran-bashrc.txt
sudo -Hiu gvm rm /opt/gvm/.bashrc
sudo -Hiu gvm mv /opt/gvm/.bashrc.bak /opt/gvm/.bashrc

# Set firewall to allow access on port 443 and 22
ufw allow 443
ufw allow 22
ufw --force enable

# Create systemd services for OpenVAS Scanner, GSA, and GVM services
echo "[Unit]" > /etc/systemd/system/openvas.service
echo "Description=Control the OpenVAS service" >> /etc/systemd/system/openvas.service
echo "After=redis.service" >> /etc/systemd/system/openvas.service
echo "After=postgresql.service" >> /etc/systemd/system/openvas.service
echo -e "\n" >> /etc/systemd/system/openvas.service
echo "[Service]" >> /etc/systemd/system/openvas.service
echo "ExecStartPre=-rm /opt/gvm/var/run/ospd-openvas.pid /opt/gvm/var/run/ospd.sock /opt/gvm/var/run/gvmd.sock" >> /etc/systemd/system/openvas.service
echo "Type=simple" >> /etc/systemd/system/openvas.service
echo "User=gvm" >> /etc/systemd/system/openvas.service
echo "Group=gvm" >> /etc/systemd/system/openvas.service
echo "Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/gvm/bin:/opt/gvm/sbin:/opt/gvm/.local/bin" >> /etc/systemd/system/openvas.service
echo "Environment=PYTHONPATH=/opt/gvm/lib/python3.8/site-packages" >> /etc/systemd/system/openvas.service
echo -e "ExecStart=/usr/bin/python3 /opt/gvm/bin/ospd-openvas --pid-file /opt/gvm/var/run/ospd-openvas.pid --log-file /opt/gvm/var/log/gvm/ospd-openvas.log --lock-file-dir /opt/gvm/var/run -u /opt/gvm/var/run/ospd.sock" >> /etc/systemd/system/openvas.service
echo "RemainAfterExit=yes" >> /etc/systemd/system/openvas.service
echo -e "\n" >> /etc/systemd/system/openvas.service
echo "[Install]" >> /etc/systemd/system/openvas.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/openvas.service

echo "[Unit]" > /etc/systemd/system/gvm.service
echo "Description=Control the OpenVAS GVM service" >> /etc/systemd/system/gvm.service
echo "After=openvas.service" >> /etc/systemd/system/gvm.service
echo -e "\n" >> /etc/systemd/system/gvm.service
echo "[Service]" >> /etc/systemd/system/gvm.service
echo "Type=simple" >> /etc/systemd/system/gvm.service
echo "User=gvm" >> /etc/systemd/system/gvm.service
echo "Group=gvm" >> /etc/systemd/system/gvm.service
echo "Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/gvm/bin:/opt/gvm/sbin:/opt/gvm/.local/bin" >> /etc/systemd/system/gvm.service
echo "Environment=PYTHONPATH=/opt/gvm/lib/python3.8/site-packages" >> /etc/systemd/system/gvm.service
echo -e "ExecStart=/opt/gvm/sbin/gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock" >> /etc/systemd/system/gvm.service
echo "RemainAfterExit=yes" >> /etc/systemd/system/gvm.service
echo -e "\n" >> /etc/systemd/system/gvm.service
echo "[Install]" >> /etc/systemd/system/gvm.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/gvm.service

echo "[Unit]" > /etc/systemd/system/gvm.path
echo "Description=Start the OpenVAS GVM service when opsd.sock is available" >> /etc/systemd/system/gvm.path
echo -e "\n" >> /etc/systemd/system/gvm.path
echo "[Path]" >> /etc/systemd/system/gvm.path
echo "PathChanged=/opt/gvm/var/run/ospd.sock" >> /etc/systemd/system/gvm.path
echo "Unit=gvm.service" >> /etc/systemd/system/gvm.path
echo -e "\n" >> /etc/systemd/system/gvm.path
echo "[Install]" >> /etc/systemd/system/gvm.path
echo "WantedBy=multi-user.target" >> /etc/systemd/system/gvm.path

echo "[Unit]" > /etc/systemd/system/gsa.service
echo "Description=Control the OpenVAS GSA service" >> /etc/systemd/system/gsa.service
echo "After=openvas.service" >> /etc/systemd/system/gsa.service
echo -e "\n" >> /etc/systemd/system/gsa.service
echo "[Service]" >> /etc/systemd/system/gsa.service
echo "Type=simple" >> /etc/systemd/system/gsa.service
echo "User=gvm" >> /etc/systemd/system/gsa.service
echo "Group=gvm" >> /etc/systemd/system/gsa.service
echo "Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/gvm/bin:/opt/gvm/sbin:/opt/gvm/.local/bin" >> /etc/systemd/system/gsa.service
echo "Environment=PYTHONPATH=/opt/gvm/lib/python3.8/site-packages" >> /etc/systemd/system/gsa.service
echo -e "ExecStart=/usr/bin/sudo /opt/gvm/sbin/gsad" >> /etc/systemd/system/gsa.service
echo "RemainAfterExit=yes" >> /etc/systemd/system/gsa.service
echo -e "\n" >> /etc/systemd/system/gsa.service
echo "[Install]" >> /etc/systemd/system/gsa.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/gsa.service

echo "[Unit]" > /etc/systemd/system/gsa.path
echo "Description=Start the OpenVAS GSA service when gvmd.sock is available" >> /etc/systemd/system/gsa.path
echo -e "\n" >> /etc/systemd/system/gsa.path
echo "[Path]" >> /etc/systemd/system/gsa.path
echo "PathChanged=/opt/gvm/var/run/gvmd.sock" >> /etc/systemd/system/gsa.path
echo "Unit=gsa.service" >> /etc/systemd/system/gsa.path
echo -e "\n" >> /etc/systemd/system/gsa.path
echo "[Install]" >> /etc/systemd/system/gsa.path
echo "WantedBy=multi-user.target" >> /etc/systemd/system/gsa.path


systemctl daemon-reload
systemctl enable --now openvas
systemctl enable --now gvm.{path,service}
systemctl enable --now gsa.{path,service}


# REMIND USER TO CHANGE DEFAULT PASSWORD
echo "Username is gvmadmin and pasword is StrongPass"
echo "Remember to change this default password"
echo "sudo -Hiu gvm gvmd --user=gvmadmin --new-password=<PASSWORD>"

Performance reports

Hi,

Everything seems to work. I can perform security scans like I used too. But one thing that doesn't work (like in the VM provided by Greenbone) is performance reports. They are empty... Why?
image

Thanks in advance for any help.

Not being able to login?

Hi,

I can't seem to get a login to work with this script. I've tried the waiting, cron job, restarting of the system. Sadly, nothing works and i keep getting a "Login Failed. Invalid password or username." message on the web UI. Any idea why this would be the case? Using ubuntu 20.04 and version 20 for gvm. Tried reinstalling and reconfiguring the machine, but nothing seems to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.