mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
tests: Make sure that idmap_ad retrieves unix nss attributes
Make sure that unix_primary_group and unix_nss_info idmap_ad options work. We have two domains here and test wbinfo -i for both domains, so we also run the test without those options for the trusted domain. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 2 10:35:53 UTC 2020 on sn-devel-184
This commit is contained in:
parent
1ba15c459b
commit
50d900b6f9
@ -55,6 +55,14 @@ dn: CN=Administrator,CN=Users,$BASE_DN
|
|||||||
changetype: modify
|
changetype: modify
|
||||||
add: uidNumber
|
add: uidNumber
|
||||||
uidNumber: 2000000
|
uidNumber: 2000000
|
||||||
|
add: gidNumber
|
||||||
|
gidNumber: 2000100
|
||||||
|
add: unixHomeDirectory
|
||||||
|
unixHomeDirectory: /home/admin
|
||||||
|
add: loginShell
|
||||||
|
loginShell: /bin/tcsh
|
||||||
|
add: gecos
|
||||||
|
gecos: Administrator Full Name
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
||||||
@ -123,8 +131,8 @@ testit "Test uid of Domain Users is 2000001" test $ret -eq 0 || failed=$(expr $f
|
|||||||
#
|
#
|
||||||
|
|
||||||
out="$($wbinfo -i $DOMAIN/Administrator)"
|
out="$($wbinfo -i $DOMAIN/Administrator)"
|
||||||
echo "wbinfo returned: \"$out\", expecting \"$DOMAIN/administrator:*:2000000:2000001::/home/$DOMAIN/administrator:/bin/false\""
|
echo "wbinfo returned: \"$out\", expecting \"$DOMAIN/administrator:*:2000000:2000100:Administrator Full Name:/home/admin:/bin/tcsh\""
|
||||||
test "$out" = "$DOMAIN/administrator:*:2000000:2000001::/home/$DOMAIN/administrator:/bin/false"
|
test "$out" = "$DOMAIN/administrator:*:2000000:2000100:Administrator Full Name:/home/admin:/bin/tcsh"
|
||||||
ret=$?
|
ret=$?
|
||||||
testit "Test get userinfo for Administrator works" test $ret -eq 0 || failed=$(expr $failed + 1)
|
testit "Test get userinfo for Administrator works" test $ret -eq 0 || failed=$(expr $failed + 1)
|
||||||
|
|
||||||
@ -186,6 +194,14 @@ dn: CN=Administrator,CN=Users,$BASE_DN
|
|||||||
changetype: modify
|
changetype: modify
|
||||||
delete: uidNumber
|
delete: uidNumber
|
||||||
uidNumber: 2000000
|
uidNumber: 2000000
|
||||||
|
delete: gidNumber
|
||||||
|
gidNumber: 2000100
|
||||||
|
delete: unixHomeDirectory
|
||||||
|
unixHomeDirectory: /home/admin
|
||||||
|
delete: loginShell
|
||||||
|
loginShell: /bin/tcsh
|
||||||
|
delete: gecos
|
||||||
|
gecos: Administrator Full Name
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
cat <<EOF | $ldbmodify -H ldap://$DC_SERVER -U "$DOMAIN\Administrator%$DC_PASSWORD"
|
||||||
|
@ -1059,6 +1059,8 @@ sub setup_ad_member_idmap_ad
|
|||||||
idmap config * : range = 1000000-1999999
|
idmap config * : range = 1000000-1999999
|
||||||
idmap config $dcvars->{DOMAIN} : backend = ad
|
idmap config $dcvars->{DOMAIN} : backend = ad
|
||||||
idmap config $dcvars->{DOMAIN} : range = 2000000-2999999
|
idmap config $dcvars->{DOMAIN} : range = 2000000-2999999
|
||||||
|
idmap config $dcvars->{DOMAIN} : unix_primary_group = yes
|
||||||
|
idmap config $dcvars->{DOMAIN} : unix_nss_info = yes
|
||||||
idmap config $dcvars->{TRUST_DOMAIN} : backend = ad
|
idmap config $dcvars->{TRUST_DOMAIN} : backend = ad
|
||||||
idmap config $dcvars->{TRUST_DOMAIN} : range = 2000000-2999999
|
idmap config $dcvars->{TRUST_DOMAIN} : range = 2000000-2999999
|
||||||
gensec_gssapi:requested_life_time = 5
|
gensec_gssapi:requested_life_time = 5
|
||||||
|
Loading…
Reference in New Issue
Block a user