Directory Services

Adding ADAM User Classes

[This documentation is preliminary and subject to change.]

To extend the ADAM schema to include object class defintions for four additional user classes (inetOrgPerson, User, Organizational-Person, and Person) use the definitions for these object classes in the adamuser.ldf file.

The adamuser.ldf file is an LDAP Data Interchange Format (LDIF) file. Use the following command to run the LDIFDE utility to load this LDIF file:

ADAMPath\ldifde.exe -i -f ADAMPath\adamuser.ldf -s Server:Port [-b Username Domain Password] -k -j . -c "CN=Schema,CN=Configuration,DC=X" #schemaNamingContext

In the preceding command:

The command uses the credentials of the currently logged on user if you do not specify the -b option and its parameters.

For more information about extending the Active Directory schema using the LDIFDE utility, see LDIF Scripts.

After you have extended the schema by running the following code example, create inetOrgPerson objects by Creating inetOrgPerson Objects in ADAM.

The following VBScript code example creates a command line to run the ldifde.exe application to load the adamuser.ldf file that is installed with ADAM.

' Extend Schema with ADAM User Classes.

' Use ldifde.exe to load adamuser.ldf to an ADAM instance
' while checking the file signature with
' Creates a log file ldif.log in the script directory.

Option Explicit

Const conWindowStyle  =	1
Const conWaitOnReturn = True

Dim objShell		' Command shell object.
Dim strADAMPath	 ' Path to ADAM installation.
Dim strCommandLine  ' Extend command line.
Dim strServerPort   ' Server and port for instance.

' Construct server:port string.
' Change "localhost" to appropriate server.
' Change "389" to port for appropriate instance.
strServerPort = "localhost:389"

' Specify path for ADAM installation.
strADAMPath  = "!windir!\ADAM\"

' Construct the command.
strCommandLine = _
"cmd /v:on /k """"" & strADAMPath   & "ldifde.exe" & """ -i" & _
		 " -f """ & strADAMPath   & "adamuser.ldf" & _
		 """ -s " & strServerPort & " -k -j ." & _
		 " -c ""CN=Schema,CN=Configuration,DC=X""" & _
		 " #schemaNamingContext"""

WScript.Echo "Execute:" & vbNewLine & strCommandLine

Set objShell = WScript.CreateObject("WScript.Shell")

objShell.Run strCommandLine, conWindowStyle, conWaitOnReturn