summaryrefslogtreecommitdiff
path: root/testprogs/blackbox/test_kinit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testprogs/blackbox/test_kinit.sh')
-rwxr-xr-xtestprogs/blackbox/test_kinit.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/testprogs/blackbox/test_kinit.sh b/testprogs/blackbox/test_kinit.sh
index dbcdcf1112..db4b65f327 100755
--- a/testprogs/blackbox/test_kinit.sh
+++ b/testprogs/blackbox/test_kinit.sh
@@ -25,21 +25,7 @@ samba4kinit=$samba4bindir/samba4kinit
net=$samba4bindir/net
enableaccount="$samba4bindir/smbpython `dirname $0`/../../source/setup/enableaccount"
-testit() {
- name="$1"
- shift
- cmdline="$*"
- echo "test: $name"
- $cmdline
- status=$?
- if [ x$status = x0 ]; then
- echo "success: $name"
- else
- echo "failure: $name"
- fi
- return $status
-}
-
+. `dirname $0`/subunit.sh
test_smbclient() {
name="$1"
@@ -86,6 +72,14 @@ testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tm
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
+NEWUSERPASS=testPaSS@34%
+testit "change user password" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
+
+echo $NEWUSERPASS > ./tmpuserpassfile
+testit "kinit with user password" $samba4bindir/samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
+
+test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
+
KRB5CCNAME="$PREFIX/tmpccache"
export KRB5CCNAME