Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

Location:
vendor/current/testprogs
Files:
20 added
2 deleted
8 edited

Legend:

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

    r740 r988  
    5555}
    5656
     57subunit_skip_test () {
     58  # emit the current protocol skip-marker for test $1, and emit stdin as
     59  # the error text.
     60  # we use stdin because the failure message can be arbitrarily long, and this
     61  # makes it convenient to write in scripts (using <<END syntax.
     62  echo "skip: $1 ["
     63  cat -
     64  echo "]"
     65}
     66
    5767testit () {
    5868        name="$1"
  • vendor/current/testprogs/blackbox/test_chgdcpass.sh

    r740 r988  
    66if [ $# -lt 4 ]; then
    77cat <<EOF
    8 Usage: test_kinit.sh SERVER USERNAME REALM DOMAIN PREFIX
     8Usage: test_kinit.sh SERVER USERNAME REALM DOMAIN PREFIX SMBCLIENT
    99EOF
    1010exit 1;
     
    1818ENCTYPE=$6
    1919PROVDIR=$7
    20 shift 7
     20smbclient=$8
     21shift 8
    2122failed=0
    2223
    23 samba4bindir="$BUILDDIR/bin"
     24samba4bindir="$BINDIR"
    2425samba4srcdir="$SRCDIR/source4"
    25 smbclient="$samba4bindir/smbclient$EXEEXT"
    26 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
     26
     27samba4kinit=kinit
     28if test -x $BINDIR/samba4kinit; then
     29        samba4kinit=bin/samba4kinit
     30fi
     31
    2732
    2833machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache"
     
    3641        shift
    3742        echo "test: $name"
    38         $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" -W "$DOMAIN" $@
     43        $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" $@
     44        status=$?
     45        if [ x$status = x0 ]; then
     46                echo "success: $name"
     47        else
     48                echo "failure: $name"
     49        fi
     50        return $status
     51}
     52
     53test_drs() {
     54        function="$1"
     55        name="$2"
     56        shift
     57        shift
     58        echo "test: $name"
     59        echo $VALGRIND $samba4bindir/samba-tool drs $function $SERVER -k yes $@
     60        $VALGRIND $samba4bindir/samba-tool drs $function $SERVER -k yes $@
    3961        status=$?
    4062        if [ x$status = x0 ]; then
     
    5577#This is important because it puts the ticket for the old KVNO and password into a local ccache
    5678test_smbclient "Test login with kerberos ccache before password change" 'ls' -k yes || failed=`expr $failed + 1`
     79
     80#check that drs bind works before we change the password (prime the ccache)
     81test_drs bind "Test drs bind with with kerberos ccache" || failed=`expr $failed + 1`
     82
     83#check that drs options works before we change the password (prime the ccache)
     84test_drs options "Test drs options with with kerberos ccache" || failed=`expr $failed + 1`
     85
    5786testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
    5887
    5988#This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed
    6089test_smbclient "Test login with kerberos ccache after password change" 'ls' -k yes || failed=`expr $failed + 1`
     90
     91#check that drs bind works after we change the password
     92test_drs bind "Test drs bind with new password" || failed=`expr $failed + 1`
     93
     94#check that drs options works after we change the password
     95test_drs options "Test drs options with new password" || failed=`expr $failed + 1`
     96
     97testit "change dc password (2nd time)" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1`
     98
     99# This is important because it shows that the old ticket is discarded if the server rejects it (as it must) after the password was changed twice in succession.
     100# This also ensures we handle the case where the domain is re-provisioned etc
     101test_smbclient "Test login with kerberos ccache after 2nd password change" 'ls' -k yes || failed=`expr $failed + 1`
     102
     103#check that drs bind works after we change the password a 2nd time
     104test_drs bind "Test drs bind after 2nd password change" || failed=`expr $failed + 1`
     105
     106#check that drs options works after we change the password a 2nd time
     107test_drs options "Test drs options after 2nd password change" || failed=`expr $failed + 1`
    61108
    62109#This confirms that the DC password is valid for a kinit too
  • vendor/current/testprogs/blackbox/test_export_keytab.sh

    r740 r988  
    66if [ $# -lt 5 ]; then
    77cat <<EOF
    8 Usage: test_extract_keytab.sh SERVER USERNAME REALM DOMAIN PREFIX
     8Usage: test_extract_keytab.sh SERVER USERNAME REALM DOMAIN PREFIX SMBCLIENT
    99EOF
    1010exit 1;
     
    1616DOMAIN=$4
    1717PREFIX=$5
    18 shift 5
     18smbclient=$6
     19shift 6
    1920failed=0
    2021
    21 samba4bindir="$BUILDDIR/bin"
    22 smbclient="$samba4bindir/smbclient$EXEEXT"
    23 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    24 samba_tool="$samba4bindir/samba-tool$EXEEXT"
    25 newuser="$samba_tool newuser"
     22samba4bindir="$BINDIR"
     23samba_tool="$samba4bindir/samba-tool"
     24newuser="$samba_tool user create"
     25
     26samba4kinit=kinit
     27if test -x $BINDIR/samba4kinit; then
     28        samba4kinit=$BINDIR/samba4kinit
     29fi
    2630
    2731. `dirname $0`/subunit.sh
     
    3337        shift
    3438        echo "test: $name"
    35         $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" -W "$DOMAIN" $@
     39        $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" $@
    3640        status=$?
    3741        if [ x$status = x0 ]; then
     
    4751testit "create user locally" $VALGRIND $newuser nettestuser $USERPASS $@ || failed=`expr $failed + 1`
    4852
    49 testit "export keytab from domain" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
    50 testit "export keytab from domain (2nd time)" $VALGRIND $samba_tool export keytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
     53testit "dump keytab from domain" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
     54testit "dump keytab from domain (2nd time)" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1`
     55
     56testit "dump keytab from domain for cifs principal" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-server --principal=cifs/$SERVER $@ || failed=`expr $failed + 1`
     57testit "dump keytab from domain for cifs principal (2nd time)" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-server --principal=cifs/$SERVER $@ || failed=`expr $failed + 1`
     58
     59testit "dump keytab from domain for user principal" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-2 --principal=nettestuser $@ || failed=`expr $failed + 1`
     60testit "dump keytab from domain for user principal (2nd time)" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-2 --principal=nettestuser@$REALM $@ || failed=`expr $failed + 1`
    5161
    5262KRB5CCNAME="$PREFIX/tmpuserccache"
     
    5767test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    5868
     69testit "kinit with keytab as user (2)" $VALGRIND $samba4kinit --keytab=$PREFIX/tmpkeytab-2 --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     70
     71test_smbclient "Test login with user kerberos ccache as user (2)" 'ls' -k yes || failed=`expr $failed + 1`
     72
    5973KRB5CCNAME="$PREFIX/tmpadminccache"
    6074export KRB5CCNAME
     
    6478testit "del user" $VALGRIND $samba_tool user delete nettestuser -k yes $@ || failed=`expr $failed + 1`
    6579
    66 rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab
     80rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab $PREFIX/tmpkeytab-2 $PREFIX/tmpkeytab-server
    6781exit $failed
  • vendor/current/testprogs/blackbox/test_ktpass.sh

    r740 r988  
    1414
    1515
    16 samba_tool="$BUILDDIR/bin/samba-tool"
    17 samba4bindir="$BUILDDIR/bin"
     16samba_tool="$BINDIR/samba-tool"
     17samba4bindir="$BINDIR"
    1818samba4srcdir="$SRCDIR/source4"
    19 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    20 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
     19samba4kinit=kinit
     20if test -x $BINDIR/samba4kinit; then
     21        samba4kinit=$BINDIR/samba4kinit
     22fi
     23
     24CONFIG="--configfile=$PREFIX/etc/smb.conf"
    2125
    2226TESTUSER="ktpassUser"
    2327
    24 testit "newuser" $samba_tool newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
     28testit "user add" $samba_tool user add $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
    2529
    2630KRB5CCNAME="$PREFIX/tmpccache"
     
    2832echo "testp@ssw0Rd" >$PREFIX/tmppassfile
    2933testit "kinit with passwd" $samba4kinit -e arcfour-hmac-md5 --password-file=$PREFIX/tmppassfile   $TESTUSER@SAMBA.EXAMPLE.COM   || failed=`expr $failed + 1`
    30 testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BUILDDIR/bin|| failed=`expr $failed + 1`
     34testit "ktpass" $samba4srcdir/scripting/bin/ktpass.sh --host LOCALDC --out $PREFIX/testuser.kt --princ $TESTUSER --pass "testp@ssw0Rd" --path-to-ldbsearch=$BINDIR/bin|| failed=`expr $failed + 1`
    3135
    3236rm -f $KRB5CCNAME
  • vendor/current/testprogs/blackbox/test_ldb.sh

    r740 r988  
    3333}
    3434
    35 export PATH="$BUILDDIR/bin:$PATH"
    36 
    37 ldbsearch="$VALGRIND ldbsearch$EXEEXT"
     35export PATH="$BINDIR:$PATH"
     36
     37ldbsearch="$VALGRIND ldbsearch"
    3838
    3939check "RootDSE" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1`
     40check "RootDSE (full)" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base '(objectClass=*)' || failed=`expr $failed + 1`
     41check "RootDSE (extended)" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base '(objectClass=*)' --extended-dn || failed=`expr $failed + 1`
     42if [ x$p = x"ldaps" ]; then
     43   testit_expect_failure "RootDSE over SSLv3 should fail" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN --option='tlspriority=NONE:+VERS-SSL3.0:+MAC-ALL:+CIPHER-ALL:+RSA:+SIGN-ALL:+COMP-NULL' && failed=`expr $failed + 1`
     44fi
    4045
    4146echo "Getting defaultNamingContext"
     
    122127fi
    123128
    124 wellknown_object_test() {
    125         local guid=$1
    126         local object=$2
    127         local basedns
    128         local dn
    129         local r
    130         local c
    131         local n
    132         local failed=0
     129wellknown_object_test()
     130(
     131        guid=$1
     132        object=$2
     133        failed=0
    133134
    134135        basedns="<WKGUID=${guid},${BASEDN}> <wkGuId=${guid},${BASEDN}>"
     
    152153
    153154        return $failed
    154 }
     155)
    155156
    156157wellknown_object_test 22B70C67D56E4EFB91E9300FCA3DC1AA ForeignSecurityPrincipals
  • vendor/current/testprogs/blackbox/test_passwords.sh

    r740 r988  
    66if [ $# -lt 5 ]; then
    77cat <<EOF
    8 Usage: test_passwords.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX
     8Usage: test_passwords.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX SMBCLIENT
    99EOF
    1010exit 1;
     
    1717DOMAIN=$5
    1818PREFIX=$6
    19 shift 6
     19smbclient=$7
     20shift 7
    2021failed=0
    2122
    22 samba4bindir="$BUILDDIR/bin"
    23 smbclient="$samba4bindir/smbclient$EXEEXT"
    24 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
    25 samba_tool="$samba4bindir/samba-tool$EXEEXT"
    26 rkpty="$samba4bindir/rkpty$EXEEXT"
    27 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
    28 newuser="$samba_tool newuser"
     23samba4bindir="$BINDIR"
     24samba4kinit=kinit
     25if test -x $BINDIR/samba4kinit; then
     26        samba4kinit=$BINDIR/samba4kinit
     27fi
     28
     29samba_tool="$samba4bindir/samba-tool"
     30net_tool="$samba4bindir/net"
     31smbpasswd="$samba4bindir/smbpasswd"
     32texpect="$samba4bindir/texpect"
     33samba4kpasswd=kpasswd
     34if test -x $BINDIR/samba4kpasswd; then
     35        samba4kpasswd=$BINDIR/samba4kpasswd
     36fi
     37
     38newuser="$samba_tool user create"
    2939
    3040. `dirname $0`/subunit.sh
     
    3646        shift
    3747        echo "test: $name"
    38         $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" -W "$DOMAIN" $@
     48        $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" $@
    3949        status=$?
    4050        if [ x$status = x0 ]; then
     
    4656}
    4757
    48 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
     58do_kinit() {
     59        file="$1"
     60        password="$2"
     61        shift
     62        shift
     63        if test -x $BINDIR/samba4kinit; then
     64                $samba4kinit --password-file=$file --request-pac $@
     65        else
     66                echo $password | $samba4kinit $@
     67        fi
     68}
     69
     70UID_WRAPPER_ROOT=1
     71export UID_WRAPPER_ROOT
     72
     73CONFIG="--configfile=$PREFIX/etc/smb.conf"
    4974export CONFIG
    5075
    51 testit "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 
    53 USERPASS=testPaSS@01%
     76testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1`
     77
     78USERPASS=testPaSS@00%
    5479
    5580testit "create user locally" $VALGRIND $newuser $CONFIG nettestuser $USERPASS $@ || failed=`expr $failed + 1`
     
    6085echo $USERPASS > $PREFIX/tmpuserpassfile
    6186
    62 testit "kinit with user password" $samba4kinit --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
     87testit "kinit with user password" do_kinit $PREFIX/tmpuserpassfile $USERPASS nettestuser@$REALM   || failed=`expr $failed + 1`
    6388
    6489test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    6590
     91NEWUSERPASS=testPaSS@01%
     92testit "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`
     93
     94echo $NEWUSERPASS > ./tmpuserpassfile
     95testit "kinit with user password" do_kinit ./tmpuserpassfile $NEWUSERPASS nettestuser@$REALM   || failed=`expr $failed + 1`
     96
     97test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
     98
     99#
     100# These tests demonstrate that a credential cache in the environment does not
     101# override a username/password, even an incorrect one, on the command line
     102#
     103
     104testit_expect_failure  "Test login with user kerberos ccache, but wrong password specified" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k yes -Unettestuser@$REALM%wrongpass && failed=`expr $failed + 1`
     105testit_expect_failure  "Test login with user kerberos ccache, but old password specified" $VALGRIND $smbclient //$SERVER/tmp -c 'ls' -k yes -Unettestuser@$REALM%$USERPASS && failed=`expr $failed + 1`
     106
     107
     108USERPASS=$NEWUSERPASS
     109WEAKPASS=testpass1
    66110NEWUSERPASS=testPaSS@02%
    67 testit "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`
    68 
    69 echo $NEWUSERPASS > ./tmpuserpassfile
    70 testit "kinit with user password" $samba4kinit --password-file=./tmpuserpassfile --request-pac nettestuser@$REALM   || failed=`expr $failed + 1`
    71 
    72 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
    73 
    74 
    75 USERPASS=$NEWUSERPASS
    76 WEAKPASS=testpass1
    77 NEWUSERPASS=testPaSS@03%
    78111
    79112# password mismatch check doesn't work yet (kpasswd bug, reported to Love)
     
    89122#EOF
    90123#
    91 #testit "change user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     124#testit "change user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    92125
    93126
     
    103136EOF
    104137
    105 testit "change to weak user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     138testit "change to weak user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    106139
    107140echo "check that a short password is rejected"
     
    116149EOF
    117150
    118 testit "change to short user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     151testit "change to short user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    119152
    120153
     
    130163EOF
    131164
    132 testit "change user password with kpasswd" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     165testit "change user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    133166
    134167test_smbclient "Test login with user kerberos (unforced)" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
    135168
     169NEWUSERPASS=testPaSS@03%
     170
     171echo "set password with smbpasswd"
     172cat > ./tmpsmbpasswdscript <<EOF
     173expect New SMB password:
     174send ${NEWUSERPASS}\n
     175expect Retype new SMB password:
     176send ${NEWUSERPASS}\n
     177EOF
     178
     179testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L -c $PREFIX/etc/smb.conf nettestuser || failed=`expr $failed + 1`
     180USERPASS=$NEWUSERPASS
     181
     182test_smbclient "Test login with user (ntlm)" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
     183
    136184
    137185NEWUSERPASS=testPaSS@04%
    138 testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
     186testit "set password on user locally" $VALGRIND $samba_tool user setpassword nettestuser $CONFIG --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
    139187USERPASS=$NEWUSERPASS
    140188
    141189NEWUSERPASS=testPaSS@05%
    142 testit "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`
     190testit "change user password with 'samba-tool user password' (after must change flag set)" $VALGRIND $samba_tool user password -W$DOMAIN -U$DOMAIN/nettestuser%$USERPASS -k no --newpassword=$NEWUSERPASS $@ || failed=`expr $failed + 1`
    143191USERPASS=$NEWUSERPASS
    144192
    145193NEWUSERPASS=testPaSS@06%
    146 testit "set password on user locally" $VALGRIND $samba_tool setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
     194testit "set password on user locally" $VALGRIND $samba_tool user setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
    147195USERPASS=$NEWUSERPASS
    148196
     
    159207EOF
    160208
    161 testit "change user password with kpasswd (after must change flag set)" $rkpty ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
     209testit "change user password with kpasswd (after must change flag set)" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
    162210USERPASS=$NEWUSERPASS
    163211
    164212test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
    165213
     214NEWUSERPASS=testPaSS@08%
     215testit "set password on user locally" $VALGRIND $samba_tool user setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1`
     216USERPASS=$NEWUSERPASS
     217
     218NEWUSERPASS=testPaSS@09%
     219
     220cat > ./tmpsmbpasswdscript <<EOF
     221expect Old SMB password:
     222password ${USERPASS}\n
     223expect New SMB password:
     224send ${NEWUSERPASS}\n
     225expect Retype new SMB password:
     226send ${NEWUSERPASS}\n
     227EOF
     228
     229testit "change user password with smbpasswd (after must change flag set)" $texpect ./tmpsmbpasswdscript $smbpasswd -r $SERVER  -c $PREFIX/etc/smb.conf -U nettestuser || failed=`expr $failed + 1`
     230
     231USERPASS=$NEWUSERPASS
     232
     233test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
     234
    166235NEWUSERPASS=abcdefg
    167 testit_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`
    168 
    169 testit "allow non-complex passwords" $VALGRIND $samba_tool pwsettings set $CONFIG --complexity=off || failed=`expr $failed + 1`
    170 
    171 testit "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`
     236testit_expect_failure "try to set a non-complex password (command should not succeed)" $VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no --newpassword="$NEWUSERPASS" $@ && failed=`expr $failed + 1`
     237
     238testit "allow non-complex passwords" $VALGRIND $samba_tool domain passwordsettings set $CONFIG --complexity=off || failed=`expr $failed + 1`
     239
     240testit "try to set a non-complex password (command should succeed)" $VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no --newpassword="$NEWUSERPASS" $@ || failed=`expr $failed + 1`
    172241USERPASS=$NEWUSERPASS
    173242
     
    175244
    176245NEWUSERPASS=abc
    177 testit_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`
    178 
    179 testit "allow short passwords (length 1)" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1`
    180 
    181 testit "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`
     246testit_expect_failure "try to set a short password (command should not succeed)" $VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no --newpassword="$NEWUSERPASS" $@ && failed=`expr $failed + 1`
     247
     248testit "allow short passwords (length 1)" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1`
     249
     250testit "try to set a short password (command should succeed)" $VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no --newpassword="$NEWUSERPASS" $@ || failed=`expr $failed + 1`
    182251USERPASS="$NEWUSERPASS"
    183252
    184 testit "require minimum password age of 1 day" $VALGRIND $samba_tool pwsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1`
    185 
    186 testit "show password settings" $VALGRIND $samba_tool pwsettings $CONFIG show || failed=`expr $failed + 1`
     253# test kpasswd via net ads password (change variant)
     254NEWUSERPASS="testPaSS@10%"
     255testit "change user password with 'net ads password', admin: $DOMAIN/nettestuser, target: nettestuser@$REALM" $VALGRIND $net_tool ads password -W$DOMAIN -Unettestuser@$REALM%$USERPASS nettestuser@$REALM "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
     256USERPASS="$NEWUSERPASS"
     257
     258test_smbclient "Test login with smbclient" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
     259
     260# test kpasswd via net ads password (admin set variant)
     261NEWUSERPASS="testPaSS@11%"
     262testit "set user password with 'net ads password', admin: $DOMAIN/$USERNAME, target: nettestuser@$REALM" $VALGRIND $net_tool ads password -W$DOMAIN -U$USERNAME@$REALM%$PASSWORD nettestuser@$REALM "$NEWUSERPASS" $@ || failed=`expr $failed + 1`
     263USERPASS="$NEWUSERPASS"
     264
     265test_smbclient "Test login with smbclient" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1`
     266
     267testit "require minimum password age of 1 day" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1`
     268
     269testit "show password settings" $VALGRIND $samba_tool domain passwordsettings $CONFIG show || failed=`expr $failed + 1`
    187270
    188271NEWUSERPASS="testPaSS@08%"
    189 testit_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`
    190 
    191 testit "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 
    193 testit "del user" $VALGRIND $samba_tool user delete nettestuser -U"$USERNAME%$PASSWORD" -k no $@ || failed=`expr $failed + 1`
    194 
    195 rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript
     272testit_expect_failure "try to change password too quickly (command should not succeed)" $VALGRIND $samba_tool user password -W$DOMAIN "-U$DOMAIN/nettestuser%$USERPASS" -k no --newpassword="$NEWUSERPASS" $@ && failed=`expr $failed + 1`
     273
     274testit "reset password policies" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default || failed=`expr $failed + 1`
     275
     276testit "del user" $VALGRIND $samba_tool user delete nettestuser -U"$USERNAME%$PASSWORD" $CONFIG -k no $@ || failed=`expr $failed + 1`
     277
     278rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript tmpsmbpasswdscript
    196279exit $failed
  • vendor/current/testprogs/win32/spoolss/README.win32

    r740 r988  
    3636        [samba3]         will skip some tests samba servers are known
    3737                         not to have implemented
    38         [architecture=X] allows to define a specific
     38        [architecture=X] allows one to define a specific
    3939                         architecture to test with. choose between:
    4040                         "Windows NT x86" or "Windows x64"
  • vendor/current/testprogs/win32/spoolss/testspoolss.c

    r740 r988  
    10561056        ret &= test_DeviceModes(tctx, printername, handle);
    10571057#if 0
    1058         /* dont run these at the moment, behaviour is PrinterData API calls (not
     1058        /* don't run these at the moment, behaviour is PrinterData API calls (not
    10591059         * dcerpc calls) is almost unpredictable - gd */
    10601060        ret &= test_PrinterData(tctx, printername, handle);
     
    17661766                fprintf(stderr, "\t[samba3]         will skip some tests samba servers are known\n");
    17671767                fprintf(stderr, "\t                 not to have implemented\n");
    1768                 fprintf(stderr, "\t[architecture=X] allows to define a specific\n");
     1768                fprintf(stderr, "\t[architecture=X] allows one to define a specific\n");
    17691769                fprintf(stderr, "\t                 architecture to test with. choose between:\n");
    17701770                fprintf(stderr, "\t                 \"Windows NT x86\" or \"Windows x64\"\n");
Note: See TracChangeset for help on using the changeset viewer.