# When I log in to Kibana as kibana\_system user, it says "You do not have permission"

**URL:** https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837
**Category:** Kibana
**Created:** [December 3, 2021, 2:31am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837 "2021-12-03T02:31:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tadashi.oya](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@tadashi.oya](https://discuss.elastic.co/u/tadashi.oya)
#### Post date: [December 3, 2021, 2:31am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/1 "2021-12-03T02:31:59Z")

</div>

Hi there.  
When I log in to Kibana as kibana\_system user, it says "You do not have permission to access the requested page".  
As elastic user, the dashboard is displayed.

The reproduction procedure is as follows.

step 1.

```auto
$ mkdir work
$ cd work
$ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
$ wget https://artifacts.elastic.co/downloads/kibana/kibana-7.15.1-linux-x86_64.tar.gz
$ tar xvzf elasticsearch-7.15.1-linux-x86_64.tar.gz
$ tar xvzf kibana-7.15.1-linux-x86_64.tar.gz

```

step 2.

```auto
$ cd elasticsearch-7.15.1
$ cp config/elasticsearch.yml config/elasticsearch.yml.orig
$ vi config/elasticsearch.yml
(add "xpack.security.enabled: true")
$ diff -u config/elasticsearch.yml.orig config/elasticsearch.yml
--- config/elasticsearch.yml.orig 2021-12-02 17:38:40.112698983 +0900
+++ config/elasticsearch.yml 2021-12-02 16:58:35.519820314 +0900
@@ -1,3 +1,5 @@
+xpack.security.enabled: true
+
 # ======================== Elasticsearch Configuration =========================
 #
 # NOTE: Elasticsearch comes with reasonable defaults for most settings.

```

step 3.

```auto
$ cd kibana-7.15.1-linux-x86_64
$ cp config/kibana.yml config/kibana.yml.orig
$ vi config/kibana.yml
(add "server.host", "elasticsearch.username", "elasticsearch.password")
$ diff -u config/kibana.yml.orig config/kibana.yml
--- config/kibana.yml.orig 2021-12-02 17:40:52.814875169 +0900
+++ config/kibana.yml 2021-12-02 17:15:39.903397334 +0900
@@ -5,6 +5,7 @@
 # The default is 'localhost', which usually means remote machines will not be able to connect.
 # To allow connections from remote users, set this parameter to a non-loopback address.
 #server.host: "localhost"
+server.host: "192.168.56.103"

 # Enables you to specify a path to mount Kibana at if you are running behind a proxy.
 # Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
@@ -42,8 +43,8 @@
 # the username and password that the Kibana server uses to perform maintenance on the Kibana
 # index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
 # is proxied through the Kibana server.
-#elasticsearch.username: "kibana_system"
-#elasticsearch.password: "pass"
+elasticsearch.username: "kibana_system"
+elasticsearch.password: "kibana_system_password"

 # Kibana can also authenticate to Elasticsearch via "service account tokens".
 # If may use this token instead of a username/password.

```

step 4.

```auto
$ elasticsearch-7.15.1/bin/elasticsearch (leave it running)

```

step 5.

```auto
$ elasticsearch-7.15.1/bin/elasticsearch-setup-passwords interactive
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]: (elastic_password)
Reenter password for [elastic]:
Enter password for [apm_system]: (apm_system_password)
Reenter password for [apm_system]:
Enter password for [kibana_system]: (kibana_system_password)
Reenter password for [kibana_system]:
Enter password for [logstash_system]: (logstash_system_password)
Reenter password for [logstash_system]:
Enter password for [beats_system]: (beats_system_password)
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]: (remote_monitoring_user_password)
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]

$ curl -u elastic:elastic_password http://localhost:9200/
{
  "name" : "elk",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "2iUn6TqeSnuw91kyDPg5Eg",
  "version" : {
    "number" : "7.15.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "83c34f456ae29d60e94d886e455e6a3409bba9ed",
    "build_date" : "2021-10-07T21:56:19.031608185Z",
    "build_snapshot" : false,
    "lucene_version" : "8.9.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
$ curl -u apm_system:apm_system_password http://localhost:9200/
(same as above)
$ curl -u kibana_system:kibana_system_password http://localhost:9200/
(same as above)
$ curl -u logstash_system:logstash_system_password http://localhost:9200/
(same as above)
$ curl -u beats_system:beats_system_password http://localhost:9200/
(same as above)
$ curl -u remote_monitoring_user:remote_monitoring_user_password http://localhost:9200/
(same as above)

```

step 6.

```auto
$ kibana-7.15.1-linux-x86_64/bin/kibana (leave it running)

```

step 7.  
Access [http://192.168.56.103:5601/](http://192.168.56.103:5601/) with a browser.

 ![vanilla-es-kibana-1](https://us1.discourse-cdn.com/elastic/original/3X/0/8/08a683c48ed15951bf4b3c0717ca49a7f7341edd.png)  
 ![vanilla-es-kibana-2](https://us1.discourse-cdn.com/elastic/original/3X/e/1/e1f2eef21e3d48b149ba431dba54de4664543e12.png)  
 ![vanilla-es-kibana-3](https://us1.discourse-cdn.com/elastic/original/3X/1/4/14094455f68a09b78647afcd7af4fcb4adbb7ee2.png)  
 ![vanilla-es-kibana-4](https://us1.discourse-cdn.com/elastic/original/3X/1/f/1f07fb8ffef60e77d0ebb52026a757c2e1463e32.png)

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [December 3, 2021, 4:09am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/2 "2021-12-03T04:09:03Z")

</div>

`kibana_system` is not intended to be used as a login user to Kibana UI.

It only intended use is the user used to login to Elasticsearch from the Kibana server set in the `kibana.yml` file.

`elasticsearch.username`: and `elasticsearch.password`:

The behavior you are seeing is expected.

> kibana\_system  
> The user Kibana uses to connect and communicate with Elasticsearch.

> **[Built-in users | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html)**

> **[Configure Kibana | Kibana Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/kibana/current/settings.html)**

---

<div class="post-metadata">

### Author: ![tadashi.oya](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@tadashi.oya](https://discuss.elastic.co/u/tadashi.oya)
#### Post date: [December 3, 2021, 5:38am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/3 "2021-12-03T05:38:58Z")

</div>

Thank you for your advice.  
It seems I didn't read the documentation enough.  
The procedure I have done was missing items #8 through #11 below.  
(Is "10. Grant users ..." optional?)

> **[Configure security in Kibana | Kibana Guide \[7.15\] | Elastic](https://www.elastic.co/guide/en/kibana/7.15/using-kibana-with-security.html)**
>
> A list of the supported authentication mechanisms in Kibana.

> 1. Temporarily log in to Kibana using the built-in `elastic` superuser so you can create new users and assign roles.

> 1. Create roles and users to grant access to Kibana.

> 1. Grant users access to the indices that they will be working with in Kibana.

> 1. Log out of Kibana and verify that you can log in as a normal user.

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [December 3, 2021, 6:32am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/4 "2021-12-03T06:32:57Z")

</div>

Yes create roles with permissions / access to indices etc then assign roles to users. Pretty standard RBAC approach.

---

<div class="post-metadata">

### Author: ![tadashi.oya](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@tadashi.oya](https://discuss.elastic.co/u/tadashi.oya)
#### Post date: [December 3, 2021, 7:38am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/5 "2021-12-03T07:38:40Z")

</div>

Thanks a lot!

I can now view the dashboard by performing steps #8, #9 and #11.

> **[Configure security in Kibana | Kibana Guide \[7.15\] | Elastic](https://www.elastic.co/guide/en/kibana/7.15/using-kibana-with-security.html)**
>
> A list of the supported authentication mechanisms in Kibana.

> 1. Temporarily log in to Kibana using the built-in `elastic` superuser

> 1. Create roles and users to grant access to Kibana.

I have created a user "tadashi".  
And assigned the kibana\_admin role to the user "tadashi".

> 1. Log out of Kibana and verify that you can log in as a normal user.

Success to log in as the user "tadashi".

Thanks again.

---

<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 31, 2021, 7:39am UTC](https://discuss.elastic.co/t/when-i-log-in-to-kibana-as-kibana-system-user-it-says-you-do-not-have-permission/290837/6 "2021-12-31T07:39:34Z")

</div>

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