Author |
Message |
12/05/2014 09:41:28
|
Cheng
Joined: 13/03/2009 19:01:19
Messages: 9
Offline
|
I have an ldif file that i want to import. it has add entries and entries with changetype: modify. the import fails because the tool assumes all the entries are add. is this a known bug?
|
|
|
12/05/2014 09:44:18
|
support
Joined: 27/06/2008 19:01:18
Messages: 123
Offline
|
Please make sure that the format is correct, including changetype and '-' at the end of the entry.
Please see the following http://www.ldapsoft.com/forum/posts/list/7.page
look at the last reply, it include both replace and add change type.
|
|
|
12/05/2014 10:00:40
|
Cheng
Joined: 13/03/2009 19:01:19
Messages: 9
Offline
|
Here is an example of what I want to do:
Add an entry, modify an entry
## LDIF generated
#version: 1
#LDIF entry No : Add : 0
dn: Example=testAdd3,Example1=0,Example2=0,applicationName=appName, nodeName=node888
objectClass: Example
objectClass: MyObjectClass
groupId: 0
ownerId: 0
permissions: 9
shareTree: nodeName=node888
Example: testAdd3
MyAttribute: cc
MyAttribute: vv
MyAttribute: bb
MyAttribute: nn
#LDIF entry No : Modify 1
dn: Example=c,Example1=0,Example2=0,applicationName=appName, nodeName=node888
changetype: modify
delete: MyAttribute
MyAttribute: qq
-
add: MyAttribute
MyAttribute: aa
-
I will get the following error
Error
: LDAPException: No Such Attribute (16) No Such Attribute
LDAPException: Server Message: NO_SUCH_ATTRIBUTE: failed for MessageType : ADD_REQUEST
Message ID : 13
Add Request :
: ERR_04269 ATTRIBUTE_TYPE for OID delete does not exist!
Note that it thinks both are add entries(see attached)
Am I doing something wrong?
|
|
|
12/05/2014 10:09:35
|
support
Joined: 27/06/2008 19:01:18
Messages: 123
Offline
|
You can add and modify an exiting entry in the same file but all entries should have a change type, in case of add entry changetype is add. Please see the following example.
dn: cn=new1016testuser13,ou=People,dc=test,dc=com
changetype: add
description: test2
description: test3
description: Very New Value
sn: testuser
cn: new1016testuser13
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
-
dn: cn=new1023testuser13,ou=People,dc=test,dc=com
changetype: modify
delete: pager
-
add: pager
pager: 2222222213466679
-
delete: departmentNumber
-
add: departmentNumber
departmentNumber: IT
-
Thanks
LDAPSoft Support
|
|
|
|