Export OUs and CNs

  • Thread starter Thread starter pat
  • Start date Start date
P

pat

I have a Tree set up like the following
Domain=server1.myOrg.org.uk
-MyOrg
---HR
---Regions
-----NE
-----NW
-----Central
-----SE
-----SW
---Information System
---Finance

There are users underneath each OU, some of whose accounts
are disabled.

I manage to export users using the following command:
c:\winnt\system32\ldifde -f C:\ActiveDirectoryExport2
\myOrg_users.ldf -s server1" ou=myOrg
dc=server1,dc=MyOrg,dc=org,dc=uk" -p subtree -r "(&
(objectCategory=person)(objectClass=User)(givenname=*))" -
l "cn,givenName,objectclass,samAccountName,displayName,dist
inguishedName,name,distinguishedName"

My aim is to "copy" the whole tree to another Server in a
top level domain myOrg.Org.Uk. I have manually altered
the LDF file to remove DC=MyOrg, however, I still get
errors like:
1: CN=Jo Bloggs,OU=HR,OU=MyOrg,DC=MyOrg,DC=Org,DC=UK
Object does not exist, entry skipped

Presumably it is complaining that the OU MyOrg does not
exist on the second server??

How could I export the OU on its own??
 
You will need to recreate the OU tree structure before
importing your users. You can do this in the same way by
exporting your tree structure using ldifde.

Luck!
 
See ldf file, that you have changetype : add , next see that you LDAP path
exists in your target domain. You don't have to replace LDAP path in your
ldf file, instead you could use -c switch in ldifde tool to change DN in
original ldf file to another one during ldf file import for example (see
ldifde tool help).
- c "DC=MyOrg,DC=Org,DC=UK" "DC=org,DC=uk"
Of course you must have your OU's setup right in the target domain. If not,
you can create it and later move objects to another OU.

--
Regards

Matjaz Ladava, MCSE (NT4 & 2000), MVP
(e-mail address removed)
http://ladava.com
 
Back
Top