WHATSNEW: Update release notes.
[Samba/bb.git] / source4 / setup / tests / blackbox_newuser.sh
blobd25c70669b450cf9c3a46fafb5c25b7a3feb6035
1 #!/bin/sh
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: blackbox_newuser.sh PREFIX
6 EOF
7 exit 1;
8 fi
10 PREFIX="$1"
11 shift 1
13 . `dirname $0`/../../../testprogs/blackbox/subunit.sh
16 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
18 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
20 testit "newuser" $PYTHON ./setup/newuser $CONFIG testuser testpass
22 # check the enable account script
23 testit "enableaccount" $PYTHON ./setup/enableaccount $CONFIG testuser
25 # check the enable account script
26 testit "setpassword" $PYTHON ./setup/setpassword $CONFIG testuser --newpassword=testpass2
28 # check the setexpiry script
29 testit "noexpiry" $PYTHON ./setup/setexpiry $CONFIG testuser --noexpiry
30 testit "expiry" $PYTHON ./setup/setexpiry $CONFIG testuser --days=7
32 exit $failed