Trouble logging into Opensearch Dashboards for the first time with Default Credentials

I switched from Elasticsearch to Opensearch yesterday to support Graylog. I was curious about Dashboards so I installed opensource-dashboards 1.3 via yum repo. I modified the yml file and started it up. I get the login page, but the default first login found here doesn’t work. Is there a new default password that hasn’t been updated in the documentation, or is there a way to set the default login through the yml file?

Thanks in advance.
Danny

Hey there,

Are you running opensearch as a service or through docker?
I couldn’t use default password either so I recommend you generate new password through:

chmod +x /<<path-to-opensearch>>/opensearch/plugins/opensearch-security/tools/hash.sh
/<<path-to-opensearch>>/opensearch/plugins/opensearch-security/tools/hash.sh -p <<your new password>>

Place it in internal users for admin user:

/<<path-to-opensearch>>/opensearch/config/opensearch-security/internal_users.yml
admin:
  hash: "<<your password's hash goes here>>"
  reserved: true
  backend_roles:
  - "admin"

Hope this helps,
Tag me in any case,
Yours,
Sam

I’m running both opensearch and opensearch-dashboards as a service.

Can you link me to any other documentation on this issue? I don’t have a config directory under my opensearch directory and I just want to verify that I need to create one.

EDIT: I did some google-fu and found reference to the internal_users.yml file at /usr/share/opensearch/config/opensearch-security/ and changed the hash there. After restarting opensearch and opensearch-dashboards I still can’t log into opensearch-dashboards with the new password.

Thanks!

Hey again,
Did you change the internal_users.yml?
If so, you have to apply the configuration in your case it will be:
first go to /usr/share/opensearch/config/opensearch-security/
Then:

/usr/share/opensearch/plugins/opensearch-security/tools/securityadmin.sh -icl   -nhnv   -cacert /path/to/your/root-cetificate  -cert /path/to/your/certificate   -key /path/to/your/root-key/cetificate

The doc reference:
Apply changes with securityadmin.sh - OpenSearch documentation

Tag me in any case,
Yours,
Sam