<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>I had to recreate <code>internal_users.yml</code> file with the updated password hashes and mounted the file in <code>/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/internal_users.yml</code> directory for database pods.</p>

<p>So, when the Elasticsearch nodes bootstrapped, it bootstrapped with the updated password for default users ( i.e. <code>admin</code> ).</p>

<p>I used <a href="https://godoc.org/golang.org/x/crypto/bcrypt" rel="nofollow noreferrer">bcrypt go package</a> to generate password hash.</p>
