LDAPMODRDN="$CLIENTDIR/ldapmodrdn $TOOLPROTO $TOOLARGS"
SLAPDTESTER=$PROGDIR/slapd-tester
LVL=${SLAPD_DEBUG-5}
-ADDR=127.0.0.1
+LOCALHOST=localhost
PORT=9009
SLAVEPORT=9010
-MASTERURI="ldap://localhost:$PORT/"
-SLAVEURI="ldap://localhost:$SLAVEPORT/"
+MASTERURI="ldap://${LOCALHOST}:$PORT/"
+SLAVEURI="ldap://${LOCALHOST}:$SLAVEPORT/"
LDIF=$DATADIR/test.ldif
LDIFGLUED=$DATADIR/test-glued.ldif
LDIFORDERED=$DATADIR/test-ordered.ldif
echo "Testing slapd searching..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -L -b "$BASEDN" -h localhost -p $PORT \
+ $LDAPSEARCH -L -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
cat /dev/null > $TESTOUT
echo "Testing base suffix searching..."
-$LDAPSEARCH -L -S "" -b "$BASEDN" -s base -h localhost -p $PORT \
+$LDAPSEARCH -L -S "" -b "$BASEDN" -s base -h $LOCALHOST -p $PORT \
'(objectclass=*)' >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed!"
echo " ------------ " >> $TESTOUT
echo "Testing user searching..."
-$LDAPSEARCH -L -S "" -b "uid=root,$BASEDN" -s base -h localhost -p $PORT \
+$LDAPSEARCH -L -S "" -b "uid=root,$BASEDN" -s base -h $LOCALHOST -p $PORT \
'(objectclass=*)' >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed!"
echo " ------------ " >> $TESTOUT
echo "Testing exact searching..."
-$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(uid=root)' >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed!"
echo " ------------ " >> $TESTOUT
echo "Testing OR searching..."
-$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(|(objectclass=person)(cn=root))' >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed!"
echo " ------------ " >> $TESTOUT
echo "Testing AND searching..."
-$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -L -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(&(objectclass=person)(cn=root))' >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed!"
echo "Using ldapsearch to retrieve all the entries..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1
+ $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
echo "Using ldapsearch to retrieve all the entries..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1
+ $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
echo "Using ldapsearch to retrieve all the entries..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -b "" -s base -h localhost:$PORT 'extensibleObject' > $SEARCHOUT 2>&1
+ $LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
echo "Using ldapsearch to retrieve all the entries..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -S "" -b "$BASEDN" -h localhost:$PORT > $SEARCHOUT 2>&1
+ $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT > $SEARCHOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
echo "Using ldapsearch to check that slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
done
echo "Using ldapadd to populate the database..."
-$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
$LDIFORDERED > $TESTOUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Using ldapsearch to read all the entries..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SEARCHOUT 2>&1
kill -HUP $PID
echo "Testing slapd searching..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
cat /dev/null > $SEARCHOUT
echo "Testing exact searching..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'sn=jensen' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing OR searching..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(|(undefined=fubar)(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing AND matching and ends-with searching..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing NOT searching..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'(!(objectclass=person))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Testing slapd modify operations..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
fi
echo "Testing modify, add, and delete..."
-$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
version: 1
fi
echo "Using ldapsearch to retrieve all the entries..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectClass=*' > $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
# Make sure we can search the database
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+ $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectClass=*' > $INITOUT 2>&1
RC=$?
if test $RC = 1 ; then
# -r used to do remove of old rdn
echo "Testing modrdn(deleteoldrdn=0)..."
-$LDAPMODRDN -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \
+$LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \
$TESTOUT 2>&1 'cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones III'
RC=$?
fi
echo "Testing modrdn(deleteoldrdn=1)..."
-$LDAPMODRDN -D "$MANAGERDN" -r -h localhost -p $PORT -w $PASSWD >> \
+$LDAPMODRDN -D "$MANAGERDN" -r -h $LOCALHOST -p $PORT -w $PASSWD >> \
$TESTOUT 2>&1 'cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US' 'cn=James A Jones II'
RC=$?
# Ensure the new rdn's can be found
echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones III)..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'cn=James A Jones III' > $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones II)..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'cn=James A Jones II' > $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
# an attribute.
echo "Using ldapsearch to retrieve entries using removed rdn (cn=James A Jones 2)..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'cn=James A Jones 2' > $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Using ldapsearch to retrieve all the entries..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectClass=*' > $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Testing modrdn(deleteoldrdn=1), modrdn with new rdn already an att val..."
-$LDAPMODRDN -D "$MANAGERDN" -r -h localhost -p $PORT -w $PASSWD > \
+$LDAPMODRDN -D "$MANAGERDN" -r -h $LOCALHOST -p $PORT -w $PASSWD > \
/dev/null 2>&1 'cn=James A Jones III, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones 1'
RC=$?
# present
echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones 1)..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'cn=James A Jones 1' > $SEARCHOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Testing slapd access control..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
# give us nothing if we're not bound, and should return all attributes
# if we're bound as anyone under UM.
#
-$LDAPSEARCH -b "$JAJDN" -h localhost -p $PORT "objectclass=*" \
+$LDAPSEARCH -b "$JAJDN" -h $LOCALHOST -p $PORT "objectclass=*" \
>> $SEARCHOUT 2>&1
-$LDAPSEARCH -b "$JAJDN" -h localhost -p $PORT \
+$LDAPSEARCH -b "$JAJDN" -h $LOCALHOST -p $PORT \
-D "$BABSDN" -w bjensen "objectclass=*" >> $SEARCHOUT 2>&1
# fail when we add some DN other than our own, and should succeed when
# we add our own DN.
# bjensen
-$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj > \
+$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj > \
$TESTOUT 2>&1 << EOMODS1
version: 1
dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US
EOMODS1
-$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj >> \
+$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj >> \
$TESTOUT 2>&1 << EOMODS2
version: 1
# 1) bound as "James A Jones 1" - should fail
# 2) bound as "Barbara Jensen" - should succeed
#
-$LDAPMODIFY -D "$JAJDN" -h localhost -p $PORT -w jaj >> \
+$LDAPMODIFY -D "$JAJDN" -h $LOCALHOST -p $PORT -w jaj >> \
$TESTOUT 2>&1 << EOMODS3
dn: cn=ITD Staff, ou=Groups, o=University of Michigan, c=US
EOMODS3
-$LDAPMODIFY -D "$BJORNSDN" -h localhost -p $PORT -w bjorn >> \
+$LDAPMODIFY -D "$BJORNSDN" -h $LOCALHOST -p $PORT -w bjorn >> \
$TESTOUT 2>&1 << EOMODS4
# COMMENT
version: 1
EOMODS4
echo "Using ldapsearch to retrieve all the entries..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectClass=*' | . $LDIFFILTER >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
echo "Using ldapsearch to check that master slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
echo "Using ldapsearch to check that slave slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
SLURPPID=$!
echo "Using ldapadd to populate the master directory..."
-$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
if test $RC != 0 ; then
# Do some modifications
#
-$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
changetype: modify
sleep 15
echo "Using ldapsearch to read all the entries from the master..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $MASTEROUT 2>&1
if test $RC != 0 ; then
fi
echo "Using ldapsearch to read all the entries from the slave..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'objectclass=*' > $SLAVEOUT 2>&1
if test $RC != 0 ; then
echo "Using ldapsearch to check that slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
done
echo "Using tester for concurrent server access..."
-$SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h localhost -p $PORT -D "$MANAGERDN" -w $PASSWD -l 50
+$SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT -D "$MANAGERDN" -w $PASSWD -l 50
RC=$?
if test $RC != 0 ; then
fi
echo "Using ldapsearch to retrieve all the entries..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectClass=*' > $SEARCHOUT 2>&1
RC=$?
echo "Testing for master slapd..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
echo "Testing for slave slapd..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $SLAVEPORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
cat /dev/null > $SEARCHOUT
echo "Testing exact searching..."
-$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'sn=jensen' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing OR searching..."
-$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing AND matching and ends-with searching..."
-$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
fi
echo "Testing NOT searching..."
-$LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -C -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'(!(objectclass=person))' >> $SEARCHOUT 2>&1
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
echo "Using ldapsearch to check that slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
done
echo "Using ldapadd to populate the database..."
-$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
$LDIFPASSWD > $TESTOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "Using ldapsearch to verify population ..."
echo "++ Initial search" >> $SEARCHOUT
-$LDAPSEARCH -h localhost -p $PORT \
+$LDAPSEARCH -h $LOCALHOST -p $PORT \
-D "$MANAGERDN" -w $PASSWD \
-b "$BASEDN" \
'objectclass=*' >> $SEARCHOUT 2>&1
echo "Using ldappasswd (PASS 1) ..."
echo "Pass 1" >> $TESTOUT
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w secret -s newsecret \
-D "cn=md5, $BASEDN" >> $TESTOUT 2>&1
RC=$?
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w $PASSWD -s newsecret \
-D $MANAGERDN "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w secret -s newsecret \
-D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w secret -s newsecret \
-D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "" >> $TESTOUT
echo "Pass 2" >> $TESTOUT
echo "Using ldappasswd (PASS 2) ..."
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=md5, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=smd5, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=sha, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
kill -HUP $PID
exit $RC
fi
-$LDAPPASSWD -h localhost -p $PORT \
+$LDAPPASSWD -h $LOCALHOST -p $PORT \
-w newsecret \
-D "cn=ssha, $BASEDN" >> $TESTOUT 2>&1
if test $RC != 0 ; then
echo "Using ldapsearch to check that master slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
echo "Using ldapsearch to check that slave slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
SLURPPID=$!
echo "Using ldapadd to populate the master directory..."
-$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
if test $RC != 0 ; then
# Do some modifications
#
-$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD > \
$TESTOUT 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
changetype: modify
sleep 15
echo "Using ldapsearch to read all the entries from the master..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $MASTEROUT 2>&1
if test $RC != 0 ; then
fi
echo "Using ldapsearch to read the subtree entries from the master..."
-$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SUBMASTEROUT 2>&1
if test $RC != 0 ; then
fi
echo "Using ldapsearch to read all the entries from the slave..."
-$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h localhost -p $SLAVEPORT \
+$LDAPSEARCH -S "" -b "ou=Groups, $BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'objectclass=*' > $SLAVEOUT 2>&1
if test $RC != 0 ; then
echo "Using ldapsearch to retrieve all the entries..."
cd test-db
for i in 0 1 2 3 4 5; do
- ../$LDAPSEARCH -b "$BASEDN" -h localhost:$PORT > ../$SEARCHOUT 2>&1
+ ../$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT > ../$SEARCHOUT 2>&1
RC=$?
if test $RC = 1 ; then
echo "Waiting 5 seconds for slapd to start..."
echo "Using ldapsearch to check that slapd is running..."
for i in 0 1 2 3 4 5; do
- $LDAPSEARCH -s base -b "$MONITOR" -h localhost -p $PORT \
+ $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
'objectclass=*' > /dev/null 2>&1
RC=$?
if test $RC = 1 ; then
done
echo "Using ldapadd to populate the glued database..."
-$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
+$LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
$LDIFORDERED > $TESTOUT 2>&1
RC=$?
if test $RC != 0 ; then
fi
echo "Using ldapsearch to read all the entries..."
-$LDAPSEARCH -b "$BASEDN" -h localhost -p $PORT \
+$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT \
'objectclass=*' > $SEARCHOUT 2>&1
kill -HUP $PID