3 Usage: test_net_ads_fips.sh DC_SERVER DC_USERNAME DC_PASSWORD PREFIX_ABS
13 HOSTNAME
=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10`
17 WORKDIR
=`mktemp -d -p .`
18 WORKDIR
=`basename $WORKDIR`
19 cp -a client
/* $WORKDIR/
20 sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf
21 sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf
22 rm -f $WORKDIR/private
/secrets.tdb
27 net_tool
="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads"
30 .
`dirname $0`/subunit.sh
32 # This make sure we are able to join AD in FIPS mode with Kerberos (NTLM doesn't work in FIPS mode).
33 testit
"join" $VALGRIND $net_tool ads
join -k -U$DC_USERNAME%$DC_PASSWORD || failed
=`expr $failed + 1`
35 testit
"testjoin" $VALGRIND $net_tool ads testjoin
-kP || failed
=`expr $failed + 1`
37 testit
"changetrustpw" $VALGRIND $net_tool ads changetrustpw || failed
=`expr $failed + 1`
39 testit
"leave" $VALGRIND $net_tool ads leave
-k -U$DC_USERNAME%$DC_PASSWORD || failed
=`expr $failed + 1`
41 rm -rf $BASEDIR/$WORKDIR