El Guapo
El Guapo

Reputation: 5781

LDAP Search on multiple fields

I know the answer is probably no, however, I figured before I give up I may as well ask.

Say I have 3 attributes in my LDAP... fullname, sn and givenname... and for whatever reason the administrator, or the person who is doing the entry enters a person's "fullname" as lastname, firstname (sn, givenname), however, I want to do a search for firstname lastname (givenname sn).

Is it possible to create a filter something like this:

(&((givenname sn)=Bob Smith))

I've tried that and it obviously doesn't work. This is a new requirement for my application and I don't have the power to change how the fullname is stored in the LDAP.

Thanks.

Upvotes: 0

Views: 1671

Answers (1)

user207421
user207421

Reputation: 310840

Just search for

(&(givenName=Bob)(sn=Smith))

No need to trouble about the fullname attribute at all.

Upvotes: 5

Related Questions