setup-passwords.asciidoc 3.1 KB

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