(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) General LDAP FAQ : (Category) Misc. : (Answer) How do I create an alias entry?
To create an alias, you need to create an entry with the objectClass's alias and extensibleObject. The extensibleObject allows you to include the part of the DN in the alias, which is required before one can be added.

An example LDIF(5) file is

 dn: uid=alias,ou=People,dc=example,dc=net
 objectclass: alias
 objectclass: extensibleObject
 uid: alias
 aliasedobjectname: uid=target,ou=Retired People,dc=example,dc=com
When searching for objects, if dereferencing is enabled and an alias entry is found with the search scope, the aliased object will be returned. That is,
 ldapsearch -x -a search -b "ou=People,dc=example,dc=net"
would return the "uid=target,ou=Retired People,dc=example,dc=com" object.
you can also expect getting "target" results by searching with "alias" base
ldapsearch -x -a always -b uid=alias,ou=People,dc=example,dc=net <filter>
[Append to This Answer]
Previous: (Answer) How do you discover which LDAPv3 features/extensions an LDAP server supports?
This document is: http://www.openldap.org/faq/index.cgi?file=1111
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org