Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

[SOLVED] Net::LDAPS cant find entry in ldap server

by invader7 (Initiate)
on Jun 09, 2013 at 09:23 UTC ( #1037931=perlquestion: print w/replies, xml ) Need Help??
invader7 has asked for the wisdom of the Perl Monks concerning the following question:

Hello everybody, i have an ldap server and i want to use Net::LDAPS with it.

Here are the settings of my ldap server ->> http://s12.postimg.org/jt4n7uo59/ldap.png

Now the perl : im trying this code
$ldap = Net::LDAPS->new( '192.168.1.22','636',verify => 'none' ); $mesg = $ldap->search(filter=>'uid=inv',base=>'ou=people,dc=maxcrc,dc= +com',scope=>"one");
but $mesg->count returns 0 entries i tried with base=>'dc=maxcrc,dc=com' and scope subtree but nothing happened ! Any opinions ? thanks !

SOLVED

The code was part of openca

{OpenCA DIR}/lib/openca/functions/datasource-utils.lib

at function dsLdapConnect added

if ( $protocol == "ldap") { $ldap = Net::LDAP->new($ds->{address},port => $ds->{port}); return $ldap; }

Replies are listed 'Best First'.
Re: Net::LDAPS cant find entry in ldap server
by Laurent_R (Canon) on Jun 09, 2013 at 11:37 UTC

    This is cross posted on at least two other forums (Perl Gurus and Devshed).

      Please note that I am not complaining, nor grumbling, or loathing, or whatever, about cross posts, but I was just informing my dear fellow monks about this fact. I personally think that it would be more proper for a poster to state about cross-posting upfront, to avoid duplicate work in the collaborative effort that a forum (or a group of several forums) is, but I am certainly not feeling like criticizing or downgrading the OP for that. In addition, I am too new on this forum to feel free to make any judgement on such things.

      And, to make things clearer, I did not provide any answer to the OP because I don't know anything about LDAP and am not able to help on that specific point, but, if I were in a position to help on the specific problem, I would have done it without any doubt. Crossposting would definitely not have prevented me from trying to help. Just not sure that I would have done that on all three forums where I saw the same question... Well, when this type of things happened before, I usually linked to my answer on other forums, I guess that is what I would have done.

        The OP "should" provide cross-links not the reporter!

        Who do you think you are?

        Cheers Rolf

        ( addicted to the Perl Programming Language)

Re: Net::LDAPS cant find entry in ldap server
by Anonymous Monk on Jun 10, 2013 at 03:47 UTC
    SOLVED !!

    {OpenCA DIR}/lib/openca/functions/datasource-utils.lib

    at function dsLdapConnect added

    if ( $protocol == "ldap") { $ldap = Net::LDAP->new($ds->{address},port => $ds->{port}); return $ldap; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1037931]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-11-18 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (205 votes). Check out past polls.

    Notices?