Hi,
I am using ldap api ldap_add_s() and getting error: =========================================
connection_get(11): got connid=1 connection_read(11): checking for input on id=1 ber_get_next ber_get_next: tag 0x30 len 82 contents: ber_get_next do_search ber_scanf fmt ({miiiib) ber:
dnPrettyNormal: <groupName=MIG,dc=cdac,dc=in>
<<< dnPrettyNormal: <groupName=MIG,dc=cdac,dc=in>, <groupName=mig,dc=cdac,dc=in> ber_scanf fmt ({mm}) ber: ber_scanf fmt ({M}}) ber: => bdb_search bdb_dn2entry("groupName=mig,dc=cdac,dc=in") => bdb_dn2id("groupName=mig,dc=cdac,dc=in") <= bdb_dn2id: got id=0x00000017 entry_decode: "groupName=MIG,dc=cdac,dc=in" <= entry_decode(groupName=MIG,dc=cdac,dc=in) => send_search_entry: conn 1 dn="groupName=MIG,dc=cdac,dc=in" ber_flush: 54 bytes to sd 11 <= send_search_entry: conn 1 exit. send_ldap_result: conn=1 op=2 p=3 send_ldap_response: msgid=3 tag=101 err=0 ber_flush: 14 bytes to sd 11
connection_get(11): got connid=1 connection_read(11): checking for input on id=1 ber_get_next ber_get_next: tag 0x30 len 79 contents: ber_get_next do_search ber_scanf fmt ({miiiib) ber:
dnPrettyNormal: <ggid=1001,dc=cdac,dc=in>
<<< dnPrettyNormal: <ggid=1001,dc=cdac,dc=in>, <ggid=1001,dc=cdac,dc=in> ber_scanf fmt ({mm}) ber: ber_scanf fmt ({M}}) ber: => bdb_search bdb_dn2entry("ggid=1001,dc=cdac,dc=in") => bdb_dn2id("ggid=1001,dc=cdac,dc=in") <= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30990) send_ldap_result: conn=1 op=3 p=3 send_ldap_response: msgid=4 tag=101 err=32 ber_flush: 27 bytes to sd 11 ldap_search_s: No such object (32) matched DN: dc=cdac,dc=in
connection_get(11): got connid=1 connection_read(11): checking for input on id=1 ber_get_next ber_get_next on fd 11 failed errno=0 (Success) connection_closing: readying conn=1 sd=11 for close connection_close: conn=1 sd=11
Here i m using ldap_search_s() and then using ldap_add_s() like this:
ldap_search_s( ld ,....) ----- ----- ldap_add_s( ld ,...)
I am using the same LDAP* ld, which i got using the ldap_init(), in both the functions
slapd.conf: =========
# This file should NOT be world readable. # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/inetorgperson.schema include /usr/local/etc/openldap/schema/new_core.schema include /usr/local/etc/openldap/schema/gfsUserManage.schema
# Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org
pidfile /usr/local/var/run/slapd.pid argsfile /usr/local/var/run/slapd.args ####################################################################### # BDB database definitions #######################################################################
database bdb suffix "dc=cdac,dc=in" rootdn "cn=Manager,dc=cdac,dc=in" # Cleartext passwords, especially for the rootdn, should # be avoid. See slappasswd(8) and slapd.conf(5) for details. # Use of strong authentication encouraged. rootpw secret # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools. # Mode 700 recommended. directory /usr/local/var/openldap-data # Indices to maintain index objectClass eq olcAccess: to * by * write
--------------------------------------------------------------------------------------------------------------------------
Please tell me what is the problem. Waiting for your reply.
Thanks Rakesh Yadav