Solved

ldifde import script needed for users and OU

Posted on 2014-12-10
7
276 Views
Last Modified: 2014-12-27
Hello,
I am looking for ldifde script to import the ldf files.

I already exported the OUs and Objects using the commands below, but now I need a script to import them into the target.local domain.

THank you very much!

ldifde -f sourceOu.ldf -s QMM-SRCEXCH -d "dc=source,dc=local" -p subtree -r "(objectClass=organizationalUnit)" -l "cn,objectclass,ou"

ldifde -f sourceuser.ldf -s QMM-SRCEXCH -d "dc=source,dc=local" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))" -o "badPasswordTime,badPwdCount,lastLogoff,lastLogon,logonCount, memberOf,objectGUID,objectSid,primaryGroupID,pwdLastSet,sAMAccountType"
0
Comment
Question by:claudiamcse
  • 5
7 Comments
 
LVL 18

Expert Comment

by:Raheman M. Abdul
ID: 40493991
Refer: http://support.microsoft.com/kb/237677

To import OU:

ldifde -i -f sourceOu.ldf -s QMM-SRCEXCH -d "dc=target,dc=local" -p subtree -r "(objectClass=organizationalUnit)" -l "cn,objectclass,ou"

To Import users:
 ldifde -i -f sourceuser.ldf -s QMM-SRCEXCH -d "dc=target,dc=local" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))" -o "badPasswordTime,badPwdCount,lastLogoff,lastLogon,logonCount, memberOf,objectGUID,objectSid,primaryGroupID,pwdLastSet,sAMAccountType"

NOTE: Because LDIFDE does not export passwords, when the users are imported into the directory, the account is disabled and the password is set to null. This is done for security reasons. Also, the account option "User must change password at next logon" is selected.
0
 

Author Comment

by:claudiamcse
ID: 40499676
Outstanding! Thank you
0
 

Author Comment

by:claudiamcse
ID: 40499722
I am sorry. This actually doesn't work....It throws error
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:claudiamcse
ID: 40499726
C:\LDIFDE-exports>ldifde -i -f corpQAUser.ldf -d "dc=corp,dc=testlab,dc=com" -p
subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))" -o "badP
asswordTime,badPwdCount,lastLogoff,lastLogon,logonCount, memberOf,objectGUID,obj
ectSid,primaryGroupID,pwdLastSet,sAMAccountType"
Invalid Parameter: RootDn not required for import
Invalid Parameter: Filter not required for import
Invalid Parameter: Scope not required for import
Invalid Parameter: Omit List not required for import

I also tried this command but it gives another error since our environment has custom schema.....Is there a way to import users that have attributes exported from custom schema?

Please help.

I tried this command and it also gives an error:
ldifde -i -f Exportuser.ldf -s Server2

this error :

dd error on line 2: No Such Attribute

The server side error is "The parameter is incorrect."

0 entries modified successfully.

An error has occurred in the program
0
 

Accepted Solution

by:
claudiamcse earned 0 total points
ID: 40513344
This issue was resolved by only exporting the attributes that can be imported into the Target schema. Once I determined the attributes that I have in the target and exported only the needed attributes, the import worked.
0
 

Author Closing Comment

by:claudiamcse
ID: 40519479
This was the resolution. The other resolution didn't work
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now