summaryrefslogtreecommitdiffstats
path: root/scripts/sudocmdgroup-member-sudocmd.sh
blob: dc224f47792bdb3427a4123f188efcba03e375af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh +x

. ./include.sh

json="{
    \"method\": \"batch\",
    \"params\": [
        [
            {
                \"method\": \"sudocmd_show\",
                \"params\": [
                    [ \"/usr/bin/more\" ],
                    {
                        \"all\": true,
                        \"rigts\": true
                    }
                ]
            },
            {
                \"method\": \"sudocmd_show\",
                \"params\": [
                    [ \"/usr/bin/less\" ],
                    {
                        \"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