Link to home
Start Free TrialLog in
Avatar of inverted_2000
inverted_2000Flag for United States of America

asked on

Active Directory 2003 - LDIFDE or Script to Change account names

Hey everyone one,

I'm not too familiar with this, but I understand the use of LDIFDE and what it can do.  I need to change about 200 users account names in our AD from (Firstname Lastname) to (Firstname.Lastname) so that we can be compliant with LDAP standards.

I figure a loop will accomplish this, but I'd like to try it out without a loop first to a single test account (Test Lastname).

Can anyone help me with a script or where I can dig one up please.

Thanks a bunch,
inverted
ASKER CERTIFIED SOLUTION
Avatar of aissim
aissim
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inverted_2000

ASKER

Where do I download it from...I downloaded the .zip file but it only has the .dll files in it.
Never mind...I had the 2.2 release...2.1 has the executables.
I'll play with that too, but can LDIFDE be used to accomplish this?

Thanks again,
inverted
LDIF can definitely be used for the same purpose by exporting, modifying, then importing again...but I've never used it for that purpose so I'm not certain what the correct syntax would be.
Kewl...I'd like to see if anyone else has attempted to automate this request via LDIFDE first...but your ADModify.net recommendation will surely do the job well.

I'll check back in a few days.

Thanks a lot,
inverted
I found this article: http://blog.scottlowe.org/2006/06/20/mass-changes-in-active-directory/

I was able to follow the directions (with a couple tweaks) to change my own login to Firstname.Lastname. It involves using CSVDE to export; notepad to create a template; LogParser to use that template @ CSV file to generate a .LDF. Then....LDIFDE to import that .LDF with changes back into AD.

If you do give it a shot - in the article where CSVDE is used - after the "-l" switch you'd want to use dn,sn,givenname (instead of dn,mail) so you have the necessary data in the CSV file. And you have to tweak the UserPrincipalName in the template a bit (in my template I used "%field_4%.%field_5%@domain.com" (without the quotes) to get the desired Firstname.Lastname.
That looked great too...I think I'll stick with the first one though...seemed more automated.  

Do you have a link for all of the CN field names in the Gernal Tab in AD too please?  That will get me rolling.

Thanks a ton
I think these are all correct:
First Name = givenName
Last Name = sn
Initials = initials
Display Name = displayName
Description = description
Office = physicalDeliveryOfficeName
Telephone number = telephoneNumber
E-mail = mail
Web page = wWWHomePage
Thanks a bunch...u rock!!!
Good luck with it all! Glad to help...
Sorry...but one last thing...

I don't see how to change the Pre-Windows 2000 field.

I'd rather not have the users logon with Firstname.Lastname@domain.com if I can just get them to logon with Firstnam.Lastname.

Did you see an option in ADModify.net to chantge that?  I'm not seeing it in their directions.

Thanks again for everything.
No worries =) Once you're on the properties/modify sheet switch to the Custom tab. Check the box for 'Make a customized attribute modification'...in the two fields enter the following:
Attribute name = sAMAccountName
Attribute value = %'givenName'%.%'sn'%

(sAMAccountName is the value for the pre-windows 2000 user logon field)

I would recommend changing the UPN value at the same time just so the two are identical...
Awesome...you're why this site rocks!!!

Thanks again,
Chris