elasticsearch/es-cli-setup-passwords

Setup Built-in User Passwords

Set passwords for built-in users

elasticsearch
security
passwords

Command

elasticsearch-setup-passwords interactive

Explanation

Configures passwords for system users like `elastic`, `kibana`, `logstash_system`. Required after enabling security.

Common Use Cases

  • Setting up new cluster security
  • Resetting built-in user credentials
  • Hardening cluster access

Best Practices

  • Store generated passwords securely
  • Rotate system user passwords periodically

Common Mistakes to Avoid

  • Running on nodes without security enabled
  • Forgetting to update clients with new passwords

Troubleshooting

Problem: Command fails due to security not enabled

Solution: Enable x-pack security in elasticsearch.yml.

Problem: Authentication fails after setup

Solution: Ensure applications use updated credentials.

Examples

Automatically generate all passwords

elasticsearch-setup-passwords auto