**On behalf of a user of Slack **
Unable to change admin user password while deploying the opensearch cluster itself. Am using opster opensearch-operator:2.3.1 and opensearch: 2.8.0 version.Created two secrets for adminCredentialsSecret and securityConfigSecret(with all yamls and updated admin hash). Same has been mentioned in cluster yaml file with tls.generate and http.generate as trueAfter deploying the yamls
- bootstrap pod is running and logs are “[2023-07-06T19:08:15,476][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [my-second-cluster-bootstrap-0] Failure no such index [.opendistro_security] retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro_security) [2023-07-06T19:08:16,855][ERROR][o.o.s.a.BackendRegistry ] [my-second-cluster-bootstrap-0] Not yet initialized (you may need to run securityadmin)”
- securityconfig-update pod is running and waiting for cluster availability
- cluster pods are in 0/1 state - Logs: Authentication finally failed for admin"
Please share your values.yml file.
Could you describe the admin’s password change workflow?
Please find the cluster.yaml file.
- component: masters
description: "Demo admin user"
@rmssath I missed the part about the Opster operator. Let me do some testing and I’ll come back with the findings.
@rmssath It took me a while to get this Opster running.
I’ve tested the shared yaml file in my k8s cluster with Opster 2.3.1 and the OpenSearch object was created, but none of the related pods were.
I’ve noticed that one of your secrets was created in the namespace
opensearch instead of
Once I’ve fixed that the pods were created and started. Also, the admin’s password defined in the secret has been applied to OpenSearch’s configuration.
@rmssath I’ve found another problem with this secret. For some reason Opster doesn’t like it. It fails to manage the OS cluster once is deployed with this secret through the command line (kubectl create -f …).
Also, Opster console fails to create the OS cluster when I select this secret as a custom security config.
Instead of using the file content in the secret definition, I’ve used a oneliner with --from-file option.
kubectl create secret generic a-securityconfig-secret --from-file=./internal_users.yml --from-file=./action_groups.yml -n opensearch-2
Hi @pablo ,
Thanks for your reply.
I dont see any difference in creating the secret by mentioned 2 ways.
Now am able to login with new admin credentials.
But if i do any changes in kind: OpenSearchCluster yaml file. Kubectl apply is working fine. But the operator is throwing Reconcile error “invalid character A~”. So opensearch pods are not getting restarted after the change.
I am unable to change admin password . I tried this way . Could you please help
I have used this GitHub repo -GitHub - opensearch-project/helm-charts: ☸ A community repository for Helm Charts of OpenSearch Project.
I update values.yaml file of folder of charts/opensearch
# The following option simplifies securityConfig by using a single secret and
# specifying the config files as keys in the secret instead of creating
# different secrets for for each config file.
# Note that this is an alternative to the individual secret configuration
# above and shouldn't be used if the above secrets are used.
# There are multiple ways to define the configuration here:
# * If you define anything under data, the chart will automatically create
# a secret and mount it. This is best option to choose if you want to override all the
# existing yml files at once.
# * If you define securityConfigSecret, the chart will assume this secret is
# created externally and mount it. This is best option to choose if your intention is to
# only update a single yml file.
# * It is an error to define both data and securityConfigSecret.
description: "Demo admin user"
description: "Demo OpenSearch Dashboards user"
This is not working and still i am able to login using admin:admin
A big Thanks from my side , if you can help me in this
@Ashutosh Once you’ll deploy OpenSearch with helm charts the only ways to update admin user is either with OpenSearch Dashboards or using securityadmin.sh script.
The initial issue regards OpenSearch deployment with Opster.
I have tried changing password from dashboard but still getting this error
"Failed to reset password . Resource admin is read-only " . I tried api ways as well to change but still got the same error . Also tried this to manually updating securityadmin.sh script it but still no success .
Do you have any idea on this how to fit it ?
did you get the way to change Admin password for opensearch?
@vilasvsontakke Have you tried updating with securityadmin.sh?