11 Managing Naming Contexts

To enable users to search for specific naming contexts, you can publish those naming contexts. This section contains these topics:

11.1 Introduction to Managing Naming Contexts

See "Naming Contexts" for a description of naming contexts.

To publish a naming context, you specify the topmost entry of each naming context as a value of the namingContexts attribute in the root DSE. For example, suppose you have a DIT with three major naming contexts, the topmost entries of which are c=uk, c=us, and c=de. If these entries are specified as values in the namingContexts attribute, then a user, by specifying the appropriate filter, can find information about them by searching the root DSE. The user can then focus the search—for example, by concentrating on the c=de naming context in particular.

11.2 Searching for Published Naming Contexts

To search for published naming contexts, perform a base search on the root DSE with objectClass =* specified as a search filter. The retrieved information includes those entries specified in the namingContexts attribute. For example:

ldapsearch -p 3060 -q -D cn=orcladmin -b "" -s base -L "objectclass=*" \   namingcontexts 


This command will not return anything unless naming contexts have been published.

Before you publish a naming context, be sure that:

  • You are a directory administrator with the necessary access to the root DSE.

  • The topmost entry of that naming context exists in the directory.

11.3 Publishing a Naming Context

You use ldapmodify to publish a naming context. The namingContexts attribute is multi-valued, so you can specify multiple naming contexts.

You can modify namingContexts by using the command-line:

ldapmodify -D cn=orcladmin -q -p portNum -h hostname -f ldifFile 

The following sample LDIF file specifies the entry c=uk as a naming context.

changetype: modify
add: namingcontexts
namingcontexts: c=uk