diff options
author | Andrew Tridgell <tridge@samba.org> | 2012-11-01 14:11:02 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2012-11-01 07:21:17 +0100 |
commit | dd60dcf343bfb8286951d3109055693634574d8b (patch) | |
tree | 67f54c2283f38c0fad9e572318d86b04c5f73633 | |
parent | 0e6c5c036f8faddcc6ca65c26453ffaf248ed2b5 (diff) | |
download | samba-dd60dcf343bfb8286951d3109055693634574d8b.tar.gz samba-dd60dcf343bfb8286951d3109055693634574d8b.tar.bz2 samba-dd60dcf343bfb8286951d3109055693634574d8b.zip |
test-chgdcpass: test the ldap case for server password change
use samba-tool drs options which does both RPC and LDAP connections
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Tridgell <tridge@samba.org>
Autobuild-Date(master): Thu Nov 1 07:21:17 CET 2012 on sn-devel-104
-rwxr-xr-x | testprogs/blackbox/test_chgdcpass.sh | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/testprogs/blackbox/test_chgdcpass.sh b/testprogs/blackbox/test_chgdcpass.sh index d588394970..d4734ea028 100755 --- a/testprogs/blackbox/test_chgdcpass.sh +++ b/testprogs/blackbox/test_chgdcpass.sh @@ -45,12 +45,14 @@ test_smbclient() { return $status } -test_drsbind() { - name="$1" +test_drs() { + function="$1" + name="$2" + shift shift echo "test: $name" - echo $VALGRIND $samba4bindir/samba-tool drs bind $SERVER -k yes $@ - $VALGRIND $samba4bindir/samba-tool drs bind $SERVER -k yes $@ + echo $VALGRIND $samba4bindir/samba-tool drs $function $SERVER -k yes $@ + $VALGRIND $samba4bindir/samba-tool drs $function $SERVER -k yes $@ status=$? if [ x$status = x0 ]; then echo "success: $name" @@ -70,24 +72,33 @@ testit "kinit with keytab" $samba4kinit $enctype -t $PROVDIR/private/secrets.key #This is important because it puts the ticket for the old KVNO and password into a local ccache test_smbclient "Test login with kerberos ccache before password change" 'ls' -k yes || failed=`expr $failed + 1` +#check that drs bind works before we change the password (prime the ccache) +test_drs bind "Test drs bind with with kerberos ccache" || failed=`expr $failed + 1` + #check that drs options works before we change the password (prime the ccache) -test_drsbind "Test drs options with with kerberos ccache" || failed=`expr $failed + 1` +test_drs options "Test drs options with with kerberos ccache" || failed=`expr $failed + 1` testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` #This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed test_smbclient "Test login with kerberos ccache after password change" 'ls' -k yes || failed=`expr $failed + 1` +#check that drs bind works after we change the password +test_drs bind "Test drs bind with new password" || failed=`expr $failed + 1` + #check that drs options works after we change the password -test_drsbind "Test drs options with new password" || failed=`expr $failed + 1` +test_drs options "Test drs options with new password" || failed=`expr $failed + 1` testit "change dc password (2nd time)" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` #This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC pass test_smbclient "Test login with kerberos ccache after 2nd password change" 'ls' -k yes || failed=`expr $failed + 1` +#check that drs bind works after we change the password a 2nd time +test_drs bind "Test drs bind after 2nd password change" || failed=`expr $failed + 1` + #check that drs options works after we change the password a 2nd time -test_drsbind "Test drs options after 2nd password change" || failed=`expr $failed + 1` +test_drs options "Test drs options after 2nd password change" || failed=`expr $failed + 1` #This confirms that the DC password is valid for a kinit too testit "kinit with keytab" $samba4kinit $enctype -t $PROVDIR/private/secrets.keytab --use-keytab $USERNAME || failed=`expr $failed + 1` |