<p>I'm new to open distro for elasticsearch and trying to run it on the Kubernetes cluster. After deploying the cluster, I need to change the password for <code>admin</code> user.</p>

<p>I went through this post - <a href="https://discuss.opendistrocommunity.dev/t/default-password-reset/102" rel="nofollow noreferrer">default-password-reset</a></p>

<p>I came to know that, to change the password I need to do the following steps:</p>

<ul>
<li><code>exec</code> in one of the master nodes</li>
<li>generate a hash for the new password using <code>/usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh</code> script</li>
<li>update <code>/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/internal_users.yml</code> with the new hash</li>
<li>run <code>/usr/share/elasticsearch/plugins/opendistro_security/tools/securityadmin.sh</code> with parameters </li>
</ul>

<p>Questions:</p>

<ul>
<li>Is there any way to set those (via <code>env</code> or <code>elasticsearch.yml</code>) during bootstrapping the cluster?</li>
</ul>

Kamol Hasan
<p>docker exec -ti ELASTIC_MASTER bash</p>
<p>/usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh</p>
<p>##enter pass</p>
<p>yum install nano</p>
<p>#replace generated hash with new one
nano /usr/share/elasticsearch/plugins/opendistro_security/securityconfig/internal_users.yml</p>
<p>#exec this command to take place
sh /usr/share/elasticsearch/plugins/opendistro_security/tools/securityadmin.sh -cd /usr/share/elasticsearch/plugins/opendistro_security/securityconfig/ -icl -nhnv -cacert config/root-ca.pem  -cert config/admin.pem -key config/admin-key.pem</p>
