immauss / openvas

Containers for running the Greenbone Vulnerability Manager. Run as a single container with all services or separate single applications containers via docker-compose.
GNU Affero General Public License v3.0
367 stars 102 forks source link

Error in the script does not change the password #284

Closed netbix closed 4 months ago

netbix commented 5 months ago

https://github.com/immauss/openvas/blob/f4f9cdb9390b42e3a5aa5138604f7d7ce50a2e0a/scripts/single.sh#L335

the correct code is:

https://github.com/netbix/openvas/blob/01925529f5db1d8037cade4e9a643eba660615e1/scripts/single.sh#L335

immauss commented 5 months ago

@netbix

Thanks for the input, but I'm trying to understand this . . . . .

Can you give me some context here? That has worked for quite some time now. Are you certain using double quotes works with special characters? Did the single quotes not work with something?

Please elaborate.

Thanks, -Scott

netbix commented 5 months ago

and this is correct ?

https://github.com/netbix/openvas/blob/01925529f5db1d8037cade4e9a643eba660615e1/scripts/single.sh#L342

netbix commented 5 months ago

or this ?

https://github.com/netbix/openvas/blob/01925529f5db1d8037cade4e9a643eba660615e1/scripts/single.sh#L352

immauss commented 5 months ago

Ah ... consitency ....

Testing shows that both methods actually work, even with special characters.

Did you actually have a failure with it? Can you give me more detail on the failure?

For consitency, I'm going to switch to the double quote, mainly because it's easier to read for me.

Thanks, -Scott

immauss commented 5 months ago

Could you please share the full command you are using to start the container?

Thank you, -Scott

netbix commented 5 months ago

Thank you

netbix commented 5 months ago

this is my compose:

version: "3" services: openvas: ports:

Now everything seems to be working fine. Have you noticed problems on VMs with only 2 processors? It doesn't start.

netbix commented 5 months ago

at this point it remains in a loop..

openvas | Checking DB Version openvas | Current GVMd database version is 255 openvas | Migrate the database if needed. openvas | Starting Greenbone Vulnerability Manager... openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd

this with two HP microserver PCs with dualcore processors

immauss commented 5 months ago

Unfortunately, I’m traveling now and not able to do much testing. I suspect the issues is with the ! In the password. It either needs to be escaped, or quote the whole password in single quotes in the compose file. However, it is generally bad to have the password set via compose file or via command line as this exposes the password. The recommendation is to use admin:admin and then set the password via the web GUI. On Jun 28, 2024 at 12:21 +0200, Antonio @.***>, wrote:

at this point it remains in a loop.. openvas | Checking DB Version openvas | Current GVMd database version is 255 openvas | Migrate the database if needed. openvas | Starting Greenbone Vulnerability Manager... openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd openvas | Waiting for gvmd this with two HP microserver PCs with dualcore processors — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

immauss commented 4 months ago

I think you may have also been hitting the feed sync bug from #283, which I hope is resolved now.

-Scott

immauss commented 4 months ago

AH! And you're using a local directory instead of docker volume. Try using a docker volume. The permissions that get set on some of the files will fail on a local directory.

-Scott