#!/bin/sh # Blackbox tests for kinit and kerberos integration with smbclient etc # Copyright (C) 2006-2007 Jelmer Vernooij # Copyright (C) 2006-2008 Andrew Bartlett if [ $# -lt 5 ]; then cat < $PREFIX/tmpuserpassfile testit "kinit with user password" $samba4kinit --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1` test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1` NEWUSERPASS=testPaSS@01% testit "change user password with 'samba-tool user password' (unforced)" $VALGRIND $samba_tool user password -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no --newpassword=$NEWUSERPASS $@ || failed=`expr $failed + 1` echo $NEWUSERPASS > ./tmpuserpassfile testit "kinit with user password" $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` USERPASS=$NEWUSERPASS WEAKPASS=testpass1 NEWUSERPASS=testPaSS@02% # password mismatch check doesn't work yet (kpasswd bug, reported to Love) #echo "check that password mismatch gives the right error" #cat > ./tmpkpasswdscript < ./tmpkpasswdscript < ./tmpkpasswdscript < ./tmpkpasswdscript < ./tmpsmbpasswdscript < ./tmpkpasswdscript < ./tmpsmbpasswdscript <