Commit ba921854 authored by HAMANO Tsukasa's avatar HAMANO Tsukasa Committed by Quanah Gibson-Mount
Browse files

ITS#9497 fix password expiration test

parent 31b0bf68
Pipeline #3289 passed with stage
in 53 minutes and 41 seconds
......@@ -16,10 +16,10 @@
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
if test $PPOLICY = ppolicyno; then
if test $PPOLICY = ppolicyno; then
echo "Password policy overlay not available, test skipped"
exit 0
fi
fi
mkdir -p $TESTDIR $DBDIR1
......@@ -119,6 +119,30 @@ if test $RC != 0 ; then
exit $RC
fi
echo "Changing password to reset pwdChangedTime"
$LDAPPASSWD -H $URI1 \
-w secret -s $PASS \
-D "$MANAGERDN" "$USER" >> $TESTOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldappasswd failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
$LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
$TESTOUT 2>&1 << EOMODS
dn: $USER
changetype: modify
delete: pwdReset
EOMODS
RC=$?
if test $RC != 0 ; then
echo "ldapmodify failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
fi
DELAY=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD \
-b "$USER" -E accountUsability 1.1 | sed -n -e 's/.*expire=\(\d*\)/\1/p'`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment