I've been having trouble trying to find some good documentation on how to retrieve operational attributes from OpenLDAP.
I would like to retrieve the base distinguished name of an LDAP server by doing an LDAP search.
How come my search doesn't work when I explicitly ask for namingContexts attribute? I've been told that I need to add a plus ('+') sign to the attribute list.
If this is the case, should I get rid of the "namingContexts" attribute or have both?
ldapsearch -H ldap://ldap.mydomain.com -x -s base -b "" +
# note the + returns operational attributes
Edit: Note how it looks like the attributes requested are empty. Shouldn't the plus sign be in the attribute list? http://www.zytrax.com/books/ldap/ch3/#operational
reference: plus sign operator with OpenLDAP
Best Answer
What is not working? Do you recieve an error?
When there is a plus sign it returns all the attributes, regardless if namingContexts is added.
Using:
Returns:
It is also listed using:
Returning: