Default passwords change in docker image without having dockercompose.yml

Hello , I’m trying to change default password of elasticsearch and kibana
for instance admin:admin or kibanaserver:kibanaserver

i took the image of container from Docker Hub
and i didn’t write any docker compose.yml file. i just run the container without .yml file

internal_user.yml , i changed default password from here with new hash but i when i restart to container it’s not changing i tried many times but still i get same default password

i follow this page Docker Security Configuration - Open Distro Documentation

can someone please help me to figure it out this issue?
Thanks a lot


I had the exact same issue. Be sure you didn’t use a mounted volume when you first ran the container as data will be persisted after restart. The security plugin creates a new index in elasticsearch (.opendistro_security). Once you restart this won’t actually be changed as it’s already populated. You can exec into the container and force the service to recreate the index. navigate to:
- /usr/share/elasticsearch/plugins/opendistro_security/tools
And run:
./ -cd …/securityconfig/ -icl -nhnv -cacert …/…/…/config/root-ca.pem -cert …/…/…/config/kirk.pem -key …/…/…/config/kirk-key.pem

1 Like