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

Re: Including whitespace in ldap searches



Peter Hubbard wrote:
G'day all,

We're having a slight bit of trouble with the automatic whitespace
removal feature.

Our clients need to be able to search on a unique number which is
embedded in an attribute field. The unique number is surrounded by
single space characters, and can be 7 or 8 digits long. The problem
comes when we search for a 7 digit number: because of the way wildcards
and spaces work together, and 8 digit number is sometimes returned.

Simply, we *need* to search on data delimited by whitespace. Is there a
way to do this? There was on our openldap v 2.0.23, but not any more on
v. 2.1.30. Does anyone have any ideas and/or suggestions?



Just to give a concrete example that uses standard attributes (I think Peter is using a non-standard schema)


$ ldapsearch -x -LLL "cn=Domain *" cn
dn: cn=Domain Admins,ou=Group,dc=ranger,dc=dnsalias,dc=com
cn: Domain Admins

[...]

dn: cn=Domain Controllers,ou=Group,dc=ranger,dc=dnsalias,dc=com
cn: Domain Controllers

dn: cn=DomainAdmins_service,cn=Sudo,cn=Config,ou=Hosts,dc=ranger,dc=dnsalias,dc=com
cn: DomainAdmins_service


dn: cn=DomainAdmins_ifup,cn=Sudo,cn=Config,ou=Hosts,dc=ranger,dc=dnsalias,dc=com
cn: DomainAdmins_ifup


dn: cn=DomainAdmins_urpmi_update,cn=Sudo,cn=Config,ou=Hosts,dc=ranger,dc=dnsalias,dc=com
cn: DomainAdmins_urpmi_update


This search should not be matching the last 3 entries above ...

Regards,
Buchan

--
Buchan Milne                      Senior Support Technician
Obsidian Systems                  http://www.obsidian.co.za
B.Eng                                RHCE (803004789010797)