s4:samldb LDB module - make the "userAccountControl" and "groupType" modify handlers...
[Samba.git] / testprogs / blackbox / test_ktpass.sh
blob579389f97eabf1386b9c39a925ee62accedabcf9
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: blackbox_newuser.sh PREFIX
6 EOF
7 exit 1;
8 fi
10 PREFIX="$1"
11 shift 1
13 . `dirname $0`/subunit.sh
16 samba_tool="$BUILDDIR/bin/samba-tool"
17 samba4bindir="$BUILDDIR/bin"
18 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
19 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
21 TESTUSER="ktpassUser"
23 testit "newuser" $samba_tool newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
25 KRB5CCNAME="$PREFIX/tmpccache"
26 export KRB5CCNAME
27 echo "testp@ssw0Rd" >$PREFIX/tmppassfile
28 testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
29 testit "ktpass" $BUILDDIR/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
31 rm -f $KRB5CCNAME
33 testit "kinit with keytab" $samba4kinit -e arcfour-hmac-md5 --use-keytab -t $PREFIX/testuser.kt $TESTUSER@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1`
35 rm -f $PREFIX/tmpccache $PREFIX/testuser.kt
36 exit $failed