Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

Location:
vendor/current/testprogs/blackbox
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/testprogs/blackbox/subunit.sh

    r414 r740  
    3030}
    3131
     32# This is just a hack as we have some broken scripts
     33# which use "exit $failed", without initializing failed.
     34failed=0
    3235
    3336subunit_fail_test () {
     
    8184        return $status
    8285}
     86
     87testok () {
     88        name=`basename $1`
     89        shift
     90        failed=$2
     91        shift
     92
     93        exit $failed
     94}
     95
     96# work out the top level source directory
     97if [ -d source4 ]; then
     98    SRCDIR="."
     99else
     100    SRCDIR=".."
     101fi
     102export SRCDIR
  • vendor/current/testprogs/blackbox/test_export_keytab.sh

    r414 r740  
    2222smbclient="$samba4bindir/smbclient$EXEEXT"
    2323samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    24 net="$samba4bindir/net$EXEEXT"
    25 newuser="$PYTHON `dirname $0`/../../source4/setup/newuser"
     24samba_tool="$samba4bindir/samba-tool$EXEEXT"
     25newuser="$samba_tool newuser"
    2626
    2727. `dirname $0`/subunit.sh
     
    4747testit "create user locally" $VALGRIND $newuser nettestuser $USERPASS $@ || failed=`expr $failed + 1`
    4848
    49 testit "export keytab from domain" $VALGRIND $net export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
    50 testit "export keytab from domain (2nd time)" $VALGRIND $net export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
     49testit "export keytab from domain" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
     50testit "export keytab from domain (2nd time)" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
    5151
    5252KRB5CCNAME="$PREFIX/tmpuserccache"
    5353export KRB5CCNAME
    5454
    55 testit "kinit with keytab as user" $samba4kinit --keytab=$PREFIX/tmpkeytab --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     55testit "kinit with keytab as user" $VALGRIND $samba4kinit --keytab=$PREFIX/tmpkeytab --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    5656
    5757test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     
    6060export KRB5CCNAME
    6161
    62 testit "kinit with keytab as $USERNAME" $samba4kinit --keytab=$PREFIX/tmpkeytab --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
     62testit "kinit with keytab as $USERNAME" $VALGRIND $samba4kinit --keytab=$PREFIX/tmpkeytab --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
    6363
    64 testit "del user" $VALGRIND $net user delete nettestuser -k yes $@ || failed=`expr $failed + 1`
     64testit "del user" $VALGRIND $samba_tool user delete nettestuser -k yes $@ || failed=`expr $failed + 1`
    6565
    66 rm -f tmpadminccache tmpuserccache tmpkeytab
     66rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab
    6767exit $failed
  • vendor/current/testprogs/blackbox/test_kinit.sh

    r414 r740  
    1717DOMAIN=$5
    1818PREFIX=$6
    19 shift 6
     19ENCTYPE=$7
     20shift 7
    2021failed=0
    2122
    2223samba4bindir="$BUILDDIR/bin"
     24samba4srcdir="$SRCDIR/source4"
    2325smbclient="$samba4bindir/smbclient$EXEEXT"
    2426samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    25 net="$samba4bindir/net$EXEEXT"
     27samba_tool="$samba4bindir/samba-tool$EXEEXT"
     28ldbmodify="$samba4bindir/ldbmodify$EXEEXT"
     29ldbsearch="$samba4bindir/ldbsearch$EXEEXT"
    2630rkpty="$samba4bindir/rkpty$EXEEXT"
    2731samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
    28 enableaccount="$PYTHON `dirname $0`/../../source4/setup/enableaccount"
     32enableaccount="$samba_tool enableaccount"
     33machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
    2934
    3035. `dirname $0`/subunit.sh
     
    4651}
    4752
     53enctype="-e $ENCTYPE"
     54
     55PWSETCONFIG="-H ldap://$SERVER -U$USERNAME%$PASSWORD"
     56export PWSETCONFIG
     57
    4858KRB5CCNAME="$PREFIX/tmpccache"
    4959export KRB5CCNAME
    5060
    51 echo $PASSWORD > ./tmppassfile
    52 #testit "kinit with keytab" $samba4kinit --keytab=$PREFIX/dc/private/secrets.keytab $SERVER\$@$REALM   || failed=`expr $failed + 1`
    53 testit "kinit with password" $samba4kinit --password-file=./tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
    54 testit "kinit with password (enterprise style)" $samba4kinit --enterprise --password-file=./tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
    55 testit "kinit with password (windows style)" $samba4kinit --windows --password-file=./tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
    56 testit "kinit with pkinit (name specified)" $samba4kinit --request-pac --renewable --pk-user=FILE:$PREFIX/dc/private/tls/admincert.pem,$PREFIX/dc/private/tls/adminkey.pem $USERNAME@$REALM || failed=`expr $failed + 1`
    57 testit "kinit with pkinit (enterprise name specified)" $samba4kinit --request-pac --renewable --pk-user=FILE:$PREFIX/dc/private/tls/admincert.pem,$PREFIX/dc/private/tls/adminkey.pem --enterprise $USERNAME@$REALM || failed=`expr $failed + 1`
    58 testit "kinit with pkinit (enterprise name in cert)" $samba4kinit --request-pac --renewable --pk-user=FILE:$PREFIX/dc/private/tls/admincertupn.pem,$PREFIX/dc/private/tls/adminkey.pem --pk-enterprise || failed=`expr $failed + 1`
    59 testit "kinit renew ticket" $samba4kinit --request-pac -R
     61testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
     62
     63echo $PASSWORD > $PREFIX/tmppassfile
     64#testit "kinit with keytab" $samba4kinit $enctype --keytab=$PREFIX/dc/private/secrets.keytab $SERVER\$@$REALM   || failed=`expr $failed + 1`
     65testit "kinit with password" $samba4kinit $enctype --password-file=$PREFIX/tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
     66testit "kinit with password (enterprise style)" $samba4kinit $enctype --enterprise --password-file=$PREFIX/tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
     67testit "kinit with password (windows style)" $samba4kinit $enctype  --renewable --windows --password-file=$PREFIX/tmppassfile --request-pac $USERNAME@$REALM   || failed=`expr $failed + 1`
     68testit "kinit renew ticket" $samba4kinit $enctype --request-pac -R
    6069
    6170test_smbclient "Test login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    6271
    63 testit "domain join with kerberos ccache" $VALGRIND $net join $DOMAIN $CONFIGURATION  -W "$DOMAIN" -k yes $@ || failed=`expr $failed + 1`
    64 testit "check time with kerberos ccache" $VALGRIND $net time $SERVER $CONFIGURATION  -W "$DOMAIN" -k yes $@ || failed=`expr $failed + 1`
     72testit "check time with kerberos ccache" $VALGRIND $samba_tool $CONFIGURATION -k yes $@ time $SERVER || failed=`expr $failed + 1`
    6573
    66 testit "add user with kerberos ccache" $VALGRIND $net user add nettestuser $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
    6774USERPASS=testPass@12%
    68 echo $USERPASS > ./tmpuserpassfile
     75echo $USERPASS > $PREFIX/tmpuserpassfile
     76testit "add user with kerberos ccache" $VALGRIND $samba_tool user add nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
    6977
    70 testit "set user password with kerberos ccache" $VALGRIND $net password set $DOMAIN\\nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
     78echo "Getting defaultNamingContext"
     79BASEDN=`$ldbsearch $options --basedn='' -H ldap://$SERVER -s base DUMMY=x defaultNamingContext | grep defaultNamingContext | awk '{print $2}'`
     80
     81cat > $PREFIX/tmpldbmodify <<EOF
     82dn: cn=nettestuser,cn=users,$BASEDN
     83changetype: modify
     84add: servicePrincipalName
     85servicePrincipalName: host/nettestuser
     86EOF
     87
     88testit "modify servicePrincipalName" $VALGRIND $ldbmodify -H ldap://$SERVER $PREFIX/tmpldbmodify -k yes $@ || failed=`expr $failed + 1`
     89
     90testit "set user password with kerberos ccache" $VALGRIND $samba_tool password set $DOMAIN\\nettestuser $USERPASS $CONFIGURATION  -k yes $@ || failed=`expr $failed + 1`
    7191
    7292testit "enable user with kerberos cache" $VALGRIND $enableaccount nettestuser -H ldap://$SERVER -k yes $@ || failed=`expr $failed + 1`
     
    7595export KRB5CCNAME
    7696
    77 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     97testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    7898
    7999test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    80100
    81101NEWUSERPASS=testPaSS@34%
    82 testit "change user password with 'net password change' (rpc)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
     102testit "change user password with 'samba-tool password change' (rpc)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS $CONFIGURATION  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
    83103
    84 echo $NEWUSERPASS > ./tmpuserpassfile
    85 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     104echo $NEWUSERPASS > $PREFIX/tmpuserpassfile
     105testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    86106
    87107test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     
    90110USERPASS=$NEWUSERPASS
    91111NEWUSERPASS=testPaSS@56%
    92 echo $NEWUSERPASS > ./tmpuserpassfile
     112echo $NEWUSERPASS > $PREFIX/tmpuserpassfile
    93113
    94 cat > ./tmpkpasswdscript <<EOF
     114cat > $PREFIX/tmpkpasswdscript <<EOF
    95115expect Password
    96116password ${USERPASS}\n
    97117expect New password
    98118send ${NEWUSERPASS}\n
    99 expect New password
     119expect Verify password
    100120send ${NEWUSERPASS}\n
    101121expect Success
    102122EOF
    103123
    104 testit "change user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     124testit "change user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    105125
    106 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     126testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    107127
    108128NEWUSERPASS=testPaSS@78%
    109 echo $NEWUSERPASS > ./tmpuserpassfile
     129echo $NEWUSERPASS > $PREFIX/tmpuserpassfile
    110130
    111131test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    112132
    113 cat > ./tmpkpasswdscript <<EOF
     133cat > $PREFIX/tmpkpasswdscript <<EOF
    114134expect New password
    115135send ${NEWUSERPASS}\n
    116 expect New password
     136expect Verify password
    117137send ${NEWUSERPASS}\n
    118138expect Success
    119139EOF
    120140
    121 testit "set user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
     141testit "set user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
    122142
    123 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     143testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     144
     145test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     146
     147NEWUSERPASS=testPaSS@910%
     148echo $NEWUSERPASS > $PREFIX/tmpuserpassfile
     149
     150cat > $PREFIX/tmpkpasswdscript <<EOF
     151expect New password
     152send ${NEWUSERPASS}\n
     153expect Verify password
     154send ${NEWUSERPASS}\n
     155expect Success
     156EOF
     157
     158testit "set user password with kpasswd and servicePrincipalName" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache host/nettestuser@$REALM || failed=`expr $failed + 1`
     159
     160testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    124161
    125162test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     
    128165export KRB5CCNAME
    129166
    130 testit "del user with kerberos ccache" $VALGRIND $net user delete nettestuser $CONFIGURATION -k yes $@ || failed=`expr $failed + 1`
     167lowerrealm=$(echo $REALM | tr '[A-Z]' '[a-z]')
     168test_smbclient "Test login with user kerberos lowercase realm" 'ls' -k yes -Unettestuser@$lowerrealm%$NEWUSERPASS || failed=`expr $failed + 1`
     169test_smbclient "Test login with user kerberos lowercase realm 2" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS --realm=$lowerrealm || failed=`expr $failed + 1`
    131170
    132 rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
     171testit "del user with kerberos ccache" $VALGRIND $samba_tool user delete nettestuser $CONFIGURATION -k yes $@ || failed=`expr $failed + 1`
     172
     173rm -f $KRB5CCNAME
     174testit "kinit with machineaccountccache script" $machineaccountccache $CONFIGURATION $KRB5CCNAME || failed=`expr $failed + 1`
     175test_smbclient "Test machine account login with kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     176
     177testit "reset password policies" $VALGRIND $samba_tool pwsettings $PWSETCONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
     178
     179rm -f $PREFIX/tmpccache tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
    133180exit $failed
  • vendor/current/testprogs/blackbox/test_ldb.sh

    r414 r740  
    3333}
    3434
    35 
    36 ldbsearch="$VALGRIND $BUILDDIR/bin/ldbsearch$EXEEXT"
     35export PATH="$BUILDDIR/bin:$PATH"
     36
     37ldbsearch="$VALGRIND ldbsearch$EXEEXT"
    3738
    3839check "RootDSE" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1`
  • vendor/current/testprogs/blackbox/test_passwords.sh

    r414 r740  
    66if [ $# -lt 5 ]; then
    77cat <<EOF
    8 Usage: test_kinit.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX
     8Usage: test_passwords.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX
    99EOF
    1010exit 1;
     
    2323smbclient="$samba4bindir/smbclient$EXEEXT"
    2424samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    25 net="$samba4bindir/net$EXEEXT"
     25samba_tool="$samba4bindir/samba-tool$EXEEXT"
    2626rkpty="$samba4bindir/rkpty$EXEEXT"
    2727samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
    28 enableaccount="$PYTHON `dirname $0`/../../source4/setup/enableaccount"
    29 setpassword="$PYTHON `dirname $0`/../../source4/setup/setpassword"
    30 newuser="$PYTHON `dirname $0`/../../source4/setup/newuser"
     28newuser="$samba_tool newuser"
    3129
    3230. `dirname $0`/subunit.sh
     
    4846}
    4947
     48CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
     49export CONFIG
     50
     51testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
     52
    5053USERPASS=testPaSS@01%
    5154
    52 testit "create user locally" $VALGRIND $newuser nettestuser $USERPASS $@ || failed=`expr $failed + 1`
     55testit "create user locally" $VALGRIND $newuser $CONFIG nettestuser $USERPASS $@ || failed=`expr $failed + 1`
    5356
    5457KRB5CCNAME="$PREFIX/tmpuserccache"
     
    6265
    6366NEWUSERPASS=testPaSS@02%
    64 testit "change user password with 'net password change' (unforced)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
     67testit "change user password with 'samba-tool password change' (unforced)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS  -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
    6568
    6669echo $NEWUSERPASS > ./tmpuserpassfile
     
    7174
    7275USERPASS=$NEWUSERPASS
     76WEAKPASS=testpass1
    7377NEWUSERPASS=testPaSS@03%
    7478
     79# password mismatch check doesn't work yet (kpasswd bug, reported to Love)
     80#echo "check that password mismatch gives the right error"
     81#cat > ./tmpkpasswdscript <<EOF
     82#expect Password
     83#password ${USERPASS}\n
     84#expect New password
     85#send ${WEAKPASS}\n
     86#expect New password
     87#send ${NEWUSERPASS}\n
     88#expect password mismatch
     89#EOF
     90#
     91#testit "change user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     92
     93
     94echo "check that a weak password is rejected"
     95cat > ./tmpkpasswdscript <<EOF
     96expect Password
     97password ${USERPASS}\n
     98expect New password
     99send ${WEAKPASS}\n
     100expect New password
     101send ${WEAKPASS}\n
     102expect Password does not meet complexity requirements
     103EOF
     104
     105testit "change to weak user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     106
     107echo "check that a short password is rejected"
     108cat > ./tmpkpasswdscript <<EOF
     109expect Password
     110password ${USERPASS}\n
     111expect New password
     112send xx1\n
     113expect New password
     114send xx1\n
     115expect Password too short
     116EOF
     117
     118testit "change to short user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     119
     120
     121echo "check that a strong new password is accepted"
    75122cat > ./tmpkpasswdscript <<EOF
    76123expect Password
     
    89136
    90137NEWUSERPASS=testPaSS@04%
    91 testit "set password on user locally" $VALGRIND $setpassword nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
     138testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
    92139USERPASS=$NEWUSERPASS
    93140
    94141NEWUSERPASS=testPaSS@05%
    95 testit "change user password with 'net password change' (after must change flag set)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
     142testit "change user password with 'samba-tool password change' (after must change flag set)" $VALGRIND $samba_tool password change -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
    96143USERPASS=$NEWUSERPASS
    97144
    98145NEWUSERPASS=testPaSS@06%
    99 testit "set password on user locally" $VALGRIND $setpassword nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
     146testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
    100147USERPASS=$NEWUSERPASS
    101148
     
    117164test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
    118165
    119 testit "reset password policies" $VALGRIND $PYTHON ./setup/pwsettings set --configfile=$PREFIX/dc/etc/smb.conf --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
     166NEWUSERPASS=abcdefg
     167testit_expect_failure "try to set a non-complex password (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
    120168
    121 NEWUSERPASS=abcdefg
    122 testit_expect_failure "try to set a non-complex password (command should not succeed)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ && failed=`expr $failed + 1`
     169testit "allow non-complex passwords" $VALGRIND $samba_tool pwsettings set $CONFIG --complexity=off || failed=`expr $failed + 1`
    123170
    124 testit "allow non-complex passwords" $VALGRIND $PYTHON ./setup/pwsettings set --configfile=$PREFIX/dc/etc/smb.conf --complexity=off || failed=`expr $failed + 1`
    125 
    126 testit "try to set a non-complex password (command should succeed)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
     171testit "try to set a non-complex password (command should succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
    127172USERPASS=$NEWUSERPASS
    128173
     
    130175
    131176NEWUSERPASS=abc
    132 testit_expect_failure "try to set a short password (command should not succeed)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ && failed=`expr $failed + 1`
     177testit_expect_failure "try to set a short password (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
    133178
    134 testit "allow short passwords (length 1)" $VALGRIND $PYTHON ./setup/pwsettings set --configfile=$PREFIX/dc/etc/smb.conf --min-pwd-length=1 || failed=`expr $failed + 1`
     179testit "allow short passwords (length 1)" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1`
    135180
    136 testit "try to set a short password (command should succeed)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ || failed=`expr $failed + 1`
    137 USERPASS=$NEWUSERPASS
     181testit "try to set a short password (command should succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
     182USERPASS="$NEWUSERPASS"
    138183
    139 testit "require minimum password age of 1 day" $VALGRIND $PYTHON ./setup/pwsettings set --configfile=$PREFIX/dc/etc/smb.conf --min-pwd-age=1 || failed=`expr $failed + 1`
     184testit "require minimum password age of 1 day" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1`
    140185
    141 NEWUSERPASS=testPaSS@08%
    142 testit_expect_failure "try to change password too quickly (command should not succeed)" $VALGRIND $net password change -W$DOMAIN -U$DOMAIN\\nettestuser%$USERPASS -k no $NEWUSERPASS $@ && failed=`expr $failed + 1`
     186testit "show password settings" $VALGRIND $samba_tool pwsettings $CONFIG show || failed=`expr $failed + 1`
    143187
    144 testit "reset password policies" $VALGRIND $PYTHON ./setup/pwsettings set --configfile=$PREFIX/dc/etc/smb.conf --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
     188NEWUSERPASS="testPaSS@08%"
     189testit_expect_failure "try to change password too quickly (command should not succeed)" $VALGRIND $samba_tool password change -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no "$NEWUSERPASS" $@ && failed=`expr $failed + 1`
    145190
    146 testit "del user" $VALGRIND $net user delete nettestuser -U"$USERNAME%$PASSWORD" -k no $@ || failed=`expr $failed + 1`
     191testit "reset password policies" $VALGRIND $samba_tool pwsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
     192
     193testit "del user" $VALGRIND $samba_tool user delete nettestuser -U"$USERNAME%$PASSWORD" -k no $@ || failed=`expr $failed + 1`
    147194
    148195rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
Note: See TracChangeset for help on using the changeset viewer.