diff options
Diffstat (limited to 'scripts/sudorule-add.sh')
-rwxr-xr-x | scripts/sudorule-add.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/sudorule-add.sh b/scripts/sudorule-add.sh new file mode 100755 index 0000000..ba87f0a --- /dev/null +++ b/scripts/sudorule-add.sh @@ -0,0 +1,26 @@ +#!/bin/sh +x + +. ./include.sh + +json="{ + \"method\": \"sudorule_add\", + \"params\": [ + [ \"test\" ], + { + \"description\": \"test\", + \"cmdcategory\": \"\", + \"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 |