# Error 401

**URL:** <https://discuss.elastic.co/t/error-401/94192>\
**Category:** Elasticsearch\
**Created:** [July 22, 2017, 7:41am UTC](https://discuss.elastic.co/t/error-401/94192 "2017-07-22T07:41:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Sanks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_sanks/32/16719_2.png) [@Keith\_Sanks](https://discuss.elastic.co/u/Keith_Sanks)\
**Post date:** [July 22, 2017, 7:41am UTC](https://discuss.elastic.co/t/error-401/94192/1 "2017-07-22T07:41:00Z")

</div>

running the following command:  
curl -XGET [http://elastic:changme@127.0.0.1:9200/bro-](http://elastic:changme@127.0.0.1:9200/bro-)_/\_search?q=_ -d '  
{  
"sort": [{  
"@timestamp": {  
"order": "desc"  
}  
},  
{  
"\_score": {  
"order": "desc"  
}  
}  
],  
"size": 1  
}  
' | jq  
I get the following returned:  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 503 100 345 100 158 2828 1295 --:--:-- --:--:-- --:--:-- 2851  
{  
"error": {  
"root\_cause": [  
{  
"type": "security\_exception",  
"reason": "failed to authenticate user [elastic]",  
"header": {  
"WWW-Authenticate": "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type": "security\_exception",  
"reason": "failed to authenticate user [elastic]",  
"header": {  
"WWW-Authenticate": "Basic realm="security" charset="UTF-8""  
}  
},  
"status": 401  
}  
I see that it is error 401, I haven't changed the default password, no data will get sent to elasticsearch because of this.  
I've tried the following command but it doesn't seem to work:  
curl -XPUT -u elastic 'localhost:9200/\_xpack/security/user/elastic/\_password' -d '{  
"password" : "changeme"  
}'

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 22, 2017, 8:50am UTC](https://discuss.elastic.co/t/error-401/94192/2 "2017-07-22T08:50:31Z")

</div>

> [@Keith\_Sanks](#):
>
> curl -XGET [http://elastic](http://elastic):changme

I think you are missing an `e` there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 19, 2017, 8:50am UTC](https://discuss.elastic.co/t/error-401/94192/3 "2017-08-19T08:50:34Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
