10.12. Modifying the Attributes That Are Copied When Duplicating a User
Problem
You want to add an attribute to the list of attributes that are copied when duplicating a user with the Active Directory Users and Computers snap-in.
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
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 Attribute is copied when duplicating a user.
Click OK.
Using a command-line interface
You can cause an attribute to get copied when duplicating a user 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: 16
-If the LDIF file were named add_dup_user_attr.ldf,
you would run the following command:
> ldifde -v -i -f add_dup_user_attr.ldf
Using VBScript
' This code adds an attribute to the list of attributes that get
' copied when duplicating a user.
' ------ 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")) ...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.
Read now
Unlock full access