Changing the Password for Elasticsearch and Kibana
Describes how to change the password for Elasticsearch / Kibana.
Kibana gets its password from Elasticseach. To change the password for the
admin user for Elasticsearch and Kibana:
- On one of the Elasticsearch nodes, run these
commands:
The es_version depends on the EEP that you have installed. To determine theESHOME=/opt/mapr/elasticsearch/elasticsearch-<es_version> cd $ESHOME/usr/share/elasticsearch/usr/share/elasticsearch/plugins/search-guard-6 bash tools/hash.sh -p "NewPasswordYouWantForAdmin" $2a$12$6ASxMQEBKYPyGUc10RyleOhz3c8RrvPGb7oqLC9xGGwPxJFwOLJtq
es_version
, use the following table, or refer to Component Versions for Released EEPs:Core Version EEP Version <es_version>
6.2.0 8.0.0 6.8.8 6.2.0 7.1.1 6.8.8 6.2.0 7.1.0 6.8.8 6.2.0 7.0.1 6.8.8 6.2.0 7.0.0 6.8.8 6.1.1 6.3.5 6.8.8 6.1.1 or 6.1.0 6.3.4 6.8.8 6.1.1 or 6.1.0 6.3.3 6.8.8 6.1.0 6.3.2 6.8.8 6.1.0 6.3.1 6.8.8 6.1.0 6.3.0 6.5.3 6.1.0 6.2.0 6.5.3 6.1.0 6.1.1 6.5.3 6.1.0 6.1.0 6.5.3 6.1.0 6.0.2 6.2.3 6.1.0 6.0.1 6.2.3 6.1.0 6.0.0 6.2.3 - Using the hash generated in step 1, edit the
sgconfig/sg_internal_users.yml
file. Change this:admin: hash: $2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG #password is: <PasswordSpecifiedAtClusterInstallation>
to this:admin: hash: $2a$12$6ASxMQEBKYPyGUc10RyleOhz3c8RrvPGb7oqLC9xGGwPxJFwOLJtq #password is: <NewPasswordYouWantForAdmin> #hash: $2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG #password is: <PasswordSpecifiedAtClusterInstallation>
- Save the file.
- Load the new users database into
Elasticsearch:
KSPW=$(cat $ESHOME/etc/elasticsearch/.keystore_password) ./tools/sgadmin.sh -h <esHostname> -f sgconfig/sg_internal_users.yml -t internalusers -ks ../../../../../etc/elasticsearch/keystores/admin-usr-keystore.jks -kspass $KSPW -ts ../../../../../etc/elasticsearch/keystores/truststore.jks -tspass $KSPW -cn MaprMonitoring