From ddc153ad951d8bf2125bf64f2e06013730f8bee1 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 11 Jun 2012 21:16:05 -0500 Subject: Added scripts for test data. --- scripts/sudorule-mod.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/sudorule-mod.sh (limited to 'scripts/sudorule-mod.sh') 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 -- cgit