Skip to Content
Active Directory Cookbook
book

Active Directory Cookbook

by Robbie Allen
September 2003
Intermediate to advanced
624 pages
15h 49m
English
O'Reilly Media, Inc.
Content preview from Active Directory Cookbook

4.13. Dynamically Linking an Auxiliary Class

Tip

This recipe requires the Windows Server 2003 forest functional level.

Problem

You want to dynamically link an auxiliary class to an existing object instance.

Solution

In each solution below, an example of adding the custom rallencorp-SalesUser auxiliary class to the jsmith user object will be described.

Using a graphical user interface

  1. Follow the directions for Recipe 4.11.

  2. Edit the values for the objectClass attribute.

  3. For “Value to add,” enter rallencorp-SalesUser.

  4. Click Add.

  5. Click OK twice.

Using a command-line interface

Create an LDIF file called dynamically_link_class.ldf with the following contents:

dn: cn=jsmith,cn=users,dc=rallencorp,dc=com
changetype: modify
add: objectClass
objectClass: rallencorp-SalesUser
-

then run the following command:

> ldifde -v -i -f dynamically_link_class.ldf

Using VBScript

const ADS_PROPERTY_APPEND = 3
set objUser = GetObject("LDAP://cn=jsmith,cn=users,dc=rallencorp,dc=com")
objUser.PutEx ADS_PROPERTY_APPEND,"objectClass",Array("rallencorp-SalesUser")
objUser.SetInfo

Discussion

Dynamically linking an auxiliary class to an object is an easy way to use new attributes without modifying the object class definition in the schema directly. In Windows 2000, auxiliary classes could only be statically linked in the schema. With Windows Server 2003, you can dynamically link them by appending the auxiliary class name to the objectClass attribute of an object.

A situation in which it makes more sense to dynamically link auxiliary ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory Administration Cookbook

Active Directory Administration Cookbook

Sander Berkouwer
Active Directory Cookbook, 3rd Edition

Active Directory Cookbook, 3rd Edition

Laura E. Hunter, Robbie Allen
Active Directory Cookbook, 4th Edition

Active Directory Cookbook, 4th Edition

Brian Svidergol, Robbie Allen

Publisher Resources

ISBN: 0596004648Supplemental ContentCatalog PageErrata