Monday, 15 February 2010

LDAP filter: Can I search for the department number of a client in a multi-valued attribute? -



LDAP filter: Can I search for the department number of a client in a multi-valued attribute? -

can retrieve section number of client out of multi value attribute? lets assume have user can access several customers , customers have other section structures. so, want store these info in multi value field next structure: customer:departmentnumber

now example: retrieve section number 124 client 400, how possible? illustration of user below:

dn: cn=joe,ou=people,dc=company,dc=com cn: joe section number: 300: 1; 400: 124; 108: 25;

i want retrieve 124, nil else. this? departmentnumber=400:*;

thanks anwser!

cheers roger

in construction shown, have no method identify "customer 400".

btw: "department number" not valid ldap attribute name.

not sure format construction in either.

in ldif format construction more like:

dn: cn=joe,ou=people,dc=company,dc=com cn: joe departmentnumber: 300 departmentnumber: 1 departmentnumber: 400 departmentnumber: 124 departmentnumber: 108 departmentnumber: 25 customer: 400

in case filter be:

(&(customer=400)(departmentnumber=400))

if using ldapsearch like:

ldapsearch -d "cn=administrator" -w secret -p 389 -h dc.company.com -b "ou=people,dc=company,dc=com" -s sub "(&(customer=400)(departmentnumber=400))"

this homecoming entries match filter "(&(customer=400)(departmentnumber=400))".

if receive searchresult, can assured departmentnumber=400.

you might more 1 result.

-jim

filter ldap ldap-query

No comments:

Post a Comment