1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/setup/tests/blackbox_newuser.sh
2010-05-10 12:20:26 +02:00

34 lines
859 B
Bash
Executable File

#!/bin/sh
if [ $# -lt 1 ]; then
cat <<EOF
Usage: blackbox_newuser.sh PREFIX
EOF
exit 1;
fi
PREFIX="$1"
shift 1
. `dirname $0`/../../../testprogs/blackbox/subunit.sh
testit "simple-dc" $PYTHON ./setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
net="./bin/net"
CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
testit "newuser" $net newuser $CONFIG testuser testp@ssw0Rd
# check the enable account script
testit "enableaccount" $net enableaccount $CONFIG testuser
# check the enable account script
testit "setpassword" $net setpassword $CONFIG testuser --newpassword=testp@ssw0Rd2
# check the setexpiry script
testit "noexpiry" $net setexpiry $CONFIG testuser --noexpiry
testit "expiry" $net setexpiry $CONFIG testuser --days=7
exit $failed