Create a sample LDIF file, My_file.ldif, with the following entries:

17-6 Oracle Fusion Middleware Administrators Guide for Oracle Internet Directory Subtree Search with the Dereferencing Flag -a always This example shows a subtree search of ou=Area1,c=us with a filter of objectclass= with the dereferencing flag set to -a always. ldapsearch -p port -h host -b ou=Area1,c=us -a always -s sub objectclass= The directory server dereferences the base entry and returns it. It also returns all entries under the dereferenced base. If any alias entries are found, it dereferences them and returns all entries under them as well. In this example, the base entry is ou=Area1,c=us, which is dereferenced to o=MyCompany,c=us, which is returned. There are two entries under o=MyCompany,c=us. One is cn=President,o=MyCompany,c=us, which is returned and also dereferenced to cn=John Doe,o=MyCompany,c=us, which is returned. The other entry under o=MyCompany,c=us, which has already been returned. So the result is o=MyCompany,c=us and cn=John Doe,o=MyCompany,c=us. Modifying Alias Entries This example shows how to modify alias entries. It creates a sample LDIF file, My_file.ldif with following entries: dn: cn=President, o=MyCompany, c=us changetype : modify replace: aliasedobjectname aliasedobjectname: cn=XYZ, o=MyCompany, c=us Modify the alias entry using the following command: ldapmodify -D cn=orcladmin -q -p port -h host -f My_file.ldif Interpreting Messages Related to Alias Dereferencing Table 17–2 lists the messages related to alias entry dereferencing and the corresponding meaning for each message. Table 17–2 Entry Alias Dereferencing Messages Message Meaning Alias Problem Either of the following have occurred: ■ An alias was dereferenced, but it did not point to an entry in the DIT. ■ The user tries to add an alias entry whose parent is an alias. Alias Dereferencing Problem The user cannot dereference an alias because of access control issues. No Such Object The server cannot find the base DN specified in the search request. Invalid DN Syntax When adding or modifying an alias entry, if the value specified for aliasedObjectName has invalid DN syntax, then the directory server returns this error message to the client. Success The client operation successfully completes. When the dereferenced target does exist but does not match the filter specified in the search request, the server returns a success message with no matched entry.