[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDAPSearch and modifyTimestamp range



I am trying to search a range of entries by their modifytimestamp, but I haven't figured out how to specify a range between dates. It works when I don't specify a range, but as soon as I add a range it fails with Bad Search Filter -7.

wolf:~ alex$ ldapsearch -D "..." -w ... -x -b "..." "modifytimestamp"
# extended LDIF
#
# LDAPv3
# base <o=j2anywhere,c=uk> with scope sub
# filter: (objectclass=*)
# requesting: modifytimestamp
#

# j2anywhere, uk
dn: o=j2anywhere,c=uk
modifyTimestamp: 20051010194035Z
...

wolf:~ alex$ ldapsearch -D "..." -w ... -x -b "..." "modifytimestamp>=2006030*"
# extended LDIF
#
# LDAPv3
# base <o=j2anywhere,c=uk> with scope sub
# filter: modifytimestamp>=2006030*
# requesting: ALL
#


ldapsearch: ldap_search_ext: Bad search filter (-7)

Thanks in advance

Alexander Hartner
alex@j2anywhere.com

Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
  - The Tao of Programming