# Cannot create user

**URL:** <https://discuss.elastic.co/t/cannot-create-user/203813>\
**Category:** Elasticsearch\
**Created:** [October 16, 2019, 10:50am UTC](https://discuss.elastic.co/t/cannot-create-user/203813 "2019-10-16T10:50:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jepper](https://discuss.elastic.co/u/jepper)\
**Post date:** [October 16, 2019, 10:50am UTC](https://discuss.elastic.co/t/cannot-create-user/203813/1 "2019-10-16T10:50:31Z")

</div>

I post this, with xpack enabled and trial license

`curl -X POST "https://127.0.0.1:9200/_xpack/security/role/demo_admin" -u elastic:password -k -H "Content-Type: application/json" --data '{"indices": [{"names": ["*"],"privileges":["manage"]}]}'`

and get this back  
{"error":{"root\_cause":[{"type":"unavailable\_shards\_exception","reason":"[.security-7][0] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[.security-7][0]] containing [index {[.security][\_doc][role-demo\_admin], source[{"cluster":,"indices":[{  
"names":["_"],"privileges":["manage"],"allow\_restricted\_indices":false}],"applications":[],"run\_as":[],"metadata":{},"type":"role"}]}] and a refresh]"}],"type":"unavailable\_shards\_exception","reason":"[.security-7][0] primary shard is not active Timeout  
: [1m], request: [BulkShardRequest [[.security-7][0]] containing [index {[.security][\_doc][role-demo\_admin], source[{"cluster":[],"indices":[{"names":["_"],"privileges":["manage"],"allow\_restricted\_indices":false}],"applications":,"run\_as":,"metadat  
a":{},"type":"role"}]}] and a refresh]"},"status":503}

What am I missing?

(Sorry about the - not sure yet how to avoid these being parsed incorrectly by the forum UI.)

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 16, 2019, 5:42pm UTC](https://discuss.elastic.co/t/cannot-create-user/203813/2 "2019-10-16T17:42:15Z")

</div>

What does your node configuration look like? Do you have any non-default settings, e.g. `node.data: false`?

---

<div class="post-metadata">

**Author:** ![jepper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@jepper](https://discuss.elastic.co/u/jepper)\
**Post date:** [October 16, 2019, 11:17pm UTC](https://discuss.elastic.co/t/cannot-create-user/203813/3 "2019-10-16T23:17:59Z")

</div>

That was it. Thanks for suggesting!

---

<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:** [November 13, 2019, 11:18pm UTC](https://discuss.elastic.co/t/cannot-create-user/203813/4 "2019-11-13T23:18:00Z")

</div>

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