]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test025-limits
ITS #3131 - propagate SSF to syncrepl operation
[openldap] / tests / scripts / test025-limits
index aee42da9017876108d88273e3d05a0335f19ac78..1f22388fabe6f8bbdaedfa913b218e834e102d40 100755 (executable)
@@ -71,10 +71,10 @@ echo ""
 
 echo "Testing no limits requested for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' >$SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -89,10 +89,10 @@ esac
 SIZELIMIT=2
 echo "Testing size limit request ($SIZELIMIT) for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -110,10 +110,10 @@ esac
 TIMELIMIT=10
 echo "Testing time limit request ($TIMELIMIT s) for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -l $TIMELIMIT \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -130,10 +130,10 @@ esac
 
 echo "Testing no limits requested for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
@@ -151,10 +151,10 @@ esac
 SIZELIMIT=2
 echo "Testing lower than soft limit request ($SIZELIMIT) for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -180,10 +180,10 @@ esac
 SIZELIMIT=100
 echo "Testing higher than soft limit request ($SIZELIMIT) for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -209,10 +209,10 @@ esac
 SIZELIMIT=2
 echo "Testing lower than hard limit request ($SIZELIMIT) for hard limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -230,10 +230,10 @@ esac
 SIZELIMIT=100
 echo "Testing higher than hard limit request ($SIZELIMIT) for hard limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -253,10 +253,10 @@ esac
 
 echo "Testing lower than unchecked limit request for unchecked limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
        '(uid=uncheckedlimited)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -273,10 +273,10 @@ esac
 
 echo "Testing higher than unchecked limit requested for unchecked limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -293,10 +293,10 @@ esac
 
 echo "Testing no limits requested for unchecked limited group..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User 2,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User 2,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -313,10 +313,10 @@ esac
 
 echo "Testing no limits requested for limited regex..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Foo User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Foo User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -341,10 +341,10 @@ esac
 
 echo "Testing no limits requested for limited onelevel..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Bar User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Bar User,ou=People,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -369,10 +369,10 @@ esac
 
 echo "Testing no limit requested for limited children..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited Users,ou=Groups,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited Users,ou=Groups,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -397,10 +397,10 @@ esac
 
 echo "Testing no limit requested for limited subtree..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User 3,ou=Admin,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User 3,ou=Admin,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -425,10 +425,10 @@ esac
 
 echo "Testing no limit requested for limited users..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Special User,o=University of Michigan,c=US' \
+       -D 'cn=Special User,dc=example,dc=com' \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -455,7 +455,7 @@ echo "Testing no limit requested for limited anonymous..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
        '(objectClass=*)' > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -497,10 +497,10 @@ echo ""
 PAGESIZE=5
 echo "Testing no limits requested for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null >$SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -515,10 +515,10 @@ esac
 SIZELIMIT=2
 echo "Testing size limit request ($SIZELIMIT) for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -536,10 +536,10 @@ esac
 TIMELIMIT=10
 echo "Testing time limit request ($TIMELIMIT s) for unlimited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -l $TIMELIMIT \
-       -D 'cn=Unlimited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success (got $COUNT entries)"
@@ -556,10 +556,10 @@ esac
 
 echo "Testing no limits requested for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
@@ -577,10 +577,10 @@ esac
 SIZELIMIT=2
 echo "Testing lower than soft limit request ($SIZELIMIT) for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -606,10 +606,10 @@ esac
 SIZELIMIT=100
 echo "Testing higher than soft limit request ($SIZELIMIT) for soft limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Soft Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Soft Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -635,10 +635,10 @@ esac
 SIZELIMIT=2
 echo "Testing lower than hard limit request ($SIZELIMIT) for hard limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -656,10 +656,10 @@ esac
 SIZELIMIT=100
 echo "Testing higher than hard limit request ($SIZELIMIT) for hard limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
-       -D 'cn=Hard Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Hard Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
@@ -679,10 +679,10 @@ esac
 
 echo "Testing lower than unchecked limit request for unchecked limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(uid=uncheckedlimited)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -699,10 +699,10 @@ esac
 
 echo "Testing higher than unchecked limit requested for unchecked limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unchecked Limited User,ou=People,o=University of Michigan,c=US' \
+       -D 'cn=Unchecked Limited User,ou=People,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -723,10 +723,10 @@ echo ""
 
 echo "Testing no limit requested for unlimited page size ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Unlimited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Unlimited User,ou=Paged Results Users,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
@@ -743,10 +743,10 @@ esac
 
 echo "Testing no limit requested for limited page size ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Page Size Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Page Size Limited User,ou=Paged Results Users,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side page size limit (got $COUNT entries)"
@@ -766,10 +766,10 @@ esac
 
 echo "Testing no limit requested for pagedResults disabled ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Paged Results Disabled User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Paged Results Disabled User,ou=Paged Results Users,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -789,10 +789,10 @@ esac
 
 echo "Testing no limit requested for pagedResults total count limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
        -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
@@ -813,10 +813,10 @@ esac
 SIZELIMIT=8
 echo "Testing higher than hard but lower then total count limit requested for pagedResults total count limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
        -z $SIZELIMIT -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"
@@ -845,10 +845,10 @@ esac
 SIZELIMIT=15
 echo "Testing higher than total count limit requested for pagedResults total count limited ID..."
 $LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
-       -D 'cn=Paged Results Limited User,ou=Paged Results Users,o=University of Michigan,c=US' \
+       -D 'cn=Paged Results Limited User,ou=Paged Results Users,dc=example,dc=com' \
        -z $SIZELIMIT -E '!pr='$PAGESIZE '(objectClass=*)' </dev/null > $SEARCHOUT 2>&1
 RC=$?
-COUNT=`cat $SEARCHOUT | egrep '^# numEntries:' | sed 's;[^0-9]\+\([0-9]\+\)$;\1;'`
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
 case $RC in
        0)
                echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side unchecked limit (got $COUNT entries)"