Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch_Installation_asking for username and password

After installation of Elasticsearch and running the elasticsearch.bat command. I need to check in https:localhost9200. Here I am getting a prompt asking for username and password.

Is there any default username or password???

like image 504
Vaibhav Yalla Avatar asked Oct 23 '25 11:10

Vaibhav Yalla


2 Answers

You can Generate a new password using

/usr/share/elasticsearch/elasticsearch-setup-passwords auto/interactive

interactive is where you will have to enter password for all user.

auto will just print passwords on the shell.

else

You can turn off x-pack security in elasticsearch.yml

like image 87
Harshit Gohil Avatar answered Oct 26 '25 03:10

Harshit Gohil


For Windows:-

Go to C:\xampp\htdocs\elasticsearch-8.2.2\bin folder.

under the above folder or path open the PowerShell terminal.

Now run this command : .\elasticsearch-reset-password -u elastic .

NOTE - don't forget to add dott (.) at the last.

Then you will see the reset password on the terminal, so now the browser login details will be -

username - elastic     // default username
password - new generated token/password

See the Screenshot for reference -

enter image description here

Read More Here:

1-> https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-windows.html#windows-service

2-> https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html

like image 37
Vishal Thakur Avatar answered Oct 26 '25 04:10

Vishal Thakur