Is it needed to create a gmp username and password to use gvm-cli?

Hello everyone. I was able to install GVM using a shell script with everything needed on my end. My role that I use for GVM is to use Greenbone’s services to do internal scans by using the CLI with tool gvm-cli. A command I wanted to test out would be creating a target however I receive an error:

gvm-cli socket --socketpath $GVM_INSTALL_PREFIX/var/run/gvmd.sock --xml "<create_target><name>Suspect Host</name><hosts>1.1.1.1</hosts></create_target>"
Response Error 400. Only command GET_VERSION is allowed before AUTHENTICATE

Is it possible to not need to use a gmp username and password? Is it possible to do these tasks with the ospd.sock?

My environment uses Ubuntu 20.04, and the libraries I have installed are as follows:
gvm_libs: 21.04
gvmd: 21.04
openvas_scanner: 21.04
ospd: 21.04
ospd_openvas: 21.04

I want to make my Greenbone architecture as minimalistic as possible only requiring what is needed to do a scan and export a PDF file. Thanks for looking on this question.

Was able to resolve the issue on my side. Sorry for the dumb question. I just added the username and password from gvm login to gmp. Thanks for all the help everyone!

2 Likes