2008-05-22 03:47:22 +04:00
#!/bin/sh
2008-05-30 08:36:24 +04:00
if [ $# -lt 1 ] ; then
2008-05-22 03:47:22 +04:00
cat <<EOF
2008-05-30 08:36:24 +04:00
Usage: blackbox_setpassword.sh PREFIX
2008-05-22 03:47:22 +04:00
EOF
exit 1;
fi
PREFIX = " $1 "
2008-05-30 08:36:24 +04:00
shift 1
2008-05-22 03:47:22 +04:00
. ` dirname $0 ` /../../../testprogs/blackbox/subunit.sh
2010-10-24 06:27:26 +04:00
samba_tool = "./bin/samba-tool"
2009-12-30 22:40:11 +03:00
2010-07-09 20:29:27 +04:00
rm -rf $PREFIX /simple-dc
2011-02-03 09:31:37 +03:00
testit "simple-dc" $PYTHON $SRCDIR /source4/setup/provision --server-role= "dc" --domain= FOO --realm= foo.example.com --domain-sid= S-1-5-21-4177067393-1453636373-93818738 --targetdir= $PREFIX /simple-dc
2008-05-22 03:47:22 +04:00
2011-10-24 02:23:28 +04:00
testit "user add" $samba_tool user create --configfile= $PREFIX /simple-dc/etc/smb.conf testuser testp@ssw0Rd
2008-05-22 03:47:22 +04:00
2011-06-27 22:31:34 +04:00
testit "setpassword" $samba_tool user setpassword --configfile= $PREFIX /simple-dc/etc/smb.conf testuser --newpassword= testp@ssw0Rd
2008-05-22 03:47:22 +04:00
2011-06-27 22:31:34 +04:00
testit "setpassword" $samba_tool user setpassword --configfile= $PREFIX /simple-dc/etc/smb.conf testuser --newpassword= testp@ssw0Rd --must-change-at-next-login
2009-06-17 03:14:17 +04:00
2011-06-28 00:49:43 +04:00
testit "passwordsettings" $samba_tool domain passwordsettings --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 --store-plaintext= on
2009-09-08 15:01:18 +04:00
2008-05-22 03:47:22 +04:00
exit $failed