1
0

setup-passwords.asciidoc 3.2 KB

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