0

I am trying to add new user in elastic search . I have am able to add user with superuser role and perform operation but i am able to add user but when i tried to to use that user to access cluster data I am getting bellow error.

{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user [user_readonly]"}],"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user [user_readonly]"},"status":403}

I have used file bases authentication. I have used 'bin/x-pack/users useradd user_readonly -p test@123 -r monitorning_user' command

Dipak Jadhav
  • 147
  • 2
  • 13

1 Answers1

0

In Elasticsearch you have to configure elasticsearch.yaml and and kibana.yml.

$echo "xpack.security.enabled: false" | sudo tee -a /etc/elasticsearch/elasticsearch.yaml

$echo "xpack.security.enabled: false" | sudo tee -a /etc/kibana/kibana.yaml

By default it is true

Give permission and change owner as kibana to this folder /usr/share/kibana/

$chown kibana:kibana /usr/share/kibana/* -R

Stop and Start kibana and elasticsearch (don't use restart command)

$service elasticsearch restart

$service kibana stop

$service kibana start