Elastic Stack security comes with default users and a built-in credential helper to set up security with ease and have things up and running quickly. Open up another Terminal and navigate to ES_HOME. Let's generate the passwords for the reserved/default users—elastic, kibana, apm_system, remote_monitoring_user, beats_system, and logstash_system—by executing the following command:
$ ES_HOME>bin/elasticsearch-setup-passwords interactive
You should get the following logs/prompts to enter the password for the reserved/default users:
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.You will be prompted to enter passwords as ...