Modify Roles & Permissions through API/bash script

Hey guys, after I set up LDAP successfully and adding /opt/omd/sites/dev/etc/check_mk/multisite.d/wato/user_connections.mk to our deploy script, I would like to update the Roles & permissions and change some defaults in our setup. How can I do this in a scripted/automated way, when we redeploy our CMK instance?
No file in conf.d/wato is changed, after I change it in the webui, see

Here is a ls -l (contacts changes because I set the LDAP sync to every 10 minutes):

root@ce9874436c12:/opt/omd/sites/dev/etc/check_mk/conf.d/wato# ls -l
total 56
-rw-rw---- 1 dev  dev  8721 Mar 23 13:22 contacts.mk
-rw-rw---- 1 dev  dev  1780 Mar 23 13:10 global.mk
-rw-rw---- 1 dev  dev   140 Mar 23 13:10 groups.mk
-rw-rw---- 1 dev  dev  4154 Mar 23 13:10 hosts.mk
-rw-rw---- 1 dev  dev  1424 Mar 23 13:10 hosts.pkl
-rw-r--r-- 1 root root  766 Mar 23 13:10 notifications.mk
-rw-rw---- 1 dev  dev  4157 Mar 23 13:10 rules.mk
-rw-rw---- 1 dev  dev   665 Mar 23 13:10 tags.mk

So, which .mk file do I need to change to edit the defaults? I can’t find any API request which lets me change the defaults for Roles & permissions too :frowning:

Hi Peter, you are looking for ~/etc/check_mk/multisite.d/wato/roles.mk :slight_smile: see Agent registration role - Checkmk Knowledge Base - Checkmk Knowledge Base as an example

Gerd

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.