Greenbone Security Assistant change passwd & update

In the previously published articles Greenbone Security Assistant on Ubuntu Server and Greenbone Security Assistant: Setting up your first Target I showed how to set up the server and how to scan your first target but it was not mentioned anywhere how to change the “admin” password and the update commands for the scan data was not quiet correct. Here is a quick and dirty update on that.

Greenbone Security Assistant
Greenbone Security Assistant

Greenbone Security Assistant: Change Admin password

Nowhere in the interface is an option to change the build in Admin users password and this was quiet frustrating for me because I need to have this system up on the internet in order to run scheduled scans. So due to this issue I ended up shutting down this system when I finished my scans and downloaded the reports, until now. You can change the build in Admin users password with the following command:

export $(sudo cat /etc/default/gvmd-pg)
sudo -E -u gvm -g gvm
gvmd – -user=admin – -new-password=’your new password here’

after you issue the command run the following command:

tail /var/log/gvm/gvmd.log

you should see something similar like the following:

md main:MESSAGE:2021-03-04 21h30.13 utc:47040: Greenbone Vulnerability Manager version 20.08.1 (DB revision 233)
md manage: INFO:2021-03-04 21h30.13 utc:47040: Modifying user password.

Go ahead and try to login with your changed password.

Greenbone Security Assistant: updating Data

In the previous article I mentioned how to do the updates but I found another instruction set that actually corrected me on doing it the proper way which is the following. Execute those commands below:

sudo -u gvm -g gvm greenbone-nvt-sync
sudo -u gvm -g gvm greenbone-feed-sync – -type CERT
sudo -u gvm -g gvm greenbone-feed-sync – -type SCAP
sudo -u gvm -g gvm greenbone-feed-sync – -type GVMD_DATA

To remove NVT db, and rebuild it from the scanner:

export $(sudo cat /etc/default/gvmd-pg)
sudo -E -u gvm -g gvm gvmd – -rebuild

If you run those commands be patient they will take quiet some time to run. I also recommend to run those commands on a regular basis to sty up2date with available scan and vulnerability data.

Conclusion

Well my friends, this concludes this quick and dirty article and my sincere apologies to have not included this information in the previous articles. If you liked this article and found it useful please leave a comment and suggest future article ideas. If you like to read more about Greenbone Security Assistant read here.

Ciao!