原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/get-started-kibana-user.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/get-started-kibana-user.html

Add the built-in user to Kibanaedit

When the Elasticsearch security features are enabled, users must log in to Kibana with a valid user ID and password.

Kibana also performs some tasks under the covers that require use of the built-in kibana user.

  1. Configure Kibana to use the built-in kibana user and the password that you created:

    • If you don’t mind having passwords visible in your configuration file, uncomment and update the following settings in the kibana.yml file in your Kibana directory:

      If you installed Kibana using archive distributions (zip or tar.gz), the kibana.yml configuration file is in KIBANA_HOME/config. If you used package distributions (Debian or RPM), it’s in /etc/kibana. For more information, see Configuring Kibana.

      For example, add the following settings:

      elasticsearch.username: "kibana"
      elasticsearch.password: "your_password"

      Specify the password that you set with the elasticsearch-setup-passwords command then save your changes to the file.

    • If you prefer not to put your user ID and password in the kibana.yml file, store them in a keystore instead. Run the following commands to create the Kibana keystore and add the secure settings:

      ./bin/kibana-keystore create
      ./bin/kibana-keystore add elasticsearch.username
      ./bin/kibana-keystore add elasticsearch.password

      When prompted, specify the kibana built-in user and its password for these setting values. The settings are automatically applied when you start Kibana. To learn more, see Secure settings.

  2. Restart Kibana. For example, if you installed Kibana with a .tar.gz package, run the following command from the Kibana directory:

    ./bin/kibana

    See Starting and stopping Kibana.