mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
selftest: Add gid-to-sid lookup to idmap_ad test
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d7b5ad5e6159c224f70bea782bbdc46059e67978)
This commit is contained in:
parent
9c167fa862
commit
38746ec0a3
@ -49,6 +49,13 @@ add: gidNumber
|
||||
gidNumber: 2000001
|
||||
EOF
|
||||
|
||||
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
||||
dn: CN=Domain Admins,CN=Users,$BASE_DN
|
||||
changetype: modify
|
||||
add: gidNumber
|
||||
gidNumber: 2000002
|
||||
EOF
|
||||
|
||||
#
|
||||
# Test 1: Test uid of Administrator, should be 2000000
|
||||
#
|
||||
@ -79,6 +86,16 @@ test "$out" = "$DOMAIN/administrator:*:2000000:2000001::/home/$DOMAIN/administra
|
||||
ret=$?
|
||||
testit "Test get userinfo for Administrator works" test $ret -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
#
|
||||
# Test 4: Test lookup from gid to sid
|
||||
#
|
||||
|
||||
out="$($wbinfo -G 2000002)"
|
||||
echo "wbinfo returned: \"$out\", expecting \"$DOMAIN_SID-512\""
|
||||
test "$out" = "$DOMAIN_SID-512"
|
||||
ret=$?
|
||||
testit "Test gid lookup of Domain Admins" test $ret -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
#
|
||||
# Remove POSIX ids from AD
|
||||
#
|
||||
@ -96,4 +113,11 @@ delete: gidNumber
|
||||
gidNumber: 2000001
|
||||
EOF
|
||||
|
||||
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
||||
dn: CN=Domain Admins,CN=Users,$BASE_DN
|
||||
changetype: modify
|
||||
delete: gidNumber
|
||||
gidNumber: 2000002
|
||||
EOF
|
||||
|
||||
exit $failed
|
||||
|
Loading…
x
Reference in New Issue
Block a user