How to Change Admin Password in Docker-Run OpenSearch v2.12.0?

I’m running OpenSearch v2.12.0 in Docker and need to update the admin password for security reasons. Could anyone guide me through the step-by-step process to safely change the admin password, ensuring the system’s security and functionality remain intact? Any best practices or tips specific to Docker environments would be greatly appreciated.

Hi @sasan,
you can connect to your docker using docker exec -it -u 0 <ContainerName> bash or use your Docker Exec.

After that you can change your passwords in internal_users.yml please see here: YAML files - OpenSearch documentation

To apply changes see here: Apply changes with securityadmin.sh - OpenSearch documentation

NOTE: make sure to backup your config files before and after applying changes as all changes will be overridden according to the config files.

Best,
mj