diff options
author | Simo Sorce <idra@samba.org> | 2010-07-18 20:04:42 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-18 20:04:42 -0400 |
commit | 7e4de49bfceed18c81abf93703a61d0a22617a24 (patch) | |
tree | 37b74b75d0edcfe28ce4d9898c0889a74b262492 /testprogs/blackbox/test_ktpass.sh | |
parent | 378e4d5b8d30733f0f28cc2bceb28d9b9b594707 (diff) | |
parent | 27aece72004a84a6e0b2e00987d8a362e307d1d8 (diff) | |
download | samba-7e4de49bfceed18c81abf93703a61d0a22617a24.tar.gz samba-7e4de49bfceed18c81abf93703a61d0a22617a24.tar.bz2 samba-7e4de49bfceed18c81abf93703a61d0a22617a24.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'testprogs/blackbox/test_ktpass.sh')
-rwxr-xr-x | testprogs/blackbox/test_ktpass.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/testprogs/blackbox/test_ktpass.sh b/testprogs/blackbox/test_ktpass.sh new file mode 100755 index 0000000000..b106d50240 --- /dev/null +++ b/testprogs/blackbox/test_ktpass.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then +cat <<EOF +Usage: blackbox_newuser.sh PREFIX +EOF +exit 1; +fi + +PREFIX="$1" +shift 1 + +. `dirname $0`/subunit.sh + + +net="$BUILDDIR/bin/net" +samba4bindir="$BUILDDIR/bin" +samba4kinit="$samba4bindir/samba4kinit$EXEEXT" +CONFIG="--configfile=$PREFIX/dc/etc/smb.conf" + +#two test for creating new user +#newuser account is created with cn=Given Name Initials. Surname +#newuser1 account is created using cn=username +testit "newuser" $net newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" testuser testp@ssw0Rd|| failed=`expr $failed + 1` + +KRB5CCNAME="$PREFIX/tmpccache" +export KRB5CCNAME +echo "testp@ssw0Rd" >$PREFIX/tmppassfile +testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile testuser@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1` +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` + +rm -f $KRB5CCNAME + +testit "kinit with keytab" $samba4kinit -e arcfour-hmac-md5 --use-keytab -t $PREFIX/testuser.kt testuser@SAMBA.EXAMPLE.COM || failed=`expr $failed + 1` + +rm -f $PREFIX/tmpccache $PREFIX/testuser.kt +exit $failed |