rspamd / rspamd-docker

Rspamd as Docker image
10 stars 5 forks source link

Default password for controller and web interface #27

Closed luvk1412 closed 10 months ago

luvk1412 commented 10 months ago

On my local after running

docker compose up

When i go to http://localhost:11334/ I am treated with a dialog box asking for a password. I am not able to find any default value of password either in docker files or any config files. I also tried creating a worker-controller.inc file as per documentation in

config/rspamd/local.d

which then gets copied to

/etc/rspamd/local.d

in docker container

my worker-controller.inc

worker {
    type = "controller";
    password = "qwerty";
}

but this also didn't work

What is the default password and how can it be changed

fatalbanana commented 10 months ago

The password is the true default, which is not allowed to be actually-used, so it must be set.

The password setting shouldn't be wrapped in worker, it should otherwise work.

$ docker run -v rspamd_dbdir:/var/lib/rspamd -v rspamd_confdir:/etc/rspamd -d -P rspamd/rspamd
d637f93f22f886b66711501cad76544b4b8e5176139003741631561b0a3d7eb1
$ docker exec -ti -u root d637f93f22f8 bash -c 'echo password=\"`rspamadm pw -q -p PASSWORD`\" > /etc/rspamd/local.d/worker-controller.inc'
$ docker exec -ti -u root d637f93f22f8 bash -c "kill -HUP 1"

Above we've set password to PASSWORD ; using rspamadm configwizard would have been easier but there is some issue about that; we are using hashed password but it's not necessary for it to work

luvk1412 commented 10 months ago

thanks moving password out worked @fatalbanana