# Unable to create mapping in Elasticsearch 6.0

**URL:** https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842
**Category:** Elasticsearch
**Created:** [November 30, 2017, 9:51pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842 "2017-11-30T21:51:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Pratiksha\_Tewary](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratiksha\_Tewary](https://discuss.elastic.co/u/Pratiksha_Tewary)
#### Post date: [November 30, 2017, 9:51pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842/1 "2017-11-30T21:51:19Z")

</div>

Hi,

I am getting the following error in the console when I am trying to create an index mapping in Elasticsearch 6.0:

```
{
  "error": {
    "root_cause": [
      {
        "type": "security_exception",
        "reason": "action [indices:admin/create] is unauthorized for user [kibana]"
      }
    ],
    "type": "security_exception",
    "reason": "action [indices:admin/create] is unauthorized for user [kibana]"
  },
  "status": 403
}

```

I am trying to create the following mapping:

```
PUT e1web_domain_log
{
  "mappings": {
      "doc": {
        "properties": {
          "Timestamp": {
            "type": "date"
          },
          "Message_Type": {
            "type": "keyword"
          },
          "Application": {
            "type": "keyword"
          },
          "Param_X": {
            "type": "keyword"
          },
          "Server": {
            "type": "keyword"
          },
          "Status": {
            "type": "keyword"
          },
          "ExecuteThread": {
            "type": "integer"
          },
          "Queue": {
            "type": "text"
          },
          "Kernel": {
            "type": "keyword"
          },
          "Message_code": {
            "type": "long"
          },
          "Param_A": {
            "type": "keyword"
          },
          "Description": {
            "type": "text"
          }
        }
      }
    }
}

```

I do have x-pack installed. Am I missing some security setting?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 30, 2017, 10:11pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842/2 "2017-11-30T22:11:49Z")

</div>

Moved to #x-pack

---

<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: [November 30, 2017, 10:59pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842/3 "2017-11-30T22:59:38Z")

</div>

It looks like you are logged tto Kibana as the`kibana` user. That's a common mistake.

The kibana user is designed for the Kibana application to use underthe covers for its connection to Elasticsearch. You should not log in to Kibana with that user.

You need to create your own user for logging into Kibana, per step #4 here: [https://www.elastic.co/guide/en/kibana/6.0/using-kibana-with-security.html](https://www.elastic.co/guide/en/kibana/6.0/using-kibana-with-security.html)

First, login to Kibana as `elastic` which is the superuser, then use the Kibana management UI to

1. Create a new role that has access to whatever indices you want to use in Kibana.
2. Create your own personal userid, and grant it the `kibana_user` role, as well as the role you created in step 1.
3. Now login to Kibana using that userid.

---

<div class="post-metadata">

### Author: ![Pratiksha\_Tewary](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratiksha\_Tewary](https://discuss.elastic.co/u/Pratiksha_Tewary)
#### Post date: [December 1, 2017, 7:27pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842/4 "2017-12-01T19:27:04Z")

</div>

Thank you!

---

<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: [December 29, 2017, 7:27pm UTC](https://discuss.elastic.co/t/unable-to-create-mapping-in-elasticsearch-6-0/109842/5 "2017-12-29T19:27:37Z")

</div>

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