1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
samba-mirror/testprogs/blackbox/bogus.sh
Andreas Schneider 30215a8a21 testprogs: Reformat bogus.sh
shfmt -w -p -i 0 -fn testprogs/blackbox/bogus.sh

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Fri Jul 15 13:00:30 UTC 2022 on sn-devel-184
2022-07-15 13:00:30 +00:00

29 lines
774 B
Bash
Executable File

#!/bin/sh
if [ $# -lt 1 ]; then
cat <<EOF
Usage: bogus.sh SERVER SHARE USER PASSWORD DC_USER DC_PASSWORD SMBCLIENT
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