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