s4:pwsettings: Added blackbox tests.
[ira/wip.git] / source4 / setup / tests / blackbox_setpassword.sh
1 #!/bin/sh
2
3 if [ $# -lt 1 ]; then
4 cat <<EOF
5 Usage: blackbox_setpassword.sh PREFIX
6 EOF
7 exit 1;
8 fi
9
10 PREFIX="$1"
11 shift 1
12
13 . `dirname $0`/../../../testprogs/blackbox/subunit.sh
14
15 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
16
17 testit "newuser" $PYTHON ./setup/newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testpass
18
19 testit "setpassword" $PYTHON ./setup/setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testpass
20
21 testit "setpassword" $PYTHON ./setup/setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testpass --must-change-at-next-login
22
23 testit "pwsettings" $PYTHON ./setup/pwsettings --quiet set --configfile=$PREFIX/simple-dc/etc/smb.conf --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=default --max-pwd-age=default
24
25 exit $failed