Skip to content
Snippets Groups Projects
Commit efaad6c6 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

add passwd change test

parent 19ea555c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment