Link to home
Start Free TrialLog in
Avatar of shrikrishnasamant
shrikrishnasamant

asked on

LDAP search filter for multi value attribute

Hi,
I have a ldap db and on of its attributes is multi-valued. When i do an ldapsearch on an user entry and ask for result of that attribute for example
ldapsearch -h -p -D <dn> -b -s "(cn=AJ)" myattribute
It returns for cn=AJ
myattribute=name,AJ
myattribute=place,USA
myattribute=city,baltimore
Is there any way that i can get only the one result that i require. For example if i want only city out of that multivalued attribute it should only return "myattribute=city,baltimore".
I have tried "ldapsearch -h -p -D <dn> -b -s "(&(cn=AJ)(myattriibute=city*))" myattribute"
but this doesn't seem to work and returns all results as above.
Avatar of shrikrishnasamant
shrikrishnasamant

ASKER

This is kind of very urgent
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial