Re: Bulk rename of user accounts in Active Directory

From: Joe Richards [MVP] (humorexpress_at_hotmail.com)
Date: 03/06/05


Date: Sun, 06 Mar 2005 13:49:29 -0500

The change type for LDIF for a CN change (assuming the CN is the RDN attribute
which in the case of users it is...) is changetype:modrdn. This is because it is
an object rename, not a normal attribute change.

If using ADSI scripting, they consider it a move so you use the method movehere.

If using LDAP API you want to use ldap_rename_ext.

   joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net
Amihai Bareket wrote:
> Due to a change to the naming policy, I need to rename around 1000 user 
> accounts in active directory (Windows Server 2003, Native Mode)
> The user name (Name & CN) should be like the samAccountName attribute.
> 
> I've tried to do it with LDIFDE but I got an error message that I can't 
> rename the user account because "The attribute is owned by the system".
> 
> I can live with a text file that has all the user details (CSV?) because 
> this is a one time job and I rather be safe then sorry and I think I'd 
> rather not let the script run fully automatically.
> 
> Any ideas on how to do a bulk rename of user account in active directory 
> through batch/script? 
> 
> 


Relevant Pages

  • Re: Bulk rename of user accounts in Active Directory
    ... an object rename, ... Joe Richards Microsoft MVP Windows Server Directory Services ... Amihai Bareket wrote:> Due to a change to the naming policy, I need to rename around 1000 user> accounts in active directory > The user name should be like the samAccountName attribute. ... > I've tried to do it with LDIFDE but I got an error message that I can't> rename the user account because "The attribute is owned by the system". ...
    (microsoft.public.scripting.vbscript)
  • Re: Rename Mailbox
    ... The best way is to change the user account name in Active Directory, ... then to make changes to her Exchange Addresses in Active Directory. ... click on Rename. ...
    (microsoft.public.windows.server.sbs)
  • Can i change my NT 4 domain name during upgrade to W2K3 AD?
    ... how to i rename it? ... The Active Directory service imports ... Windows Server 2003 domain controller. ...
    (microsoft.public.windows.server.migration)
  • Rename Domain
    ... i have active directory 2000 on one windows server 2000 and i have ... Now i got situation that we need to rename our domain because new compnay ... Pls advice me what setp i have to take, i read artical on microsoft knowledge ... but it seems you cannot rename if you have windows 2000 active directory ...
    (microsoft.public.win2000.active_directory)
  • Re: Rename Domain
    ... Do you really have to rename the MS domain? ... > i have active directory 2000 on one windows server 2000 and i have ... > Pls advice me what setp i have to take, ... > but it seems you cannot rename if you have windows 2000 active directory ...
    (microsoft.public.win2000.active_directory)