Re: getting bindDN in perl script

2013-05-16 Thread Benin Technologies
I'm sorry, but I've only been working with openldap for a few months, and I'm not exactly a C expert neither... However, I had the idea at the beginning to write my own bind() function in SampleLDAP.pm, hoping it would somehow be called, but it wasn't : I wrote : sub bind { print

Fwd: Re: getting bindDN in perl script

2013-05-16 Thread Benin Technologies
by the way you're right there IS a call to bind() in bind.c on line 57 count = call_method(bind, G_SCALAR); it just seems that if I define a bind() function in SampleLDAP.pm, it's never called, despite of that call strange I'm sorry, but I've only been working with openldap for a few

Re: Fwd: Re: getting bindDN in perl script

2013-05-16 Thread Hallvard Breien Furuseth
On 2013-05-16 11:14, Benin Technologies wrote: I wrote : sub bind { print {*STDERR} Here in bind\n; return 0; } It's never called : when I start slapd I can see that new() and init() are called, then when I do a search I can see that search() is called, but apparently the bind()

Re: Fwd: Re: getting bindDN in perl script

2013-05-16 Thread Benin Technologies
bingo that was it bind() isn't called with the rootdn/rootpw but with any other dn/pw it's called, now I can get the credentials int the perl script MANY MANY thanks Ben Le 16/05/2013 11:23, Hallvard Breien Furuseth a écrit : On 2013-05-16 11:14, Benin Technologies wrote: I

Re: getting bindDN in perl script

2013-05-16 Thread Michael Ströder
Hallvard Breien Furuseth wrote: On 2013-05-15 23:20, Pierangelo Masarati wrote: Your perl scripts need to store the bind parameters somewhere if you intend to use them also during searches, assuming you really need them; usually, one does not need the binddn and the password when performing

Re: getting bindDN in perl script

2013-05-16 Thread Benin Technologies
ok I'll have a look into it according to what I read on the web, I believe back-sock and back-perl have both the same functionalities , but back-perl is rather for prototyping, whereas back-sock can be used in production, so back-sock may indeed be a better approach thanks for the info Le

getting bindDN in perl script

2013-05-15 Thread Benin Technologies
Hi, I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database). I wrote a perl script used with back-perl, and everything works fine. The client queries that back-ldap server, wich in

Re: getting bindDN in perl script

2013-05-15 Thread Howard Chu
Benin Technologies wrote: Hi, I needed to access from an LDAP client (Outlook or Thunderbird) some data stored in several locations (an OpenLDAP server with back-hdb, and a PostgreSQL database). I wrote a perl script used with back-perl, and everything works fine. The client queries that

Re: Fwd: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 9:29 AM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: Hi, I will tell you that ceaselessly spamming the list with the same question is a good way to get yourself banned. If/when someone has an answer for you, they will answer your question.

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs for example, in SampleLDAP.pm, if I do sub search { print @_; . I get : 1st parameter : SampleLDAP=HASH(0x8657f80) 2nd : the base DN 3rd : the search scope 4th : deref and so

Re: getting bindDN in perl script

2013-05-15 Thread Brian Reichert
On Wed, May 15, 2013 at 03:42:44PM +0100, Benin Technologies wrote: thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs This has nothing to to with OpenLDAP. From perl, you fird get an LDAP object: my $ldap =

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
yes I'm using Net::LDAP in my back-perl to access a back-hdb server and it works, but I always use the same hardcorded $bindDN and $password (for example : $binddn = cn=admin,dc=my-domain and $password = secret) But I'd like to use the same bindDN and the same password as the one that has

Re: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 12:14 PM -0400 Brian Reichert reich...@numachi.com wrote: On Wed, May 15, 2013 at 03:42:44PM +0100, Benin Technologies wrote: thanks, but I'm surprised, I don't see the bindDN and password in the parameter list of the perl subs This has nothing to to with

Re: getting bindDN in perl script

2013-05-15 Thread Dieter Klünter
Am Wed, 15 May 2013 17:56:59 +0100 schrieb Benin Technologies benintechnolog...@yahoo.fr: yes I'm using Net::LDAP in my back-perl to access a back-hdb server and it works, but I always use the same hardcorded $bindDN and $password (for example : $binddn = cn=admin,dc=my-domain and $password =

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
well, I must be missing something, because you are the second one to tell me that the binddn and bindpw are the two first parameters of the perl functions, but it doesn't seem to be the case. like I said in one of my previous posts, I printed out the parameters of my search() function (in the

Re: getting bindDN in perl script

2013-05-15 Thread Brian Reichert
On Wed, May 15, 2013 at 09:57:29AM -0700, Quanah Gibson-Mount wrote: --On Wednesday, May 15, 2013 12:14 PM -0400 Brian Reichert This has nothing to to with OpenLDAP. Sadly, wrong. They are using and talking about the back-perl backend to OpenLDAP, not how to set up an LDAP client using

Re: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 9:34 PM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: well, I must be missing something, because you are the second one to tell me that the binddn and bindpw are the two first parameters of the perl functions, but it doesn't seem to be the case. It

Re: getting bindDN in perl script

2013-05-15 Thread Pierangelo Masarati
On 05/15/2013 10:34 PM, Benin Technologies wrote: well, I must be missing something, because you are the second one to tell me that the binddn and bindpw are the two first parameters of the perl functions, but it doesn't seem to be the case. binddn and bindpw are the first two parameters of

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
there is no bind function in SampleLDAP.pm It is the first 2 arguments to the bind function, not search. --Quanah -- Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. Zimbra :: the leader in open source messaging and collaboration

Re: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 10:37 PM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: there is no bind function in SampleLDAP.pm Guess why it is called sample. --Quanah -- Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc.

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
well...I guess it means I have still a few things to learn before I become a back-perl guru... I suppose search(), add(), modify() and so probably all call a bind() function, but where is this function located ? SampleLDAP.pm is the only perl script provided in /servers/slapd/back-perl Le

Re: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 11:09 PM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: well...I guess it means I have still a few things to learn before I become a back-perl guru... I suppose search(), add(), modify() and so probably all call a bind() function, but where is this

Re: getting bindDN in perl script

2013-05-15 Thread Hallvard Breien Furuseth
On 2013-05-15 23:20, Pierangelo Masarati wrote: Your perl scripts need to store the bind parameters somewhere if you intend to use them also during searches, assuming you really need them; usually, one does not need the binddn and the password when performing searches. Specifically, its Bind

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
ok I looked at it, I'm confused, it says (2007) : The current Perl backend is practically unusable because of the following reasons: (...) the backend has no idea of connections so requests can not be associated to a specific bind The reworked backend works as follows: (...) connections are

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
yes but...where is this perl function called for binds ??? it isn't in SampleLDAP.pm... Le 15/05/2013 22:20, Pierangelo Masarati a écrit : binddn and bindpw are the first two parameters of the perl function called for binds.

Re: getting bindDN in perl script

2013-05-15 Thread Quanah Gibson-Mount
--On Wednesday, May 15, 2013 11:54 PM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: do you mean that the reworked back-perl backend isn't used yet ? and that with the current backend I'm unable to fetch the bindDN/password in my script ? The work discussed in that email was

Re: getting bindDN in perl script

2013-05-15 Thread Benin Technologies
ok, now everything is clear, bindDN and passwd cannot be retrieved in the perl script thanks for the help Le 15/05/2013 23:59, Quanah Gibson-Mount a écrit : --On Wednesday, May 15, 2013 11:54 PM +0100 Benin Technologies benintechnolog...@yahoo.fr wrote: do you mean that the reworked

Re: getting bindDN in perl script

2013-05-15 Thread Pierangelo Masarati
Please reply on the mailing list. On 05/16/2013 01:00 AM, Benin Technologies wrote: yes but...where is this perl function called for binds ??? it isn't in SampleLDAP.pm... servers/slapd/back-perl/bind.c calls a method bind as much as servers/slapd/back-perl/search.c calls a method search.