summaryrefslogtreecommitdiffstats
path: root/scripts/user-memberof-group.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/user-memberof-group.sh')
-rwxr-xr-xscripts/user-memberof-group.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/user-memberof-group.sh b/scripts/user-memberof-group.sh
new file mode 100755
index 0000000..0895546
--- /dev/null
+++ b/scripts/user-memberof-group.sh
@@ -0,0 +1,42 @@
+#!/bin/sh +x
+
+. ./include.sh
+
+json="{
+ \"method\": \"batch\",
+ \"params\": [
+ [
+ {
+ \"method\": \"group_show\",
+ \"params\": [
+ [ \"ipausers\" ],
+ {
+ \"all\": true,
+ \"rigts\": true
+ }
+ ]
+ },
+ {
+ \"method\": \"group_show\",
+ \"params\": [
+ [ \"editors\" ],
+ {
+ \"all\": true,
+ \"rigts\": 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