reset-elastic-password.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [roles="xpack"]
  2. [[reset-elastic-password]]
  3. == elasticsearch-reset-elastic-password
  4. The `elasticsearch-reset-elastic-password` command resets the password for the
  5. `elastic` <<built-in-users,built-in superuser>>.
  6. [discrete]
  7. === Synopsis
  8. [source,shell]
  9. ----
  10. bin/elasticsearch-reset-elastic-password
  11. [-a, --auto] [-b, --batch] [-E <KeyValuePair]
  12. [-f, --force] [-h, --help] [-i, --interactive]
  13. ----
  14. [discrete]
  15. === Description
  16. Use this command to reset the password of the `elastic` superuser. By default, a
  17. strong password is generated for you. To explicitly set a password, run the
  18. tool in interactive mode with `-i`. The command generates (and subsequently
  19. removes) a temporary user in the <<file-realm,file realm>> to run the request
  20. that changes the `elastic` user password.
  21. IMPORTANT: You cannot use this tool if the file realm is disabled in your `elasticsearch.yml` file.
  22. This command uses an HTTP connection to connect to the cluster and run the user
  23. management requests. The command automatically attempts to establish the connection
  24. over HTTPS by using the `xpack.security.http.ssl` settings in
  25. the `elasticsearch.yml` file. If you do not use the default config directory
  26. location, ensure that the `ES_PATH_CONF` environment variable returns the
  27. correct path before you run the `elasticsearch-reset-elastic-password` command. You can
  28. override settings in your `elasticsearch.yml` file by using the `-E` command
  29. option. For more information about debugging connection failures, see
  30. <<trb-security-setup>>.
  31. [discrete]
  32. [[reset-elastic-password-parameters]]
  33. === Parameters
  34. `-a, --auto`:: Resets the password of the `elastic` user to an auto-generated strong password. (Default)
  35. `-b, --batch`:: Runs the reset password process without prompting the user for verification.
  36. `-E <KeyValuePair>`:: Configures a standard {es} or {xpack} setting.
  37. `-f, --force`:: Forces the command to run against an unhealthy cluster.
  38. `-h, --help`:: Returns all of the command parameters.
  39. `-i, --interactive`:: Prompts the user for the password of the `elastic` user. Use this option to explicitly set a password.
  40. [discrete]
  41. === Examples
  42. The following example resets the password of the `elastic` user to an auto-generated value and
  43. prints the new password in the console.
  44. [source,shell]
  45. ----
  46. bin/elasticsearch-reset-elastic-password
  47. ----