# Getting "security\_exception: action \[indices:admin/settings/update\] is unauthorized" on indexes with policies updated by a new user

**URL:** <https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 9, 2020, 10:57pm UTC](https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198 "2020-12-09T22:57:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prolbrakels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prolbrakels/32/80541_2.png) [@prolbrakels](https://discuss.elastic.co/u/prolbrakels)\
**Post date:** [December 9, 2020, 10:57pm UTC](https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198/1 "2020-12-09T22:57:30Z")

</div>

This is for an ES cluster running v7.8.1.

I'm trying to automate pushing updates to our ILM policies and (legacy) templates, so I have a shell script that curls the appropriate json via a new ES user called "template\_manager" (user was created by hand via Kibana). This user has a single "template\_manager" role with the cluster permissions "manage\_ilm" and "manage\_index\_templates". After I run my script using this user's credentials, the indexes using the updated policies show errors like these:

```auto
security_exception: action [indices:admin/rollover] is unauthorized for user [template_manager]

```

and

```auto
security_exception: action [indices:admin/settings/update] is unauthorized for user [template_manager]

```

It seems this user needs additional credentials? How do I line up these error messages with the permissions I need to give the account?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [December 10, 2020, 6:09am UTC](https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198/2 "2020-12-10T06:09:04Z")

</div>

The role would need to contain the [`manage` index privilege](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html) which will allow your user to perform these two actions

---

<div class="post-metadata">

**Author:** ![prolbrakels](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prolbrakels/32/80541_2.png) [@prolbrakels](https://discuss.elastic.co/u/prolbrakels)\
**Post date:** [December 10, 2020, 7:58pm UTC](https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198/3 "2020-12-10T19:58:18Z")

</div>

That seems to have done it. Thanks!

---

<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:** [January 7, 2021, 7:58pm UTC](https://discuss.elastic.co/t/getting-security-exception-action-indices-admin-settings-update-is-unauthorized-on-indexes-with-policies-updated-by-a-new-user/258198/4 "2021-01-07T19:58:28Z")

</div>

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