- Package:
- smbldap-tools
- Source:
- smbldap-tools
- Submitter:
- Yann Forget
- Date:
- 2010-04-20 13:12:03 UTC
- Severity:
- normal
Hi,
I added/change the following to use LDAP + SSL:
use Net::LDAPS;
if (($config{ldapSSL} != 1) and ($config{ldapTLS} != 1)) {
print "re\n";
$ldap_master = Net::LDAP->new(
"$config{masterLDAP}",
port => "$config{masterPort}",
)
or die "LDAP error: Can't contact master ldap server ($@)";
}
if ($config{ldapSSL} eq "1") {
$ldap_master = Net::LDAPS->new(
"$config{masterLDAPS}",
port => "$config{masterPort}",
verify => "$config{verify}",
cafile => "$config{cafile}"
)
or die "LDAP error: Can't contact master ldap server with SSL ($@)";
}
with in /etc/smbldap-tools/smbldap.conf
masterLDAPS="ldaps://myldapserver/"
Thanks,
Yann
El Thu, Dec 22, 2005 at 05:33:21PM +0100, Yann Forget va escriure: What you have sent is not a patch, so I don't really know what I'm supposed to do with it... what is not working? where is the code you have sent supposed to go? Greetings, Sergio.
The problem with smbldap-tools is that it cannot connect to a ldap server that doesn't run in unencrypted mode at all. I wanted to run slapd with -h ldaps:/// only. smbldap-tools are unable to connect to it. Unfortunately I don't know perl at all. But afaict the code snippet from the original bug report should go somewhere in smbldap_tools.pm. I'd be very glad if someone that knows perl could have another look at it. Thanks, Jonas
Hi,
I had problem with smbldap-tools (version 0.9.4-1 on Debian Lenny) too, when
I tried to use it with tls/ldaps. I wanted to use smbldap-tools towards a
server, where only ldaps connection is available from outside, on port 636
(locally I use port 389 without tls).
I tried the ldapTLS="1" parameter, but I got the error message:
Can't contact LDAP server at /usr/share/perl5/smbldap_tools.pm line 801.
It turned out that in smbldap-tools.pm the Net::LDAP->new doesn't use the
scheme parameter. When I added
scheme="ldaps"
ldapTLS="0"
to the smbldap.conf, and
scheme => "$config{scheme}"
to the LDAP initialization (every occurence) in smbldap-tools.pm, it worked.
In this case, with ldapTLS="1", I got a warning, but worked too.
Greetings,
Tamas.