# Default passwords change in docker image without having dockercompose.yml

**URL:** <https://forum.opensearch.org/t/default-passwords-change-in-docker-image-without-having-dockercompose-yml/359>\
**Category:** Security\
**Created:** [April 5, 2019, 10:04pm UTC](https://forum.opensearch.org/t/default-passwords-change-in-docker-image-without-having-dockercompose-yml/359 "2019-04-05T22:04:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceyhun2014](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@ceyhun2014](https://forum.opensearch.org/u/ceyhun2014)\
**Post date:** [April 5, 2019, 10:04pm UTC](https://forum.opensearch.org/t/default-passwords-change-in-docker-image-without-having-dockercompose-yml/359/1 "2019-04-05T22:04:56Z")

</div>

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](https://hub.docker.com/r/amazon/opendistro-for-elasticsearch)  
and i didn’t write any docker compose.yml file. i just run the container without .yml file

in  
/usr/share/elasticsearch/plugins/opendistro\_security/securityconfig  
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](https://opendistro.github.io/for-elasticsearch-docs/docs/install/docker-security/)

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

---

<div class="post-metadata">

**Author:** ![krisantrobus](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/krisantrobus/32/128_2.png) [@krisantrobus](https://forum.opensearch.org/u/krisantrobus)\
**Post date:** [April 16, 2019, 2:46pm UTC](https://forum.opensearch.org/t/default-passwords-change-in-docker-image-without-having-dockercompose-yml/359/2 "2019-04-16T14:46:01Z")

</div>

Hi,

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:  
./securityadmin.sh -cd …/securityconfig/ -icl -nhnv -cacert …/…/…/config/root-ca.pem -cert …/…/…/config/kirk.pem -key …/…/…/config/kirk-key.pem
