| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 | [roles="xpack"][[reset-elastic-password]]== elasticsearch-reset-elastic-passwordThe `elasticsearch-reset-elastic-password` command resets the password for the`elastic` <<built-in-users,built-in superuser>>.[discrete]=== Synopsis[source,shell]----bin/elasticsearch-reset-elastic-password[-a, --auto] [-b, --batch] [-E <KeyValuePair][-f, --force] [-h, --help] [-i, --interactive]----[discrete]=== DescriptionUse this command to reset the password of the `elastic` superuser. By default, astrong password is generated for you. To explicitly set a password, run thetool in interactive mode with `-i`. The command generates (and subsequentlyremoves) a temporary user in the <<file-realm,file realm>> to run the requestthat changes the `elastic` user password.IMPORTANT: You cannot use this tool if the file realm is disabled in your `elasticsearch.yml` file.This command uses an HTTP connection to connect to the cluster and run the usermanagement requests. The command automatically attempts to establish the connectionover HTTPS by using the `xpack.security.http.ssl` settings inthe `elasticsearch.yml` file. If you do not use the default config directorylocation, ensure that the `ES_PATH_CONF` environment variable returns thecorrect path before you run the `elasticsearch-reset-elastic-password` command. You canoverride settings in your `elasticsearch.yml` file by using the `-E` commandoption. For more information about debugging connection failures, see<<trb-security-setup>>.[discrete][[reset-elastic-password-parameters]]=== Parameters`-a, --auto`:: Resets the password of the `elastic` user to an auto-generated strong password. (Default)`-b, --batch`:: Runs the reset password process without prompting the user for verification.`-E <KeyValuePair>`:: Configures a standard {es} or {xpack} setting.`-f, --force`:: Forces the command to run against an unhealthy cluster.`-h, --help`:: Returns all of the command parameters.`-i, --interactive`:: Prompts the user for the password of the `elastic` user. Use this option to explicitly set a password.[discrete]=== ExamplesThe following example resets the password of the `elastic` user to an auto-generated value andprints the new password in the console.[source,shell]----bin/elasticsearch-reset-elastic-password----
 |