# Unable to create users and roles

**URL:** <https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [May 20, 2019, 10:42pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911 "2019-05-20T22:42:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 20, 2019, 10:42pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/1 "2019-05-20T22:42:04Z")

</div>

Hi here,  
I am trying to create users and roles in my elastic cluster. But, every time I run the REST API,  
I get this error

{  
"error": {  
"root\_cause": [  
{  
"type": "security\_exception",  
"reason": "current license is non-compliant for [security]",  
"license.expired.feature": "security"  
}  
],  
"type": "security\_exception",  
"reason": "current license is non-compliant for [security]",  
"license.expired.feature": "security"  
},  
"status": 403  
}

I went through this link [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions) where it is stated that "role-based access control" is available in the basic version of Elastic.

Below is the sample REST API which I picked from the elastic documentation:

POST [http://localhost:9200/\_security/user/jacknich](http://localhost:9200/_security/user/jacknich)  
{  
"password" : "j@rV1s",  
"roles" : ["admin", "other\_role1"],  
"full\_name" : "Jack Nicholson",  
"email" : "jacknich@example.com",  
"metadata" : {  
"intelligence" : 7  
}  
}

Can someone please help me out?

Thanks.

---

<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:** [May 21, 2019, 12:03am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/2 "2019-05-21T00:03:51Z")

</div>

What version are you on? What license do you have?

---

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 21, 2019, 12:49am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/3 "2019-05-21T00:49:52Z")

</div>

Hi @warkolm,  
I am using Elastic Search Version 6.7.0 and I have a basic License.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 21, 2019, 12:53am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/4 "2019-05-21T00:53:37Z")

</div>

You need 6.8.0 or 7.1.0 in order to have access to security on a basic license. Our subscriptions page always reflects the latest release, which may not be an exact match with the version you are running.

- **[Annoucement of 6.8.0 and 7.1.1](https://www.elastic.co/blog/security-for-elasticsearch-is-now-free)**
- **[Getting started with security blog](https://www.elastic.co/blog/getting-started-with-elasticsearch-security)**

---

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 21, 2019, 12:55am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/5 "2019-05-21T00:55:27Z")

</div>

Hey @TimV,  
Thanks for the response.  
I will check it on the 6.8 and 7.1 versions.

Thanks.

---

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 21, 2019, 6:56am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/6 "2019-05-21T06:56:04Z")

</div>

Hi @TimV,  
Thank you for providing me a quick headstart.  
I downloaded elastic 6.8.0 and was able to add user and password in my cluster. I am able to use this command

> Blockquote

curl --user username: password -XGET [http://localhost:9200](http://localhost:9200)

> Blockquote

to make requests and access my cluster. But other than curl, how can I provide authentication details in "Sense" or in "KIbana Console" to access the cluster??

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 21, 2019, 7:22am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/7 "2019-05-21T07:22:50Z")

</div>

If your Elasticsearch cluster has security enabled, then you should automatically see a login page when you access Kibana.  
The credentials you enter there are used to access Elasticsearch, including in Console.

---

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 21, 2019, 3:25pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/8 "2019-05-21T15:25:14Z")

</div>

My elasticsearch has security enabled and I have already added a user and password in the cluster. I am not using Kibaba currently. Instead, for the REST calls I am using "Sense" tool.  
In that, I am not able to run those queries because I am unable to add user and password with the REST call in "Sense".

---

<div class="post-metadata">

**Author:** ![ToddFerg](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@ToddFerg](https://discuss.elastic.co/u/ToddFerg)\
**Post date:** [May 21, 2019, 6:33pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/9 "2019-05-21T18:33:31Z")

</div>

Hi @Dhrumil  
So I would at the current tools available and see about adding username/password support. Which sense tool are you using?

I know that there are a variety of tools out there that do support it, [https://github.com/lmenezes/cerebro](https://github.com/lmenezes/cerebro) and others.

---

<div class="post-metadata">

**Author:** ![Dhrumil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhrumil/32/46508_2.png) [@Dhrumil](https://discuss.elastic.co/u/Dhrumil)\
**Post date:** [May 21, 2019, 8:57pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/10 "2019-05-21T20:57:26Z")

</div>

Hi @ToddFerg,  
I am using the following sense tool:

> **[StephaneBour/sense-chrome](https://github.com/StephaneBour/sense-chrome)**
>
> Sense (elasticsearch) for chrome extension. Contribute to StephaneBour/sense-chrome development by creating an account on GitHub.

I don't know how to add username/ password support for it. Can you please throw some more light on this?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [May 22, 2019, 12:35am UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/11 "2019-05-22T00:35:13Z")

</div>

We don't provide that tool (it's a fork, based on an older product that we merged into Kibana and discontinued the Chrome plugin).  
I don't think there will be many people here who will be able to help you with it (but you might get lucky).

I would recommend you use Kibana if you can. It has a more advanced dev console feature that is actively developed and improved as well as having custom UIs for a variety of management functions like adding users and roles.

---

<div class="post-metadata">

**Author:** ![ToddFerg](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@ToddFerg](https://discuss.elastic.co/u/ToddFerg)\
**Post date:** [May 23, 2019, 6:23pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/12 "2019-05-23T18:23:54Z")

</div>

@Dhrumil

I would agree with Tim on this, using Kibana will give you a lot of extra features, and will fully integrate into the stack. (EVEN if you were to run it locally).

---

<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:** [June 20, 2019, 6:28pm UTC](https://discuss.elastic.co/t/unable-to-create-users-and-roles/181911/13 "2019-06-20T18:28:18Z")

</div>

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