mikesplain / openvas-docker

A Docker container for Openvas
MIT License
762 stars 302 forks source link

setting password via environment variable does not work #182

Closed hacker-h closed 5 years ago

hacker-h commented 6 years ago

Using the given example run command to set the admin password via environmental variable fails: docker run -d -p 443:443 -e OV_PASSWORD=securepassword41 --name openvas mikesplain/openvas

Apparently the variable OV_PASSWORD is not read successfully, there might be a bug in the file "start".

eidexe commented 6 years ago

Same problem here. After the container is created the defined password via OV_PASSWORD is not valid if one tries to login in the web interface. Tested with docker on macOS.

yippeykeiyay commented 6 years ago

Yep, same issue here.

Sopamo commented 6 years ago

Until the issue is fixed you can set the password manually by executing

openvasmd --user=admin --new-password=your_secure_password

yippeykeiyay commented 6 years ago

@Sopamo thank you!

fabionitto commented 6 years ago

Actually, the password on OV_PASSWORD is set only if the variable SETUPUSER is set. So setting SETUPUSER=true should do it. Only watch out because it takes a while for openvasmd to set the password, since its done only after NVT rebuild process, which takes a while.

On a side note to dev: could admin password be set from OV_PASSWORD variable, before NVT rebuilding?

BadFlo commented 6 years ago

Still same issue. in start file, "IF" should be modified to allow password change after first start of container.

fredairic[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

fredairic[bot] commented 5 years ago

This issue has been automatically closed because it has not had recent activity. Issue creator may reopen if the issue still exists. Thank you for your contributions.

hacker-h commented 5 years ago

the issue is still present

hacker-h commented 5 years ago

/reopen

hacker-h commented 5 years ago

/open

hacker-h commented 5 years ago

/help