[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: strange problem



Very strange; let me see what could be the differences between 2.0.23 and
2.2.19; for sure 2.2.19 doesn't accept LDAPv2 bind (historic) by default,
while 2.0.23 does.  You may want to set the protocol to LDAPv3 in the
client, or instruct slapd to accept binds according to historic protocols.
 See the "allow" directive in slapd.conf(5).

p.

> I'm successfully using mod_ldap on hosing system, with FreeBSD 4.8 and
> proftpd 1.2.9, OpenLDAP 2.0.23; however, I've got problems on
> 5.3/1.3.0/2.2.19.
>
> Problem is QUITE strange.
>
> === cut here code example ===
> #include <stdio.h>
> #include <ldap.h>
> #include <errno.h>
>
> main()
> {
>   int ret;
>   LDAP * ld;
>   char * ldap_server="127.0.0.1";
>   char * ldap_dn = "cn=Manager,dc=titl,dc=ru";
>   char * ldap_dnpass = "password";
>   if ((ld = ldap_init(ldap_server, LDAP_PORT)) == NULL) {
>     printf("mod_ldap: pr_ldap_connect(): ldap_init() to %s failed: %s",
> ldap_server, strerror(errno));
>     return -1;
>   }
>   if ((ret = ldap_simple_bind_s(ld, ldap_dn, ldap_dnpass) !=
> LDAP_SUCCESS)) {
>     printf("mod_ldap: pr_ldap_connect(): ldap_simple_bind() to %s as %s:%s
> failed (%d): %s", ldap_server, ldap_dn, ldap_dnpass, ret,
> ldap_err2string(ret));
>     return -1;
>   }
>
> }
> === cut here ===
>
> With either correct or incorrect password, I get error 1 on
> ldap_simple_bind_s: "Operations error".
>
> On the working box, with dn "cn=Manager,o=Sub Service" and correct
> password, the code works quite fine.
>
> rootdn is correct, checked several times.
>
> What could I've done wrong?...
>
>
> --
> Alex.
>


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497