Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm somewhat confused about LDAP query syntax.

Suppose there are two inetOrgPerson records for two employees, M being manager of E (that is, there's a 'manager' attribute with manager's dn as a value in E's entry).

I want to look up E's manager's attribute, like phone number, by performing a search that would find E's entry by matching some known attribute of E, then follow the dn found in 'manager' attribute and find M, then display M's phone number – all in a single LDAP query. Is that possible with, say, ldapsearch utility quering an OpenLDAP server?

share|improve this question

No. You are doing two things, looking up object A and its attributes then looking up object B based on object A's attributes. No LDAP server I'm aware of offers to do that in one step. You could write some code that implements such a method, but underneath it'll be two LDAP calls

share|improve this answer
"No LDAP server I'm aware of offers to do that in one step" - in OpenLDAP it is used quite extensively implementing the ACL-s. Hence the question... – badbishop Apr 19 '12 at 16:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .