How to update admin password in internal_user.yml file without losing the existing users

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

Opensearch Version : 2.3.0

Describe the issue:
I’m currently using opensearch 2.3.0 and trying to upgrade from 2.3.0 to latest 2.8.0

This upgrade currently performed in test environment.

Cluster details

3 - data nodes, 1 - master node, 1 - dashboard

I have upgraded all 3 data nodes from 2.3.0 to 2.8.0 and master node

Issue : After upgrading master node I have been try to generate a password for admin user.

  • Get the hashkey of desired password after running hash.sh.
  • replace the hash key in internal_user.yml file
  • Run security admin script for internal_user file.

This updates the admin password ( reserved user ) and all the existing user will be lost.

Can you please help me on how to go forward and update admin password without affecting the existing user.
or
How do I keep the same password and proceed the upgrade

is this the correct way to upgrade, please help me on this.

Thank you

Relevant Logs or Screenshots:

1 Like

I think securityadmin.sh has the option of exporting the current configs and users etc. I would do that, then modify the admin password in those files and use those configs with users to run security admin again.

1 Like

@raj1209 Please find the procedure described by @jasonrojas in OpenSearch documentation.

3 Likes

That worked !!!, Thank you guys @jasonrojas @pablo

@pablo @jasonrojas

Could you please help in resetting admin password

Process that I tried .

  1. modified values.yaml for helm chart of opensearch
  2. generated password using hash.sh and then updated the internal_user.yml and ran securityadmin.sh -like this -sh securityadmin.sh -cd …/…/…/config/opensearch-security/ -ilc -nhnv -cacert /usr/share/opensearch/config/root-ca.pem -cert /usr/share/opensearch/config/kirk.pem -key /usr/share/opensearch/config/kirk-key.pem
  3. tried using openserach-dashboard as well but getting " resource admin is read-only"

Please help me in fixing this issue . I am doing using helm chart