Oracle® Internet Directory Administrator's Guide 10g (9.0.4) Part Number B12118-01 |
|
Oracle Directory Server Administration, 9 of 10
Because entries sometimes have distinguished names that are fairly long and cumbersome, Oracle Internet Directory makes it easier to administer them by using alias objects. When someone looks up--that is, references--an object by using an alias, the alias is dereferenced, and what is returned is the object to which the alias points. For example, the alias, Server1
, can be dereferenced so that it points to the fully qualified DN--namely, dc=server1,dc=us,dc=myCompnay,dc=com
. This feature also enables you to devise structures that are not strictly hierarchical.
This section provides examples of how to add, search for, and modify alias entries, and it includes a list of messages. It contains these topics:
An alias entry uses the object class alias
to distinguish it from object entries in a directory. The definition of that object class is as follows:
(2.5.6.1 NAME 'alias' SUP top STRUCTURAL MUST aliasedObjectName)
An alias entry also contains the aliasedObjectName
attribute that, in turn, contains the DN of the object to which it is pointing. The definition of that attribute is as follows:
(2.4.5.1 NAME 'aliasedObjectName" EQUALITY distinguishedNmameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE)
Figure 5-2 and the accompanying text provides an example of alias entry dereferencing.
In Figure 5-2, ou=uk sales,ou=global sales,o=myCompany,c=us
is an alias entry pointing to the ou=sales,o=myCompany,c=uk
entry.
When anyone references ou=uk sales,ou=global sales,o=oracle,c=us
, the directory server automatically reroutes them to the real entry, ou=sales,o=oracle,c=uk
.
This section contains these examples:
To add an alias entry, you create a normal entry in LDIF and an alias entry pointing to the real entry. Following the steps in this example produces the tree in Figure 5-3.
dn: c=us c: us objectclass: country dn: o=oracle, c=us o: oracle objectclass:organization dn: ou=Area1, c=us objectclass: alias aliasedObjectName: o=oracle, c=us dn: cn=John Doe, o=oracle, c=us cn: John Doe objectclass: person dn: cn=President, o=oracle, c=us objectclass: alias aliasedobjectname: cn=John Doe, o=oracle, c=us
ldapadd -p port -h host -f My_file.ldif
See Also:
Entry Alias Dereferencing Messages for error messages |
In Figure 5-3, the letter A represents an alias entry, where:
In each search you specify, there are flags you can set. The search is performed based on the flag you specify.
The flags pertaining to alias dereferencing are -a never
and -a find
.
By default, the dereference flag in ldapsearch is -a never
and thus the directory server does not perform any dereferencing for alias entries.
A base search finds the top level of the alias entry you specify.
This example shows a base search of ou=Area1,c=us
with a filter of "objectclass=*"
with the dereferencing flag set to -a find
.
ldapsearch -p port -h host -b "ou=Area1,c=us" -a find -s base "objectclass=*"
The directory server, during the base search, looks up the base specified in the search request and returns it to the user. However, if the base is an alias entry and, as in the example, -a find
is specified in the search request, then the directory server automatically dereferences the alias entry and returns the entry it points to. In this example, the search dereferences ou=Area1,c=us
, which is an alias entry, and returns o=MyCompany,c=us
.
A one-level search finds only the child to the base level you specify.
This example shows a one-level search of "ou=Area1,c=us"
with a filter of "objectclass=*"
with the dereferencing flag set to -a find
.
ldapsearch -p port -h host -b "ou=Area1,c=us" -a find -s one "objectclass=*"
The directory server performs the search in two steps.
In the example, -a find
is specified in the search request, and thus the directory server automatically dereferences while looking up the base (the first step), but does not dereference alias entries that are one level under the base. Therefore, the search dereferences ou=Area1,c=us
, which is an alias entry, and then looks up one-level entries under o=MyCompany,c=us
. One of the one-level entries is cn=President,o=MyCompany,c=us
that is not dereferenced and is returned as is.
Thus, the search returns cn=President,o=MyCompany,c=us
and cn=John Doe,o=MyCompany,c=us
.
A subtree search finds the base, children, and grand children.
This example shows a subtree search of "ou=Area1,c=us"
with a filter of "objectclass=*"
with the dereferencing flag set to -a find
.
ldapsearch -p port -h host -b "ou=Area1,c=us" -a find -s one "objectclass=*"
The directory server performs the search in two steps.
In the example, -a find
is specified in the search request, and thus the directory server automatically dereferences while looking up the base (the first step), but does not dereference alias entries that are under the base. Therefore, the search dereferences ou=Area1,c=us
, which is an alias entry, and then looks up entries under o=MyCompany,c=us
. One of the entries is cn=President,o=MyCompany,c=us
that is not dereferenced and is returned as is.
Thus, the search returns:
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 -p port -h host -f My_file.ldif
The following messages are returned when encountering the alias issue in the description column.
|
![]() Copyright © 1999, 2003 Oracle Corporation. All Rights Reserved. |
|