2017-09-26 11:52:04 -04:00
|
|
|
[role="xpack"]
|
2018-06-06 10:49:15 -04:00
|
|
|
[testenv="gold+"]
|
2017-09-26 11:52:04 -04:00
|
|
|
[[setup-passwords]]
|
2018-04-11 11:21:15 -04:00
|
|
|
== elasticsearch-setup-passwords
|
2017-09-26 11:52:04 -04:00
|
|
|
|
2018-04-11 11:21:15 -04:00
|
|
|
The `elasticsearch-setup-passwords` command sets the passwords for the built-in
|
|
|
|
`elastic`, `kibana`, `logstash_system`, and `beats_system` users.
|
2017-09-26 11:52:04 -04:00
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Synopsis
|
|
|
|
|
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------
|
2018-04-11 11:21:15 -04:00
|
|
|
bin/elasticsearch-setup-passwords auto|interactive
|
2017-10-26 11:22:31 -04:00
|
|
|
[-b, --batch] [-h, --help] [-E <KeyValuePair>]
|
|
|
|
[-s, --silent] [-u, --url "<URL>"] [-v, --verbose]
|
2017-09-26 11:52:04 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Description
|
|
|
|
|
|
|
|
This command is intended for use only during the initial configuration of
|
|
|
|
{xpack}. It uses the
|
2018-05-02 16:09:25 -04:00
|
|
|
{stack-ov}/built-in-users.html#bootstrap-elastic-passwords[`elastic` bootstrap password]
|
2017-09-26 11:52:04 -04:00
|
|
|
to run user management API requests. After you set a password for the `elastic`
|
|
|
|
user, the bootstrap password is no longer active and you cannot use this command.
|
|
|
|
Instead, you can change passwords by using the *Management > Users* UI in {kib}
|
|
|
|
or the <<security-api-change-password,Change Password API>>.
|
|
|
|
|
2017-11-02 11:13:30 -04:00
|
|
|
This command uses an HTTP connection to connect to the cluster and run the user
|
|
|
|
management requests. If your cluster uses TLS/SSL on the HTTP layer, the command
|
|
|
|
automatically attempts to establish the connection by using the HTTPS protocol.
|
|
|
|
It configures the connection by using the `xpack.security.http.ssl` settings in
|
|
|
|
the `elasticsearch.yml` file. If you do not use the default config directory
|
|
|
|
location, ensure that the *ES_PATH_CONF* environment variable returns the
|
2018-04-11 11:21:15 -04:00
|
|
|
correct path before you run the `elasticsearch-setup-passwords` command. You can
|
|
|
|
override settings in your `elasticsearch.yml` file by using the `-E` command
|
|
|
|
option. For more information about debugging connection failures, see
|
|
|
|
{xpack-ref}/trb-security-setup.html[`elasticsearch-setup-passwords` command fails due to connection failure].
|
2017-11-02 11:13:30 -04:00
|
|
|
|
2017-09-26 11:52:04 -04:00
|
|
|
[float]
|
|
|
|
=== Parameters
|
|
|
|
|
|
|
|
`auto`:: Outputs randomly-generated passwords to the console.
|
|
|
|
|
2017-10-26 11:22:31 -04:00
|
|
|
`-b, --batch`:: If enabled, runs the change password process without prompting the
|
|
|
|
user.
|
|
|
|
|
|
|
|
`-E <KeyValuePair>`:: Configures a standard {es} or {xpack} setting.
|
|
|
|
|
|
|
|
`-h, --help`:: Shows help information.
|
|
|
|
|
2017-09-26 11:52:04 -04:00
|
|
|
`interactive`:: Prompts you to manually enter passwords.
|
|
|
|
|
2017-10-26 11:22:31 -04:00
|
|
|
`-s, --silent`:: Shows minimal output.
|
|
|
|
|
|
|
|
`-u, --url "<URL>"`:: Specifies the URL that the tool uses to submit the user management API
|
2017-09-26 11:52:04 -04:00
|
|
|
requests. The default value is determined from the settings in your
|
2017-11-02 11:13:30 -04:00
|
|
|
`elasticsearch.yml` file. If `xpack.security.http.ssl.enabled` is set to `true`,
|
|
|
|
you must specify an HTTPS URL.
|
2017-09-26 11:52:04 -04:00
|
|
|
|
2017-10-26 11:22:31 -04:00
|
|
|
`-v, --verbose`:: Shows verbose output.
|
|
|
|
|
2017-09-26 11:52:04 -04:00
|
|
|
[float]
|
|
|
|
=== Examples
|
|
|
|
|
|
|
|
The following example uses the `-u` parameter to tell the tool where to submit
|
|
|
|
its user management API requests:
|
|
|
|
|
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------
|
2018-04-11 11:21:15 -04:00
|
|
|
bin/elasticsearch-setup-passwords auto -u "http://localhost:9201"
|
2017-09-26 11:52:04 -04:00
|
|
|
--------------------------------------------------
|