Using LDIFDE to import and export directory objects to Active Directory

???? ?????? ???? ??????
???? ID: 237677 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
?????
This article applies to Windows 2000.Support for Windows 2000 ends on July 13, 2010.TheWindows 2000 End-of-Support Solution CenterWindows 2000 ?? ???? ????????? ?????? ?? ????? ????? ?? ??? ??? ??????? ????? ??? ???? ??????? ?? ??? ?????Microsoft ?????? Lifecycle ????.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

??????

The LDAP Data Interchange Format (LDIF) is a draft Internet standard for a file format that may be used for performing batch operations against directories that conform to the LDAP standards. LDIF can be used to export and import data, allowing batch operations such as add, create, and modify to be performed against the Active Directory. ??? ????????? ?? ???? ?? ???? LDIF ????? ?????? ?? ?????? ???? ?? ??? Windows 2000 ??? LDIFDE ???? ???????? ????????? ?? ????? ??? ?? ???? ??? ??? ???? ?? ??? ??????? ???? ??? ?? ?? ????? ??? ???? LDIFDE. exe ?????? ????? ???? ?? ???? ???????????? ?? ??????????? ???? ?? ????

???? ???????

??????? ???????? LDIFDE ??? ??? ??? ??

  1. ????? ????,????????? ????? ????,????????????? ????? ????,????? ??????? ????-????? ????, ?? ???? ???????? ?????????.
  2. ??????? ????????? ??:LDIFDE?. ?????????? ??? ????? ?? ?? ???? ?? ??? ??? ????????? ???? ???? ???

??????? ????????

-i              Turn on Import Mode (The default is Export)
-f filename     Input or Output filename
-s servername   The server to bind to
-c FromDN ToDN  Replace occurrences of FromDN to ToDN
-v              Turn on Verbose Mode
-j              Log File Location
-t              Port Number (default = 389)
-?              Help
				

??????? ???????? ??????? ????

-d RootDN       The root of the LDAP search (Default to Naming Context)
-r Filter       LDAP search filter (Default to "(objectClass=*)")
-p SearchScope  Search Scope (Base/OneLevel/Subtree)
-l list         List of attributes (comma separated) to look for in an LDAP
                search.
-o list         List of attributes (comma separated) to omit from input
-g              Disable Paged Search
-m              Enable the SAM logic on export
-n              Do not export binary values
				

??????? ???????? ???? ????

-k      The import will go on ignoring 'Constraint Violation' and 'Object
        Already Exists' errors
				

??????????? ????????

-a      Sets the command to run using the supplied user distinguished name
        and password. For example: "cn=yourname,dc=yourcompany,dc-com
        password"	
-b      Sets the command to run as username domain password. The default is
        to run using the credentials of the currently logged on user.	
				
???:?? ????? ???? ????? ?? ?? ???? ?????? ?? ???????-?????? ??????? ?? ???? ???????? ???? ??? ?????? ????? ?? Windows 2000 ????? ???, ????? Windows 2000 Professional ?? ????? LDIFDE ????????? Windows 2000 Professional ??? ??? ???????? ?? ??? ?? ????????? ???? ?? ???? ?? ?? Windows 2000 ????? ?????? ?????????? ?? ?????? ??? ?? ??????

??????? ???? ?? ??? ?? ??????????? ?????????? ?? ???? ???? ?? ??? LDIFDE ?? ????? ????

???? ?? ??????? ????? ???? (ou) ?? ?????????? ???? ?? ?? Windows 2000 ?????? ?????????? ?? ????? ??? ?? ??? ????????? ???? ????? ??? ?? ?????? ?? ??? "???????" ?? ??? ?? ????? ?? ?? ?????????? ?? ??????? ?? "????" ??? ?? ???????? ???? ??? ????? ?? ??? ??? LDIFDE ?? ????? ???? ?? ??? ?????? ?????????? ??????? ?????-???? ???????? ?? ???? ???? ?? ??? ?? ???? ?? ?????

?????????? ??????? ????? ????? ?? ??????? ????

  1. ??????? ????? ??? ?????????? ?? ??? ??? ??? ?? ????? ??? ?? ??? ?? ???????????? ??????????? ???? ??? ?? ???? ???? ?? ????? ??, ?? ?????? ??????????? ?? ??????? ???????? ?? ???? ???? ?? ??????? ???? ?? ??? ????? ???? ?? ???? ???
  2. ????? ????,????????? ????? ????,????????????? ????? ????,????? ??????? ????-????? ????, ?? ???? ???????? ?????????.
  3. ??????? ????????? ??:
    LDIFDE -f exportOu.ldf -sServer1-d "dc ??????? ?? ???, = dc = com" -p subtree - r "(objectCategory=organizationalUnit)"-l"cn, objectclass, ou"
    ?? ???? ????? ??????? ???? ??? OU ExportOU.ldf ??? ?? ??? ????? ??? ????? ?????????? ?? ??? ?? ?? ???

????? ????? ?? ?????????? ????? ?? ??????? ????

??????? ????????? ??:
LDIFDE -f Exportuser.ldf -sServer1-d "dc ??????? ?? ???, = dc com"-p subtree - r"(?? (objectCategory=person)(objectClass=User)(givenname=*))"-l "cn, givenName, objectclass, samAccountName" =
Exportuser.ldf ??? ?? ??? ????? ??? ??????? ????? ??? ??? ?????????? ??????? ???? ?? ???? ?? ??? ??? ??? ???? ??? ?????? ????????? ???? ??, ?? ???? ???????? ?? ??? ???? ????? ?????????objectclass, ??samAccountName?????? ??, ?? ??? ????? ?? ???? ????? ?? ??? ???? ???????? ???

???:?????????? ?????, ???? ?? ?????????? ?? ??? ???, ?? ???? ??? ??? ???? ??? ???????? ??? ??, ??? ????? LDAP ?????? ??????? ???? ???? ??? LDIFDE exporting ??????? ?? ?????? ???? ?????

???:?? ?? ?? ?? ?????-s????????, LDIFDE ????? exports ?? ??? ??? ??????? ?????? ??? ????? ???????? ????????? ?? ???? ?? ?? ????? ??? ??? ????? ????? ?? ??? ??? ????? ???????? ?? ???? ??, ?? exports ???? ?? ???? ??? ?? ????? ?? LDIFDE ?? ?????? ?? ??????? ???? ???? ?? ?????? ???, ?????? ?????????? hosted ??? ????? ?? ???? ??????? ????? ???????? ????????? ?????

?????????? ??????? ??????? ?? ???? ???? ?? ??? ????

  1. ???? ????? ??? ???? ?????????? ?? ??? ??? ??? ?? ????? ??? ?? ??? ?? ???????????? ??????????? ???? ??? ?? ???? ???? ?? ????? ??, ?? ?????? ??????????? ?? ??????? ???????? ?? ???? ???? ?? ??????? ???? ?? ??? ????? ???? ?? ???? ???
  2. ????? Exportou.ldf ????? ?????? ?? ????? ?? ??? ???
  3. Notepad ???, ???????????? ??,?????.
  4. ????????? ???????????? ???,???????. ??????? ?????????? ???,???? ????.
  5. ????? ????,??? ?? ?????.
  6. ?? ???????? ???? ?? ????? ??? ??? ??? ???, ?? ??? ??????, ?? ???? ??? ????? ?? ??? ?????
  7. ??????? ????????? ??:
    LDIFDE -i -f ExportOU.ldf -sServer2
???? ?? ????? ?? ??????? ???? ??? ?? ?? ?? ??????? ??????????? ????? ???? ???? ???????????? ?? ?????? ????? ????? ??????

???:?? ?????? ???, OU ???????????? ?? ????? ???? ?? ??? ?????? ??? ???? ????? ??? ?? ????? ???? ?? ???? ????? ??? ???? ???? ?????

???????????? ?? ???? ???? ?? ??? ??????? ?? ????

  1. ????? Exportuser.ldf ????? ?????? ?? ????? ?? ??? ???
  2. ?????? ???, ??? ??????????????? ?? ????? ?????????.

    ???:??? ???? ?? ?? ?????? ???, "???????" ?? ?????? ?? ?????????? ?? ??????? ?? "????" ?? ?? ???????? ???? ??? ?? ??? ????? ?? ???, ????? ?? ??? ??? ?? ????? ?? ??????? ?? ??? ?? ??? "??????? ????" ??? ?????, ?? ???? "????" ?? ????? ?? ??? ?? ???? ?? ??? ??? ?? ??? ????? ?????
  3. ????????? ???????????? ???,???????. ??????? ?????????? ???,???? ????.
  4. ????? ????,??? ?? ?????.
  5. ?? ???????? ???? ?? ????? ??? ??? ??? ???, ?? ??? ??????, ?? ???? ??? ????? ?? ??? ?????
  6. ??????? ????????? ??:
    LDIFDE -i -f Exportuser.ldf -sServer2
  7. ?? ???? ?? ?????? ?? ?????? ??????????? ?? ????? ???? ????? ?????????? ?? ???????? ?????-?? ????? ?? Windows ??? ???????? ?? ????? ?? ??? ???
???:: ??????? LDIFDE ???????, ??????? ???? ?? ?????????? ?????????? ??? ???? ?? ??? ???, ???? ????? ???? ??? ?? ?? ??????? ??? ???? ?? ??? ??? ?? ??????? ?????? ?? ?? ??? ??? ??? ??, ???? ?????? "?????????? ????????? ???? ?????? ???? ????? ?? ???????" ????? ???

???????? ???? ???? ???????? ?? ??????? ????

??? ???? ??? ???? ???????? ?? OU, ???????????? ?? ?????? ?? ??????? ???? ?? ???, ?? ?? ???? ?? ?? ?? ???????? ??? ???????? ????? ?? ??? LDIFDE ??????? ?????? ?? ?????, ?? ???????? ??? ??, ??????? ?????? (GC) ?? ??????? ?????? ?? ?? ??? ?????? ??? ???? ?? ???, ????????? ???? ?? -s ????? ?????? ????????? ????? ???????? GC ??, ?? ??? ??, -t ????? ?? ????? ???? ??? GC ????? ????????? ????? GC ????? ?????? ??? 3268 ???

?????? ?? ???, GC ?? ??????? ??? ?? ???? ???????? ?? ???? ?? ??? LDIFDE ???? ???? ??:
LDIFDE -f Exportuser.ldf -sServer1d--t 3268 "dc ??????? ?? ???, = dc com"-p subtree - r"(?? (objectCategory=person)(objectClass=User)(givenname=*))"-l "cn, givenName, objectclass, sAMAccountName" =
???:AD ??? ????????? ?? ??????? ???? ?? ??? ???? ?????????? ?? ?? ????? ?????? ???? ????? ?? ???, ????? ??? ?? "-" ???? ?????? ?? ?? ???? ??? ?? ????? ?????? ?? ???? ??? ??? ???? ?? ???? ???? ?? ????? ?? ????? ?? ????? ?? ??? ???? ??? ?? ???? ???? ?? ???: ldifde -i -f Import.ldf -s?????.

????? ????/??????? ????? ??????:
dn: CN=Jane Doe,OU=Staff,DC=microsoft,DC=com
changetype: modify
replace: extensionAttribute1
extensionAttribute1: Staff
-

dn: CN=John Doe,OU=Staff,DC=microsoft,DC=com
changetype: modify
replace: extensionAttribute1
extensionAttribute1: Staff
-
				

Multivalued ????????? ???? ?? ??? ??

Multivalued ????????? ?? ??? ???? ??????? ?? ??? ?? ???:
dn::distinguishedName
changetype: ??????? ????
?????: ???????
????? ??????? ????:???????[?? ?? ????????? ???? ?? ???? ???????]
??????? ?? ???:value1
??????? ?? ???:value2
??????? ?? ???:valueN[???? ? ?? ???? ???]-[?????, ????? ???? ?? ?????? ???? ?? ??? ??????]
??????::
dn: CN ??????? ?? Lotus Notes (EX1), CN ?? ??? = ???????, CN = ????? ?????? ????, CN = ?????? ????, CN = ????? ???????????? ????, CN = ???????????? ????, CN = VINC, CN = Microsoft Exchange, CN = ??????, CN = ???????????, DC = vinc, DC = biz changetype =: ????? ???????: msExchExportContainersLinked msExchExportContainersLinked: OU GroupWise ??????????, DC = vinc, DC = biz msExchExportContainersLinked =: OU AD ??????????, DC = vinc, DC = biz msExchExportContainersLinked =: CN ??????????, DC = vinc, DC = = biz

???

???? ID: 237677 - ????? ???????: 29 ??????? 2010 - ??????: 4.0
???? ???? ???? ??:
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
??????: 
kbhowto kbmt KB237677 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:237677

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com