1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

tests: Add a test for "all_groups=no" to test_idmap_ad.sh

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15605

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Tue Apr  2 13:25:39 UTC 2024 on atb-devel-224

(cherry picked from commit f8b72aa1f7)

Autobuild-User(v4-20-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-20-test): Wed Apr 17 14:38:42 UTC 2024 on atb-devel-224
This commit is contained in:
Pavel Filipenský 2024-03-14 15:24:21 +01:00 committed by Jule Anger
parent 84f82a09ff
commit 83da49f348

View File

@ -94,6 +94,14 @@ gidNumber: 2000001
unixHomeDirectory: /home/forbidden unixHomeDirectory: /home/forbidden
loginShell: /bin/tcsh loginShell: /bin/tcsh
gecos: User in forbidden OU gecos: User in forbidden OU
dn: CN=no_posix_id,CN=Users,$BASE_DN
changetype: add
objectClass: user
samaccountName: no_posix_id
unixHomeDirectory: /home/no_posix_id
loginShell: /bin/sh
gecos: User without uidNumber and gidNumber
EOF EOF
# #
@ -171,6 +179,17 @@ then
failed=$(($failed + 1)) failed=$(($failed + 1))
fi fi
#
# Test 6: Make sure that with the default "all_groups=no"
# the group "domain users" will not show user "no_posix_id"
# but will show "SAMBA2008R2/administrator"
#
dom_users="$DOMAIN/domain users" # Extra step to make sure that all is one word
out="$($wbinfo --group-info "$dom_users")"
testit_grep_count "no_posix_id1" "no_posix_id" 0 echo "$out" || failed=$(expr $failed + 1)
testit_grep "no_posix_id2" "SAMBA2008R2/administrator" echo "$out" || failed=$(expr $failed + 1)
# #
# Trusted domain test 1: Test uid of Administrator, should be 2500000 # Trusted domain test 1: Test uid of Administrator, should be 2500000
# #
@ -241,6 +260,9 @@ gidNumber: 2000002
dn: cn=forbidden,ou=sub,$BASE_DN dn: cn=forbidden,ou=sub,$BASE_DN
changetype: delete changetype: delete
dn: CN=no_posix_id,CN=Users,$BASE_DN
changetype: delete
dn: ou=sub,$BASE_DN dn: ou=sub,$BASE_DN
changetype: delete changetype: delete
EOF EOF