1
0

setup-passwords.asciidoc 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. [role="xpack"]
  2. [testenv="gold+"]
  3. [[setup-passwords]]
  4. == elasticsearch-setup-passwords
  5. The `elasticsearch-setup-passwords` command sets the passwords for the built-in
  6. `elastic`, `kibana`, `logstash_system`, `beats_system`, and `apm_system` users.
  7. [float]
  8. === Synopsis
  9. [source,shell]
  10. --------------------------------------------------
  11. bin/elasticsearch-setup-passwords auto|interactive
  12. [-b, --batch] [-h, --help] [-E <KeyValuePair>]
  13. [-s, --silent] [-u, --url "<URL>"] [-v, --verbose]
  14. --------------------------------------------------
  15. [float]
  16. === Description
  17. This command is intended for use only during the initial configuration of
  18. {xpack}. It uses the
  19. {stack-ov}/built-in-users.html#bootstrap-elastic-passwords[`elastic` bootstrap password]
  20. to run user management API requests. After you set a password for the `elastic`
  21. user, the bootstrap password is no longer active and you cannot use this command.
  22. Instead, you can change passwords by using the *Management > Users* UI in {kib}
  23. or the <<security-api-change-password,Change Password API>>.
  24. This command uses an HTTP connection to connect to the cluster and run the user
  25. management requests. If your cluster uses TLS/SSL on the HTTP layer, the command
  26. automatically attempts to establish the connection by using the HTTPS protocol.
  27. It configures the connection by using the `xpack.security.http.ssl` settings in
  28. the `elasticsearch.yml` file. If you do not use the default config directory
  29. location, ensure that the *ES_PATH_CONF* environment variable returns the
  30. correct path before you run the `elasticsearch-setup-passwords` command. You can
  31. override settings in your `elasticsearch.yml` file by using the `-E` command
  32. option. For more information about debugging connection failures, see
  33. {xpack-ref}/trb-security-setup.html[`elasticsearch-setup-passwords` command fails due to connection failure].
  34. [float]
  35. === Parameters
  36. `auto`:: Outputs randomly-generated passwords to the console.
  37. `-b, --batch`:: If enabled, runs the change password process without prompting the
  38. user.
  39. `-E <KeyValuePair>`:: Configures a standard {es} or {xpack} setting.
  40. `-h, --help`:: Shows help information.
  41. `interactive`:: Prompts you to manually enter passwords.
  42. `-s, --silent`:: Shows minimal output.
  43. `-u, --url "<URL>"`:: Specifies the URL that the tool uses to submit the user management API
  44. requests. The default value is determined from the settings in your
  45. `elasticsearch.yml` file. If `xpack.security.http.ssl.enabled` is set to `true`,
  46. you must specify an HTTPS URL.
  47. `-v, --verbose`:: Shows verbose output.
  48. [float]
  49. === Examples
  50. The following example uses the `-u` parameter to tell the tool where to submit
  51. its user management API requests:
  52. [source,shell]
  53. --------------------------------------------------
  54. bin/elasticsearch-setup-passwords auto -u "http://localhost:9201"
  55. --------------------------------------------------