diff options
author | Noel Power <noel.power@suse.com> | 2018-05-15 18:27:23 +0100 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-05-17 11:31:28 +0200 |
commit | a8d8c6ec439fb64ce33dc2406bb38792050ca3a1 (patch) | |
tree | f8ed9497e50aeb43f970d21e8edbbacf3057ae6f /testprogs | |
parent | 7102732b25dfcd5e6815159e3043eed240e918d3 (diff) | |
download | samba-a8d8c6ec439fb64ce33dc2406bb38792050ca3a1.tar.gz |
testprogs/blackbox: Add test to set and use password with non-ascii
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-x | testprogs/blackbox/test_password_settings.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_password_settings.sh b/testprogs/blackbox/test_password_settings.sh index 49d512692f5..1edf2bfa921 100755 --- a/testprogs/blackbox/test_password_settings.sh +++ b/testprogs/blackbox/test_password_settings.sh @@ -64,6 +64,7 @@ testit "reset password policies beside of minimum password age of 0 days" \ TEST_USERNAME="$(mktemp -u alice-XXXXXX)" TEST_PASSWORD="testPaSS@00%" TEST_PASSWORD_NEW="testPaSS@01%" +TEST_PASSWORD_NON_ASCII="Täst123" TEST_PASSWORD_SHORT="secret" TEST_PASSWORD_WEAK="Supersecret" TEST_PRINCIPAL="$TEST_USERNAME@$REALM" @@ -106,6 +107,22 @@ testit "kinit with user password" \ test_smbclient "Test login with user kerberos ccache" \ "ls" "$SMB_UNC" -k yes || failed=`expr $failed + 1` +########################################################### +### Change the users password +########################################################### + +testit "change user (non-ascii) password with 'samba-tool user password' (unforced)" \ + $VALGRIND $samba_tool user password -W$DOMAIN -U$TEST_USERNAME%$TEST_PASSWORD -k no --newpassword=$TEST_PASSWORD_NON_ASCII || failed=`expr $failed + 1` + +TEST_PASSWORD_OLD=$TEST_PASSWORD_NEW +TEST_PASSWORD=$TEST_PASSWORD_NON_ASCII + +testit "kinit with user password" \ + do_kinit $TEST_PRINCIPAL $TEST_PASSWORD || failed=`expr $failed + 1` + +test_smbclient "Test login with user kerberos ccache" \ + "ls" "$SMB_UNC" -k yes || failed=`expr $failed + 1` + # # These tests demonstrate that a credential cache in the environment does not # override a username/password, even an incorrect one, on the command line |