Changeset 988 for vendor/current/testprogs
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/testprogs
- Files:
-
- 20 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/testprogs/blackbox/subunit.sh
r740 r988 55 55 } 56 56 57 subunit_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 57 67 testit () { 58 68 name="$1" -
vendor/current/testprogs/blackbox/test_chgdcpass.sh
r740 r988 6 6 if [ $# -lt 4 ]; then 7 7 cat <<EOF 8 Usage: test_kinit.sh SERVER USERNAME REALM DOMAIN PREFIX 8 Usage: test_kinit.sh SERVER USERNAME REALM DOMAIN PREFIX SMBCLIENT 9 9 EOF 10 10 exit 1; … … 18 18 ENCTYPE=$6 19 19 PROVDIR=$7 20 shift 7 20 smbclient=$8 21 shift 8 21 22 failed=0 22 23 23 samba4bindir="$B UILDDIR/bin"24 samba4bindir="$BINDIR" 24 25 samba4srcdir="$SRCDIR/source4" 25 smbclient="$samba4bindir/smbclient$EXEEXT" 26 samba4kinit="$samba4bindir/samba4kinit$EXEEXT" 26 27 samba4kinit=kinit 28 if test -x $BINDIR/samba4kinit; then 29 samba4kinit=bin/samba4kinit 30 fi 31 27 32 28 33 machineaccountccache="$samba4srcdir/scripting/bin/machineaccountccache" … … 36 41 shift 37 42 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 53 test_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 $@ 39 61 status=$? 40 62 if [ x$status = x0 ]; then … … 55 77 #This is important because it puts the ticket for the old KVNO and password into a local ccache 56 78 test_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) 81 test_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) 84 test_drs options "Test drs options with with kerberos ccache" || failed=`expr $failed + 1` 85 57 86 testit "change dc password" $samba4srcdir/scripting/devel/chgtdcpass -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` 58 87 59 88 #This is important because it shows that the old ticket remains valid (as it must) for incoming connections after the DC password is changed 60 89 test_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 92 test_drs bind "Test drs bind with new password" || failed=`expr $failed + 1` 93 94 #check that drs options works after we change the password 95 test_drs options "Test drs options with new password" || failed=`expr $failed + 1` 96 97 testit "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 101 test_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 104 test_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 107 test_drs options "Test drs options after 2nd password change" || failed=`expr $failed + 1` 61 108 62 109 #This confirms that the DC password is valid for a kinit too -
vendor/current/testprogs/blackbox/test_export_keytab.sh
r740 r988 6 6 if [ $# -lt 5 ]; then 7 7 cat <<EOF 8 Usage: test_extract_keytab.sh SERVER USERNAME REALM DOMAIN PREFIX 8 Usage: test_extract_keytab.sh SERVER USERNAME REALM DOMAIN PREFIX SMBCLIENT 9 9 EOF 10 10 exit 1; … … 16 16 DOMAIN=$4 17 17 PREFIX=$5 18 shift 5 18 smbclient=$6 19 shift 6 19 20 failed=0 20 21 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" 22 samba4bindir="$BINDIR" 23 samba_tool="$samba4bindir/samba-tool" 24 newuser="$samba_tool user create" 25 26 samba4kinit=kinit 27 if test -x $BINDIR/samba4kinit; then 28 samba4kinit=$BINDIR/samba4kinit 29 fi 26 30 27 31 . `dirname $0`/subunit.sh … … 33 37 shift 34 38 echo "test: $name" 35 $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" -W "$DOMAIN"$@39 $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" $@ 36 40 status=$? 37 41 if [ x$status = x0 ]; then … … 47 51 testit "create user locally" $VALGRIND $newuser nettestuser $USERPASS $@ || failed=`expr $failed + 1` 48 52 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` 53 testit "dump keytab from domain" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1` 54 testit "dump keytab from domain (2nd time)" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab $@ || failed=`expr $failed + 1` 55 56 testit "dump keytab from domain for cifs principal" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-server --principal=cifs/$SERVER $@ || failed=`expr $failed + 1` 57 testit "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 59 testit "dump keytab from domain for user principal" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-2 --principal=nettestuser $@ || failed=`expr $failed + 1` 60 testit "dump keytab from domain for user principal (2nd time)" $VALGRIND $samba_tool domain exportkeytab $PREFIX/tmpkeytab-2 --principal=nettestuser@$REALM $@ || failed=`expr $failed + 1` 51 61 52 62 KRB5CCNAME="$PREFIX/tmpuserccache" … … 57 67 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1` 58 68 69 testit "kinit with keytab as user (2)" $VALGRIND $samba4kinit --keytab=$PREFIX/tmpkeytab-2 --request-pac nettestuser@$REALM || failed=`expr $failed + 1` 70 71 test_smbclient "Test login with user kerberos ccache as user (2)" 'ls' -k yes || failed=`expr $failed + 1` 72 59 73 KRB5CCNAME="$PREFIX/tmpadminccache" 60 74 export KRB5CCNAME … … 64 78 testit "del user" $VALGRIND $samba_tool user delete nettestuser -k yes $@ || failed=`expr $failed + 1` 65 79 66 rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab 80 rm -f $PREFIX/tmpadminccache $PREFIX/tmpuserccache $PREFIX/tmpkeytab $PREFIX/tmpkeytab-2 $PREFIX/tmpkeytab-server 67 81 exit $failed -
vendor/current/testprogs/blackbox/test_ktpass.sh
r740 r988 14 14 15 15 16 samba_tool="$B UILDDIR/bin/samba-tool"17 samba4bindir="$B UILDDIR/bin"16 samba_tool="$BINDIR/samba-tool" 17 samba4bindir="$BINDIR" 18 18 samba4srcdir="$SRCDIR/source4" 19 samba4kinit="$samba4bindir/samba4kinit$EXEEXT" 20 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf" 19 samba4kinit=kinit 20 if test -x $BINDIR/samba4kinit; then 21 samba4kinit=$BINDIR/samba4kinit 22 fi 23 24 CONFIG="--configfile=$PREFIX/etc/smb.conf" 21 25 22 26 TESTUSER="ktpassUser" 23 27 24 testit " newuser" $samba_tool newuser$CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`28 testit "user add" $samba_tool user add $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1` 25 29 26 30 KRB5CCNAME="$PREFIX/tmpccache" … … 28 32 echo "testp@ssw0Rd" >$PREFIX/tmppassfile 29 33 testit "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=$B UILDDIR/bin|| failed=`expr $failed + 1`34 testit "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` 31 35 32 36 rm -f $KRB5CCNAME -
vendor/current/testprogs/blackbox/test_ldb.sh
r740 r988 33 33 } 34 34 35 export PATH="$B UILDDIR/bin:$PATH"36 37 ldbsearch="$VALGRIND ldbsearch $EXEEXT"35 export PATH="$BINDIR:$PATH" 36 37 ldbsearch="$VALGRIND ldbsearch" 38 38 39 39 check "RootDSE" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base DUMMY=x dnsHostName highestCommittedUSN || failed=`expr $failed + 1` 40 check "RootDSE (full)" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base '(objectClass=*)' || failed=`expr $failed + 1` 41 check "RootDSE (extended)" $ldbsearch $CONFIGURATION $options --basedn='' -H $p://$SERVER -s base '(objectClass=*)' --extended-dn || failed=`expr $failed + 1` 42 if [ 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` 44 fi 40 45 41 46 echo "Getting defaultNamingContext" … … 122 127 fi 123 128 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 129 wellknown_object_test() 130 ( 131 guid=$1 132 object=$2 133 failed=0 133 134 134 135 basedns="<WKGUID=${guid},${BASEDN}> <wkGuId=${guid},${BASEDN}>" … … 152 153 153 154 return $failed 154 } 155 ) 155 156 156 157 wellknown_object_test 22B70C67D56E4EFB91E9300FCA3DC1AA ForeignSecurityPrincipals -
vendor/current/testprogs/blackbox/test_passwords.sh
r740 r988 6 6 if [ $# -lt 5 ]; then 7 7 cat <<EOF 8 Usage: test_passwords.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX 8 Usage: test_passwords.sh SERVER USERNAME PASSWORD REALM DOMAIN PREFIX SMBCLIENT 9 9 EOF 10 10 exit 1; … … 17 17 DOMAIN=$5 18 18 PREFIX=$6 19 shift 6 19 smbclient=$7 20 shift 7 20 21 failed=0 21 22 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" 23 samba4bindir="$BINDIR" 24 samba4kinit=kinit 25 if test -x $BINDIR/samba4kinit; then 26 samba4kinit=$BINDIR/samba4kinit 27 fi 28 29 samba_tool="$samba4bindir/samba-tool" 30 net_tool="$samba4bindir/net" 31 smbpasswd="$samba4bindir/smbpasswd" 32 texpect="$samba4bindir/texpect" 33 samba4kpasswd=kpasswd 34 if test -x $BINDIR/samba4kpasswd; then 35 samba4kpasswd=$BINDIR/samba4kpasswd 36 fi 37 38 newuser="$samba_tool user create" 29 39 30 40 . `dirname $0`/subunit.sh … … 36 46 shift 37 47 echo "test: $name" 38 $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" -W "$DOMAIN"$@48 $VALGRIND $smbclient //$SERVER/tmp -c "$cmd" $@ 39 49 status=$? 40 50 if [ x$status = x0 ]; then … … 46 56 } 47 57 48 CONFIG="--configfile=$PREFIX/dc/etc/smb.conf" 58 do_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 70 UID_WRAPPER_ROOT=1 71 export UID_WRAPPER_ROOT 72 73 CONFIG="--configfile=$PREFIX/etc/smb.conf" 49 74 export CONFIG 50 75 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@0 1%76 testit "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 78 USERPASS=testPaSS@00% 54 79 55 80 testit "create user locally" $VALGRIND $newuser $CONFIG nettestuser $USERPASS $@ || failed=`expr $failed + 1` … … 60 85 echo $USERPASS > $PREFIX/tmpuserpassfile 61 86 62 testit "kinit with user password" $samba4kinit --password-file=$PREFIX/tmpuserpassfile --request-pacnettestuser@$REALM || failed=`expr $failed + 1`87 testit "kinit with user password" do_kinit $PREFIX/tmpuserpassfile $USERPASS nettestuser@$REALM || failed=`expr $failed + 1` 63 88 64 89 test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1` 65 90 91 NEWUSERPASS=testPaSS@01% 92 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` 93 94 echo $NEWUSERPASS > ./tmpuserpassfile 95 testit "kinit with user password" do_kinit ./tmpuserpassfile $NEWUSERPASS nettestuser@$REALM || failed=`expr $failed + 1` 96 97 test_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 104 testit_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` 105 testit_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 108 USERPASS=$NEWUSERPASS 109 WEAKPASS=testpass1 66 110 NEWUSERPASS=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 > ./tmpuserpassfile70 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=$NEWUSERPASS76 WEAKPASS=testpass177 NEWUSERPASS=testPaSS@03%78 111 79 112 # password mismatch check doesn't work yet (kpasswd bug, reported to Love) … … 89 122 #EOF 90 123 # 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` 92 125 93 126 … … 103 136 EOF 104 137 105 testit "change to weak user password with kpasswd" $ rkpty./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`138 testit "change to weak user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1` 106 139 107 140 echo "check that a short password is rejected" … … 116 149 EOF 117 150 118 testit "change to short user password with kpasswd" $ rkpty./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`151 testit "change to short user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1` 119 152 120 153 … … 130 163 EOF 131 164 132 testit "change user password with kpasswd" $ rkpty./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`165 testit "change user password with kpasswd" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1` 133 166 134 167 test_smbclient "Test login with user kerberos (unforced)" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` 135 168 169 NEWUSERPASS=testPaSS@03% 170 171 echo "set password with smbpasswd" 172 cat > ./tmpsmbpasswdscript <<EOF 173 expect New SMB password: 174 send ${NEWUSERPASS}\n 175 expect Retype new SMB password: 176 send ${NEWUSERPASS}\n 177 EOF 178 179 testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L -c $PREFIX/etc/smb.conf nettestuser || failed=`expr $failed + 1` 180 USERPASS=$NEWUSERPASS 181 182 test_smbclient "Test login with user (ntlm)" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` 183 136 184 137 185 NEWUSERPASS=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`186 testit "set password on user locally" $VALGRIND $samba_tool user setpassword nettestuser $CONFIG --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1` 139 187 USERPASS=$NEWUSERPASS 140 188 141 189 NEWUSERPASS=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`190 testit "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` 143 191 USERPASS=$NEWUSERPASS 144 192 145 193 NEWUSERPASS=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`194 testit "set password on user locally" $VALGRIND $samba_tool user setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1` 147 195 USERPASS=$NEWUSERPASS 148 196 … … 159 207 EOF 160 208 161 testit "change user password with kpasswd (after must change flag set)" $ rkpty./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`209 testit "change user password with kpasswd (after must change flag set)" $texpect ./tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1` 162 210 USERPASS=$NEWUSERPASS 163 211 164 212 test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` 165 213 214 NEWUSERPASS=testPaSS@08% 215 testit "set password on user locally" $VALGRIND $samba_tool user setpassword $CONFIG nettestuser --newpassword=$NEWUSERPASS --must-change-at-next-login $@ || failed=`expr $failed + 1` 216 USERPASS=$NEWUSERPASS 217 218 NEWUSERPASS=testPaSS@09% 219 220 cat > ./tmpsmbpasswdscript <<EOF 221 expect Old SMB password: 222 password ${USERPASS}\n 223 expect New SMB password: 224 send ${NEWUSERPASS}\n 225 expect Retype new SMB password: 226 send ${NEWUSERPASS}\n 227 EOF 228 229 testit "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 231 USERPASS=$NEWUSERPASS 232 233 test_smbclient "Test login with user kerberos" 'ls' -k yes -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` 234 166 235 NEWUSERPASS=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`236 testit_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 238 testit "allow non-complex passwords" $VALGRIND $samba_tool domain passwordsettings set $CONFIG --complexity=off || failed=`expr $failed + 1` 239 240 testit "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` 172 241 USERPASS=$NEWUSERPASS 173 242 … … 175 244 176 245 NEWUSERPASS=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`246 testit_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 248 testit "allow short passwords (length 1)" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --min-pwd-length=1 || failed=`expr $failed + 1` 249 250 testit "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` 182 251 USERPASS="$NEWUSERPASS" 183 252 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) 254 NEWUSERPASS="testPaSS@10%" 255 testit "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` 256 USERPASS="$NEWUSERPASS" 257 258 test_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) 261 NEWUSERPASS="testPaSS@11%" 262 testit "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` 263 USERPASS="$NEWUSERPASS" 264 265 test_smbclient "Test login with smbclient" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` 266 267 testit "require minimum password age of 1 day" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --min-pwd-age=1 || failed=`expr $failed + 1` 268 269 testit "show password settings" $VALGRIND $samba_tool domain passwordsettings $CONFIG show || failed=`expr $failed + 1` 187 270 188 271 NEWUSERPASS="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 272 testit_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 274 testit "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 276 testit "del user" $VALGRIND $samba_tool user delete nettestuser -U"$USERNAME%$PASSWORD" $CONFIG -k no $@ || failed=`expr $failed + 1` 277 278 rm -f tmpccfile tmppassfile tmpuserpassfile tmpuserccache tmpkpasswdscript tmpsmbpasswdscript 196 279 exit $failed -
vendor/current/testprogs/win32/spoolss/README.win32
r740 r988 36 36 [samba3] will skip some tests samba servers are known 37 37 not to have implemented 38 [architecture=X] allows to define a specific38 [architecture=X] allows one to define a specific 39 39 architecture to test with. choose between: 40 40 "Windows NT x86" or "Windows x64" -
vendor/current/testprogs/win32/spoolss/testspoolss.c
r740 r988 1056 1056 ret &= test_DeviceModes(tctx, printername, handle); 1057 1057 #if 0 1058 /* don t run these at the moment, behaviour is PrinterData API calls (not1058 /* don't run these at the moment, behaviour is PrinterData API calls (not 1059 1059 * dcerpc calls) is almost unpredictable - gd */ 1060 1060 ret &= test_PrinterData(tctx, printername, handle); … … 1766 1766 fprintf(stderr, "\t[samba3] will skip some tests samba servers are known\n"); 1767 1767 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"); 1769 1769 fprintf(stderr, "\t architecture to test with. choose between:\n"); 1770 1770 fprintf(stderr, "\t \"Windows NT x86\" or \"Windows x64\"\n");
Note:
See TracChangeset
for help on using the changeset viewer.