Ldifde error The server side error is: 0x207b The object class attribute must be specified.

fertigj used Ask the Experts™

I am trying to setup a dev domain and to this end I am exporting users from our production domain via ldifde and trying to import them into the dev domain.

To export a test user -

ldifde -m -f Exportusers.ldf -s proddc -d "dc=domainname,dc=com" -p subtree -r "(&(objectCategory=person)(objectClass=User)(cn=testuser))" -l "cn,comment,company,department,description,displayName,distinguishedName,employeeID,employeeNumber,givenName,homeDirectory,homeDrive,info,initials,mail,middleName,name,scriptPath,sn,title,userPrincipalName"

This generates..

dn:  CN=TestUser,CN=Users,DC=domainname,DC=com
changetype: add
cn: TestUser
 Comment Here
company: SomeCompany Nmae
department: Department Here
description: Department Here
displayName: Test User
distinguishedName: CN=TestUser,CN=Users,DC=domainname,DC=com
employeeID: test
employeeNumber: 12341234
givenName: test
homeDirectory: \\fileserver\testuser
homeDrive: U:
 Something Here
initials: a
mail: testuser@test.com
middleName: a
name: TestUser
scriptPath: logon.vbs
sn: TestUser
title:: IA==
userPrincipalName: testuser@domainname.com

I then change the dn's to dc=testdc,dc=testdomain,dc=com

When I try to run the command
ldifde -i -f Exportusers.ldf -s -j c:\log -v

I get the following results...
Connecting to ""
Logging in as current user using SSPI
Importing directory from file "update.ldf"
Loading entries
1: CN=testuser,CN=Users,DC=testdc,DC=testdomain,DC=com

Add error on entry starting on line 1: Object Class Violation
The server side error is: 0x207b The object class attribute must be specified.
The extended server error is:
0000207B: UpdErr: DSID-030511CF, problem 6002 (OBJ_CLASS_VIOLATION), data 0

0 entries modified successfully.
An error has occurred in the program

This happens on a windows 2008 r2 domain {2003 functional}   Any thoughts or help would be appreciated.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

I think you need to add the following attribute to your export and import "objectClass". The first link says that object class is a required attribute.

Article ID: 327620 - Last Review: October 28, 2006 - Revision: 8.5
How to use Csvde to import contacts and user objects into Active Directory

Article ID: 237677 - Last Review: February 27, 2007 - Revision: 4.4
Using LDIFDE to import and export directory objects to Active Directory



That did it.   Thanks :)

For others that might need it...

{watch for line wrap}
ldifde -m -f Exportuser.ldf -s proddcname -d "dc=domainname,dc=com" -p subtree -r "(&(objectCategory=person)(objectClass=User)(cn=*))" -l "cn,givenName,userPrincipalName,objectclass,samAccountName,comment,company,department,description,displayName,employeeID,employeeNumber,homeDirectory,homeDrive,info,initials,mail,middleName,name,scriptPath,sn,title"

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial