[Date Prev][Date Next]
Re: Trouble with Authenticating...
What does your ldap_init line look like? Are you checking for problems there?
Try also using <x-tad-bigger>ldap_perror() </x-tad-bigger>to print you error. I think sometimes it gives a little bit more detailed information.
Run your server with -d 256 and look at the output when your code is run. This might give a further clue as to what is wrong.
On Jun 9, 2004, at 11:20 PM, Ben Bargabus wrote:
Continuing to troubleshoot...
I can connect properly with ldapsearch so as the previous poster
mentioned the problem is likely in my code.
I inserted a new line in my program to return the error message
associated with my failed bind operation, the new code now reads as
if ((result = ldap_simple_bind_s(ld, "CN=Bob", "password")) !=
printf("Unable to bind to server.\n");
printf("LDAP Returned: %s\n", ldap_err2string(result));
when run generates...
Unable to bind to server.
LDAP Returned: Can't contact LDAP server
When I ran with ldapsearch I did as follows...
% ./ldapsearch -D "CN=Bob" -W "CN=Bob"
Enter LDAP Password: password
# extended LDIF
# base <> with scope sub
# filter: CN=Bob
# requesting: ALL
Anyone have further ideas?