Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.