Sponsored Content
Full Discussion: ldap bind error
Top Forums Programming ldap bind error Post 91151 by mridula on Wednesday 30th of November 2005 04:50:11 AM
Old 11-30-2005
ldap bind error

hi

Using C program i am trying to connect to ldap server i have used the method bind
syntax :
ldap_bind_s(ld,"cn=Manager,dc=example,dc=com","password")

but it is not able to bind and giving error as
error 2 :Historical protocol version required use ldapv3 instead

do i need to add any other header file other than this
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <lber.h>
#include <ldap.h>

can any one please tell me how should i overcome this error

for c programming in ldap environment what all this required


thankx
 

10 More Discussions You Might Find Interesting

1. IP Networking

bind() error

Hello. I am havig problems with this program. It is a server supposed to get 2 integers from client, calculate a sum and send result back to client. I am getting a bind() error when attempting to execute it. Any help appreciated #include <stdio.h> #include <sys/types.h> #include... (2 Replies)
Discussion started by: Virtuosso
2 Replies

2. Programming

how to solve error : Bind: Address Already in Use

hi i have created socket program with proper IP address and port no client side port no 1085 and 1086 gateway side port no 1086 and 1085 and port no 1087 and 1088 receiver side port no 1088 and 1087 well it works fine on client and gateway side not on receiver and gateway side... (2 Replies)
Discussion started by: bhakti
2 Replies

3. Debian

nss_ldap failed to bind to LDAP server

Hi every body! I have an debian lenny server with samba and openldap on it. 1. Problem: i can not login ldap user auth.log: nss_ldap: could not connect to any LDAP server as cn=admin,dc=innsbruck,dc=sti,dc=at - Can't contact LDAP server 2. Problem: auth.log: nss_ldap: failed to bind to... (1 Reply)
Discussion started by: magge
1 Replies

4. Solaris

How to Configure DNS bind 9 with Ldap back-end

My environmnet : solaris 10 u 7 sparc To configure DNS bind use Ldap as zone record database, I use bind 9.7.0 and sun directory 5.2 I do follow http://imil.net/docs/Configuring_DNS_zones_with_LDAP.txt and stuck at make install Error from bind log "database: error: unsupported database... (0 Replies)
Discussion started by: tien86
0 Replies

5. Solaris

bind error

Hi, When I use the ldapadd command I get this error. ldap_simple_bind: Conidentiality required ldap_simple_bind: additional info: confidentiality required I was able to use this command and the ldapsearch command yesterday just fine. I think I may have made a change to a file, but I don't... (2 Replies)
Discussion started by: bitlord
2 Replies

6. Solaris

rpc/bind maintanance error

My code Hi Folks, I am getting maintanance error for rpc/bind in one of solaris 10 server.I have tried disable,enabled,cleared all options and dont no how to make online.Please help me Please find the below for details :- Server1> svcs -a rpc/bind svcs: -a ignored when used with... (0 Replies)
Discussion started by: susindram
0 Replies

7. Red Hat

Ldap error

Hi all, Am configuring ldap server in rhel 5, by the time of configuration i got below error, warning: no attributes to add (entry="dc=ldap,dc=zoom,dc=com") adding new entry "dc=ldap,dc=zoom,dc=com" ldap_add: Protocol error (2) additional info: no attributes provided ... (0 Replies)
Discussion started by: mastansaheb
0 Replies

8. Red Hat

Bind (DNS) error on EL 6.4

Gurus I have configured bind 9 on Red hat EL 6.4, it can resolve from hostname i.e from domain name (like cnn.com, bbc.com)but through IP its shows following error. Need your expert opinion to solve it. error 84.23.97.31 Server: 192.168.31.24 Address: 192.168.31.24#53 ** server can't... (1 Reply)
Discussion started by: smazshah
1 Replies

9. OS X (Apple)

Mac OS X LDAP client not accepting ssh or console logins (PAM error)

Hi Folks, I've install 389 Directory Server on a Centos 7.0 server. Over the last two days I've been trying to connect a MacBook running 10.10.5 to the server as a client and I'm having only partial success. I've "Joined" to my network Account Server, and set my LDAP Mappings to... (2 Replies)
Discussion started by: jlh
2 Replies

10. Solaris

LDAP Client not connecting to LDAP server

I have very limited knowledge on LDAP configuration and have been trying fix one issue, but unsuccessful. The server, I am working on, is Solaris-10 zone. sudoers is configured on LDAP (its not on local server). I have access to login directly on server with root, but somehow sudo is not working... (9 Replies)
Discussion started by: solaris_1977
9 Replies
LDAP_BIND(3)						     Library Functions Manual						      LDAP_BIND(3)

NAME
ldap_bind, ldap_bind_s, ldap_simple_bind, ldap_simple_bind_s, ldap_kerberos_bind_s, ldap_kerberos_bind1, ldap_kerberos_bind1_s, ldap_ker- beros_bind2, ldap_kerberos_bind2_s, ldap_unbind, ldap_unbind_s - LDAP bind routines SYNOPSIS
#include <ldap.h> int ldap_bind(ld, who, cred, method) LDAP *ld; char *who, *cred; int method; int ldap_bind_s(ld, who, cred, method) LDAP *ld; char *who, *cred; int method; int ldap_simple_bind(ld, who, passwd) LDAP *ld; char *who, *passwd; int ldap_simple_bind_s(ld, who, passwd) LDAP *ld; char *who, *passwd; int ldap_kerberos_bind_s(ld, who) LDAP *ld; char *who; int ldap_kerberos_bind1(ld, who) LDAP *ld; char *who; int ldap_kerberos_bind1_s(ld, who) LDAP *ld; char *who; int ldap_kerberos_bind2(ld, who) LDAP *ld; char *who; int ldap_kerberos_bind2_s(ld, who) LDAP *ld; char *who; int ldap_unbind(ld) LDAP *ld; int ldap_unbind_s(ld) LDAP *ld; DESCRIPTION
These routines provide various interfaces to the LDAP bind operation. After a connection is made to an LDAP server using ldap_open(3), an LDAP bind operation must be performed before other operations can be attempted over the conection. Both synchronous and asynchronous ver- sions of each variant of the bind call are provided. There are three types of calls, providing simple authentication, kerberos authentica- tion, and general routines to do either one. All routines take ld as their first parameter, as returned from ldap_open(3). SIMPLE AUTHENTICATION
The simplest form of the bind call is ldap_simple_bind_s(). It takes the DN to bind as in who, and the userPassword associated with the entry in passwd. It returns an LDAP error indication (see ldap_error(3)). The ldap_simple_bind() call is asynchronous, taking the same parameters but only initiating the bind operation and returning the message id of the request it sent. The result of the operation can be obtained by a subsequent call to ldap_result(3). KERBEROS AUTHENTICATION
If the LDAP library and LDAP server being contacted have been compiled with the KERBEROS option defined, Kerberos version 4 authentication can be accomplished by calling the ldap_kerberos_bind_s() routine. It assumes the user already has obtained a ticket granting ticket. It takes who, the DN of the entry to bind as. This routine does both steps of the kerberos binding process synchronously. The ldap_ker- beros_bind1_s() and ldap_kerberos_bind2_s() routines allow synchronous access to the individual steps, authenticating to the LDAP server and DSA, respectively. The ldap_kerberos_bind1() and ldap_kerberos_bind2() routines provide equivalent asynchronous access. GENERAL AUTHENTICATION
The ldap_bind() and ldap_bind_s() routines can be used when the authentication method to use needs to be selected at runtime. They both take an extra method parameter selecting the authentication method to use. It should be set to one of LDAP_AUTH_SIMPLE, LDAP_AUTH_KRBV41, or LDAP_AUTH_KRBV42, to select simple authentication, kerberos authentication to the LDAP server, or kerberos authentication to the DSA, respectively. ldap_bind() returns the message id of the request it initiates. ldap_bind_s() returns an LDAP error indication. UNBINDING
The ldap_unbind() call is used to unbind from the directory, terminate the current association, and free the resources contained in the ld structure. Once it is called, the connection to the LDAP server is closed, and the ld structure is invalid. The ldap_unbind_s() call is just another name for ldap_unbind(); both of these calls are synchronous in nature. ERRORS
Asynchronous routines will return -1 in case of error, setting the ld_errno parameter of the ld structure. Synchronous routines return whatever ld_errno is set to. See ldap_error(3) for more information. SEE ALSO
ldap(3), ldap_error(3), ldap_open(3) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.0.27-Release 22 September 1998 LDAP_BIND(3)
All times are GMT -4. The time now is 10:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy