copy users to another domain?

  • Thread starter Thread starter Guest
  • Start date Start date
Further to what Jimmy stated, if you are interested in using LDIFDE you can
use your current domain to get all of the user accounts. Simply enter the
following at a command prompt on one of your DCs:

C:\>ldifde -f useraccounts.ldf -s dc1.yourdomain.com -t 389 -d
"DC=yourdomain,DC=Com" -p subtree -r "(objectClass=user)" -l
"DN,sAMAccountName,....,telephoneNumber"

This means the following:

ldifde = the application
-f useraccounts.ldf = the file that will be created at C:\
-s dc1.yourdomain.com = the server to which you bind ( optional as it
defaults to the server on which you are running this )
-t 389 = the port number to use ( optional as it defaults to port 389 )
-d "DC=yourdomain,DC=com" = where to start your search
-r "(objectClass=user)" = to filter your search for, in this case,
objectClass=user
-l "DN,sAMAccountName,...,telephoneNumber" = the attributes that you want
to be included in the file. There are several to consider

HTH,

Cary
 
Small addendum:

Should have included the (objectCategory=person) in the filter. Simply
having (objectClass=user) will probably included a bunch of things that you
neither need nor want ( like computer accounts, etc. ). So, the command
would look like this:

C:\>ldifde -f useraccounts.ldf -s dc1.yourdomain.com -t 389 -d
"DC=yourdomain,DC=Com" -p subtree -r
"(&(objectClass=user)(objectCategory=person))" -l
"DN,sAMAccountName,....,telephoneNumber"

Cary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top