# Role Mapping Error

**URL:** <https://forum.search-guard.com/t/role-mapping-error/1909>\
**Category:** Search Guard\
**Created:** [July 30, 2020, 6:36pm UTC](https://forum.search-guard.com/t/role-mapping-error/1909 "2020-07-30T18:36:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManojKumar](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@ManojKumar](https://forum.search-guard.com/u/ManojKumar)\
**Post date:** [July 30, 2020, 6:36pm UTC](https://forum.search-guard.com/t/role-mapping-error/1909/1 "2020-07-30T18:36:53Z")

</div>

Hi,  
I have some basics knowledge in linux commands and entry level in security.  
I just started working in Kibana. I’m facing a error when i add user and commit them.

Command: /usr/share/elasticsearch/plugins/search-guard-6/tools/sgadmin.sh -cd /usr/share/elasticsearch/plugins/search-guard-6/sgconfig -icl -nhnv -cert /etc/elasticsearch/certs/adminuser.pem -key /etc/elasticsearch/certs/adminuser.key cacert /etc/elasticsearch/certs/root-ca.pem -keypass xxxxx@xxx

Error: will update ‘sg/rolemapping’ with /usr/share/elasticsearch/plugins/search-guard-6/sgconfig/sg\_roles\_mapping.yml  
Fail: configuration for ‘rolemapping’ failed beacuse of SettingsException[Failed to load settings from [dummy.json]]; nested: ParsingException[Failed to parse object: expecting token of type [START\_OBJECT] but found [[VALUE\_STRING]];

Note: I could figure out that this is a configuration syntax error. But i’m unable to figure it out.  
Thank you. Have a great day.

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 30, 2020, 7:03pm UTC](https://forum.search-guard.com/t/role-mapping-error/1909/2 "2020-07-30T19:03:38Z")

</div>

When executing the sgadmin command, sgadmin would read the configuration file from this directory:

> [@ManojKumar](#):
>
> /usr/share/elasticsearch/plugins/search-guard-6/sgconfig

What files do you have in this directory? Can you post your sg\_roles\_mapping.yml, please? Also, what does dummy.json refer to? The config files have to be in YAML format, not JSON.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/system/32/1870_2.png) [@system](https://forum.search-guard.com/u/system)\
**Post date:** [August 20, 2020, 7:03pm UTC](https://forum.search-guard.com/t/role-mapping-error/1909/3 "2020-08-20T19:03:41Z")

</div>

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