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,baltimor e".
I have tried "ldapsearch -h -p -D <dn> -b -s "(&(cn=AJ)(myattriibute=ci ty*))" myattribute"
but this doesn't seem to work and returns all results as above.
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,baltimor
I have tried "ldapsearch -h -p -D <dn> -b -s "(&(cn=AJ)(myattriibute=ci
but this doesn't seem to work and returns all results as above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER