Setup-password file is not available upon new install


(Luke) #1

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?


(Tim Vernum) #2

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?

(Luke) #3

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
  • server.host: 127.0.0.1
  • elasticsearch.url: "http://127.0.0.1:9200"
  • elasticsearch.preserveHost: true
  • elasticsearch.pingTimeout: 1500
  • .requesttimeout: 30000

(Tim Vernum) #4

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/


(Luke) #5

elasticsearch -version >> command not found.

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

  • log4j2.properties
  • role_mapping.yml
  • roles.yml
  • users
  • users_roles

(Tim Vernum) #6

/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.


(Luke) #7

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


(Yogesh Gaikwad) #8

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.

Regards,
Yogesh Gaikwad


(Luke) #9

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

Files inx-pack directory:


(Tim Vernum) #10

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

(Luke) #11

Hi my version is 5.5.2/ JVM: 1.8.0_141


(Tim Vernum) #12

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.


(system) #13

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