summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2016-09-20 09:46:34 +0200
committerAndreas Schneider <asn@cryptomilk.org>2016-12-21 18:35:12 +0100
commit1aa765d344e148826c75d65c502ee45bc9e8f42c (patch)
treedac4dbe788fb5c9b3deb219850f7f8b9a1d4cc9b /testprogs
parent1a5901440272158025a01a4619c1d178dfefc732 (diff)
downloadsamba-1aa765d344e148826c75d65c502ee45bc9e8f42c.tar.gz
testprogs: Use better KRB5CCNAME in test_password_settings.sh
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/test_password_settings.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_password_settings.sh b/testprogs/blackbox/test_password_settings.sh
index 9436e3039b9..97adb3c9db2 100755
--- a/testprogs/blackbox/test_password_settings.sh
+++ b/testprogs/blackbox/test_password_settings.sh
@@ -87,6 +87,8 @@ testit "kinit with user password" \
test_smbclient "Test login with user kerberos ccache" \
"ls" "$SMB_UNC" -k yes || failed=`expr $failed + 1`
+rm -f $KRB5CCNAME_PATH
+
###########################################################
### Change the users password
###########################################################
@@ -114,6 +116,8 @@ testit_expect_failure "Test login with user kerberos ccache, but wrong password
testit_expect_failure "Test login with user kerberos ccache, but old password specified" \
$VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k yes -U$TEST_PRINCIPAL%$TEST_PASSWORD_OLD && failed=`expr $failed + 1`
+rm -f $KRB5CCNAME_PATH
+
###########################################################
### Set the password with smbpasswd
###########################################################
@@ -150,6 +154,8 @@ TEST_PASSWORD_NEW="testPaSS@05%"
test_smbclient "Test login with user kerberos" 'ls' "$SMB_UNC" -k yes -U$TEST_PRINCIPAL%$TEST_PASSWORD || failed=`expr $failed + 1`
+rm -f $KRB5CCNAME_PATH
+
cat > $PREFIX/tmpsmbpasswdscript <<EOF
expect Old SMB password:
password ${TEST_PASSWORD}\n
@@ -168,6 +174,8 @@ TEST_PASSWORD_NEW="testPaSS@06%"
test_smbclient "Test login with user kerberos" \
"ls" "$SMB_UNC" -k yes -U$TEST_PRINCIPAL%$TEST_PASSWORD || failed=`expr $failed + 1`
+rm -f $KRB5CCNAME_PATH
+
testit_expect_failure "try to set a non-complex password (command should not succeed)" \
$VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/$TEST_USERNAME%$TEST_PASSWORD" -k no --newpassword="$TEST_PASSWORD_WEAK" && failed=`expr $failed + 1`