summaryrefslogtreecommitdiffstats
path: root/testprogs/blackbox/bogus.sh
blob: be67e1992e7a76d33d690f2db4021c9a435b53d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

if [ $# -lt 1 ]; then
cat <<EOF
Usage: blackbox_newuser.sh PREFIX
EOF
exit 1;
fi

. `dirname $0`/subunit.sh

SERVER=$1
SHARE=$2
USER=$3
PWD=$4
DC_USER=$5
DC_PWD=$6
smbclient=$7
shift 7

TEST_USER=bogus_testuser
TEST_PWD=bogus_pass3#@
net="$BINDIR/net"
testit_expect_failure "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$DC_USER%$DC_PWD -c "dir"&& failed=`expr $failed + 1`
testit "net.user.add" $net rpc user add $TEST_USER $TEST_PWD -W $SERVER -U$SERVER\\$USER%$PWD -S $SERVER
testit "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$TEST_USER%$TEST_PWD -c "dir"|| failed=`expr $failed + 1`
testit "net.user.delete" $net rpc user delete $TEST_USER -W $SERVER -U$SERVER\\$USER%$PWD -S $SERVER
exit $failed