Hi Friends,
I am trying to add an entry to LDAP. But I get "ldap_add: Already
exists (68)". I checked with LDAP browser, entry that I am adding doesn't
exists, still I got this error.
Earlier the same entry was there but I had deleted and restarted
LDAP. Following is the log on ldapadd with debug option -
LDAP version - OpenLDAP 2.2.13
Also, ldif file has -
dn: cn=ramnaik1,ou=Peoples,dc=zlemail,dc=com
uid: 1099
givenName: ramnaik1
objectClass: top
objectClass: inetOrgPerson
userPassword: ramnaik1
sn: ramnaik1
cn: ramnaik1
===============================================================
# ldapadd -x -W -v -d-1 -D "cn=root,dc=zlemail,dc=com" -f t2.ldif
ldap_initialize( <DEFAULT> )
ldap_create
Enter LDAP Password:
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP 127.0.0.1:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 4 tm: -1 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 45 bytes to sd 4
0000: 30 2b 02 01 01 60 26 02 01 03 04 19 63 6e 3d 72 0+...`&.....cn=r
0010: 6f 6f 74 2c 64 63 3d 7a 6c 65 6d 61 69 6c 2c 64 oot,dc=zlemail,d
0020: 63 3d 63 6f 6d 80 06 73 65 63 72 65 74 c=com..secret
ldap_write: want=45, written=45
0000: 30 2b 02 01 01 60 26 02 01 03 04 19 63 6e 3d 72 0+...`&.....cn=r
0010: 6f 6f 74 2c 64 63 3d 7a 6c 65 6d 61 69 6c 2c 64 oot,dc=zlemail,d
0020: 63 3d 63 6f 6d 80 06 73 65 63 72 65 74 c=com..secret
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: 127.0.0.1 port: 389 (default)
refcnt: 2 status: Connected
last used: Thu May 31 13:10:47 2007
** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ldap_read: want=8, got=8
0000: 30 0c 02 01 01 61 07 0a 0....a..
ldap_read: want=6, got=6
0000: 01 00 04 00 04 00 ......
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x099eec48 ptr=0x099eec48 end=0x099eec54 len=12
0000: 02 01 01 61 07 0a 01 00 04 00 04 00 ...a........
ldap_read: message type bind msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec4b end=0x099eec54 len=9
0000: 61 07 0a 01 00 04 00 04 00 a........
read1msg: 0 new referrals
read1msg: mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec4b end=0x099eec54 len=9
0000: 61 07 0a 01 00 04 00 04 00 a........
ber_scanf fmt (}) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec54 end=0x099eec54 len=0
ldap_msgfree
add uid:
1013
add givenName:
ramnaik1
add objectClass:
top
inetOrgPerson
add userPassword:
ramnaik1
add sn:
ramnaik1
add cn:
ramnaik1
adding new entry "cn=ramnaik1,ou=Peoples,dc=zlemail,dc=com"
ldap_add_ext
ldap_send_initial_request
ldap_send_server_request
ber_flush: 195 bytes to sd 4
0000: 30 81 c0 02 01 02 68 81 ba 04 28 63 6e 3d 72 61 0.....h...(cn=ra
0010: 6d 6e 61 69 6b 31 2c 6f 75 3d 50 65 6f 70 6c 65 mnaik1,ou=People
0020: 73 2c 64 63 3d 7a 6c 65 6d 61 69 6c 2c 64 63 3d s,dc=zlemail,dc=
0030: 63 6f 6d 30 81 8d 30 0d 04 03 75 69 64 31 06 04 com0..0...uid1..
0040: 04 31 30 31 33 30 17 04 09 67 69 76 65 6e 4e 61 .10130...givenNa
0050: 6d 65 31 0a 04 08 72 61 6d 6e 61 69 6b 31 30 23 me1...ramnaik10#
0060: 04 0b 6f 62 6a 65 63 74 43 6c 61 73 73 31 14 04 ..objectClass1..
0070: 03 74 6f 70 04 0d 69 6e 65 74 4f 72 67 50 65 72 .top..inetOrgPer
0080: 73 6f 6e 30 1a 04 0c 75 73 65 72 50 61 73 73 77 son0...userPassw
0090: 6f 72 64 31 0a 04 08 72 61 6d 6e 61 69 6b 31 30 ord1...ramnaik10
00a0: 10 04 02 73 6e 31 0a 04 08 72 61 6d 6e 61 69 6b ...sn1...ramnaik
00b0: 31 30 10 04 02 63 6e 31 0a 04 08 72 61 6d 6e 61 10...cn1...ramna
00c0: 69 6b 31 ik1
ldap_write: want=195, written=195
0000: 30 81 c0 02 01 02 68 81 ba 04 28 63 6e 3d 72 61 0.....h...(cn=ra
0010: 6d 6e 61 69 6b 31 2c 6f 75 3d 50 65 6f 70 6c 65 mnaik1,ou=People
0020: 73 2c 64 63 3d 7a 6c 65 6d 61 69 6c 2c 64 63 3d s,dc=zlemail,dc=
0030: 63 6f 6d 30 81 8d 30 0d 04 03 75 69 64 31 06 04 com0..0...uid1..
0040: 04 31 30 31 33 30 17 04 09 67 69 76 65 6e 4e 61 .10130...givenNa
0050: 6d 65 31 0a 04 08 72 61 6d 6e 61 69 6b 31 30 23 me1...ramnaik10#
0060: 04 0b 6f 62 6a 65 63 74 43 6c 61 73 73 31 14 04 ..objectClass1..
0070: 03 74 6f 70 04 0d 69 6e 65 74 4f 72 67 50 65 72 .top..inetOrgPer
0080: 73 6f 6e 30 1a 04 0c 75 73 65 72 50 61 73 73 77 son0...userPassw
0090: 6f 72 64 31 0a 04 08 72 61 6d 6e 61 69 6b 31 30 ord1...ramnaik10
00a0: 10 04 02 73 6e 31 0a 04 08 72 61 6d 6e 61 69 6b ...sn1...ramnaik
00b0: 31 30 10 04 02 63 6e 31 0a 04 08 72 61 6d 6e 61 10...cn1...ramna
00c0: 69 6b 31 ik1
modify complete
ldap_result msgid 2
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 2
wait4msg continue, msgid 2, all 1
** Connections:
* host: 127.0.0.1 port: 389 (default)
refcnt: 2 status: Connected
last used: Thu May 31 13:10:47 2007
** Outstanding Requests:
* msgid 2, origid 2, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=2, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 2, all 1
ber_get_next
ldap_read: want=8, got=8
0000: 30 0c 02 01 02 69 07 0a 0....i..
ldap_read: want=6, got=6
0000: 01 44 04 00 04 00 .D....
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x099eec48 ptr=0x099eec48 end=0x099eec54 len=12
0000: 02 01 02 69 07 0a 01 44 04 00 04 00 ...i...D....
ldap_read: message type add msgid 2, original id 2
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec4b end=0x099eec54 len=9
0000: 69 07 0a 01 44 04 00 04 00 i...D....
read1msg: 0 new referrals
read1msg: mark request completed, id = 2
request 2 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 2, msgid 2)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec4b end=0x099eec54 len=9
0000: 69 07 0a 01 44 04 00 04 00 i...D....
ber_scanf fmt (}) ber:
ber_dump: buf=0x099eec48 ptr=0x099eec54 end=0x099eec54 len=0
ldap_msgfree
ldap_perror
ldap_add: Already exists (68)
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 4
0000: 30 05 02 01 03 42 00 0....B.
ldap_write: want=7, written=7
0000: 30 05 02 01 03 42 00 0....B.
ldap_free_connection: actually freed
==========================================================================
--
Cheers,
Rajan