s4:kinit blackbox test - set/reset also here the "minPwdAge"
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 3 Jul 2010 13:52:00 +0000 (15:52 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 3 Jul 2010 14:08:24 +0000 (16:08 +0200)
testprogs/blackbox/test_kinit.sh

index 03734520429b2f862f7f213b717065553a57448e..a32d167cfe53afaab79a2f0326c8bc73624b60a2 100755 (executable)
@@ -51,9 +51,14 @@ test_smbclient() {
 
 enctype="-e $ENCTYPE"
 
+PWSETCONFIG="-H ldap://$SERVER -U$USERNAME%$PASSWORD"
+export PWSETCONFIG
+
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
 
+testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $net pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
+
 echo $PASSWORD > ./tmppassfile
 #testit "kinit with keytab" $samba4kinit $enctype --keytab=$PREFIX/dc/private/secrets.keytab $SERVER\$@$REALM   || failed=`expr $failed + 1`
 testit "kinit with password" $samba4kinit $enctype --password-file=./tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
@@ -165,5 +170,7 @@ rm -f $KRB5CCNAME
 testit "kinit with machineaccountccache script" $machineaccountccache $CONFIGURATTION $KRB5CCNAME || failed=`expr $failed + 1`
 test_smbclient "Test machine account login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
 
+testit "reset password policies" $VALGRIND $net pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
+
 rm -f $PREFIX/tmpccache tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
 exit $failed