10.13. Modifying the Attributes Included with Ambiguous Name Resolution
Problem
You want to modify the attributes that are included as part of ANR.
Solution
Tip
For Windows 2000 Active Directory, you need to enable schema modifications before proceeding. See Recipe 10.2 for more information.
Using a graphical user interface
In order to proceed, you must have first indexed the attribute.
Open the Active Directory Schema snap-in.
In the left pane, click on the Attributes folder.
In the right pane, double-click the attribute you want to edit.
Check the box beside ANR.
Click OK.
Using a command-line interface
You can include an attribute as part of ANR by using the
ldifde utility and an LDIF file that contains the
following:
dn: cn=rallencorp-LanguagesSpoken,cn=schema,cn=configuration,<ForestRootDN>
changetype: modify
replace: searchFlags
searchFlags: 5
-If the LDIF file were named add_anr_attr.ldf,
you would run the following command:
> ldifde -v -i -f add_anr_attr.ldf
Using VBScript
' This code will make an attribute part of the ANR set.
' ------ SCRIPT CONFIGURATION ------
' Set to the common name (not LDAP display dame) of the attribute
strAttrName = "<AttrCommonName>" ' e.g. rallencorp-LanguagesSpoken
' ------ END CONFIGURATION ---------
set objRootDSE = GetObject("LDAP://RootDSE")
set objAttr = GetObject("LDAP://cn=" & strAttrName & "," & _
objRootDSE.Get("schemaNamingContext"))
objAttr.Put "searchFlags", 5
objAttr.SetInfo
WScript.Echo "New ANR attribute: " & strAttrNameTip
The CLI and VBScript ...