diff options
Diffstat (limited to 'scripts/sudorule-mod.sh')
-rwxr-xr-x | scripts/sudorule-mod.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/sudorule-mod.sh b/scripts/sudorule-mod.sh new file mode 100755 index 0000000..25d28c6 --- /dev/null +++ b/scripts/sudorule-mod.sh @@ -0,0 +1,30 @@ +#!/bin/sh +x + +. ./include.sh + +json="{ + \"method\": \"sudorule_mod\", + \"params\": [ + [ \"test\" ], + { + \"description\": \"Test Rule\", + \"usercategory\": \"all\", + \"hostcategory\": \"all\", + \"cmdcategory\": \"all\", + \"ipasudorunasusercategory\": \"all\", + \"ipasudorunasgroupcategory\": \"all\", + \"all\": true, + \"rights\": true + } + ], + \"id\": 0 +}"\ + +curl\ + -H "Content-Type:application/json"\ + -H "Accept:applicaton/json"\ + --negotiate -u :\ + --cacert /etc/ipa/ca.crt\ + -d "$json"\ + -X POST\ + $IPA_JSON_URL |