From: Pierangelo Masarati Date: Sat, 21 Aug 2004 09:55:16 +0000 (+0000) Subject: add passwd change test X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~671 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=efaad6c616a34e9d3bdb51c09efb77c0315a6eac;p=openldap add passwd change test --- diff --git a/tests/scripts/test031-sql b/tests/scripts/test031-sql index a7bc677918..174a77ffef 100755 --- a/tests/scripts/test031-sql +++ b/tests/scripts/test031-sql @@ -328,6 +328,28 @@ EOMODS exit $RC fi + NEWPW="newsecret" + echo "Testing passwd change..." + $LDAPPASSWD -h $LOCALHOST -p $PORT1 \ + -D "${BINDDN}" -w ${BINDPW} -s ${NEWPW} \ + "$BINDDN" >> $TESTOUT 2>&1 + + RC=$? + if test $RC != 0 ; then + echo "ldappasswd failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + fi + + echo "Testing bind with new secret..." + $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "$BINDDN" -w $NEWPW + RC=$? + if test $RC != 0 ; then + echo "ldapwhoami failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + fi + echo "Using ldapsearch to retrieve all the entries..." $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" \ "objectClass=*" > $SEARCHOUT 2>&1