In order to ass a new user/password on my elasticsearch, I need to execute the following line :
curl -XPUT -u elastic 'localhost:9200/_xpack/security/user/elastic/_password' -H "Content-Type: application/json" -d '{
"password" : "elasticpassword"
}'
Or I can only do it with PowerShell. Does someone know, how I can executed it.
Thanks
Regards
Vinuja
The user creation process just uses a standard HTTP PUT, so you're free to use any tool you like that can perform HTTP requests.
Our documentation provides examples using curl, but PowerShell is an option as well. Our license management docs have an example of using Invoke-WebRequest to perform a PUT request on an Elasticsearch server - you could adapt that for your needs.
Alternatively, if you install Kibana, it provides 2 other options. Kibana with X-Pack provides a full UI for managing users and roles if that suits you, or the Dev Tools console in Kibana can also be used to send requests directly to Elasticsearch. Many of the examples in the documentation provide an "open in Console" link that will allow you to run that example through your local Kibana instance.
Finally, since you are on Windows, there is also a .NET API available that provides a straight forward programmatic interface to Elasticsearch, including X-Pack features.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.