Setup-password file is not available upon new install

When I initially install x-pack, there is no "setup-password" file to set the password. Then I gotten a guide, trying to uninstall the package, and reinstall, it still not there. May I know is there any solution to it?

Can you provide a few more details?

  • What version of Elasticsearch are you running?
  • What platform are you running on?
  • In which directory are you looking for the setup-passwords utility?

Hi Tim, below are answer to your questions:

  1. I am running the latest version from the official website.
  2. Linux Debian 4.9.88
  3. under bin/elasticsearch

Below is my Kibana.yml file settings:

  • server.port: 5601
  • elasticsearch.url: ""
  • elasticsearch.preserveHost: true
  • elasticsearch.pingTimeout: 1500
  • .requesttimeout: 30000

When providing version numbers, please be as precise as possible.
The output from elasticsearch -version is ideal.

It sounds like you're looking for the command in the wrong place.
setup-passwords is in bin/x-pack/

elasticsearch -version >> command not found.

I am exploring in this directory: /etc/elasticsearch/x-pack/
Files within it:

  • role_mapping.yml
  • roles.yml
  • users
  • users_roles

/etc/elasticsearch/x-pack/ is a configuration directory, not a bin directory, it doesn't contain any commands.

I assume based on your platform that you installed from the .deb package. In that case, you should read up on the directory layout here:

and look for the elasticsearch and setup-passwords commands in the bin directory.

I found the "elasticsearch" file but not the "setup-passwords" file there. Is there a way to check or to create the file?

Hi @skyluke.1987,

If you have found command /usr/share/elasticsearch/bin/elasticsearch, could you please run the following command: /usr/share/elasticsearch/bin/elasticsearch -version
Please post the output here so we know what version you have in your environment.

You should be able to locate setup-passwords in the directory /usr/share/elasticsearch/bin/x-pack/.

Hope this helps.

Yogesh Gaikwad

Hi Yogesh, thanks for your guidance. Below is the result.


Files inx-pack directory:

It doesn't look like you have the latest version of Elasticsearch.
Your files are timestamped from 2017, and the most recent release is 6.2.4 from April this yeah.

Can you please run the version command exactly as @Yogesh_Gaikwad requested:

/usr/share/elasticsearch/bin/elasticsearch -version

Hi my version is 5.5.2/ JVM: 1.8.0_141

setup-passwords is a utility for Elasticsearch 6.0 and above.

Since you are just getting started, I would recommend that you install a more recent version of Elasticsearch.

If you want to stick with your current version, then you'll need to follow setup instructions for that version.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.