[Date Prev][Date Next]
RE: able to connect to LDAP server with perl, but not ldapsearch
- To: <openldap-software@OpenLDAP.org>
- Subject: RE: able to connect to LDAP server with perl, but not ldapsearch
- From: "Jeffrey Marans" <Jeffrey.Marans@pwgsc.gc.ca>
- Date: Tue, 20 Jan 2004 09:53:54 -0500
- Content-class: urn:content-classes:message
- Thread-index: AcPe2J/alLjIB5nVSZ298JYI91UMdAAiwikQ
- Thread-topic: able to connect to LDAP server with perl, but not ldapsearch
Kurt D. Zeilenga pointed out it was likely the ldapsearch syntax I was
using, and he was right.
In the end, this command worked, with or without an /etc/ldap/ldap.conf.
ldapsearch -x -H ldap://localhost:389 -D
'cn=admin,dc=ncr,dc=pwgsc,dc=gc,dc=ca' -W \
Thanks to all who responded.
From: Georg Klein [mailto:email@example.com]
Sent: Monday, January 19, 2004 4:54 PM
Subject: Re: able to connect to LDAP server with perl, but not
On Mon, 19 Jan 2004 13:39:07 -0500
"Jeffrey Marans" <Jeffrey.Marans@pwgsc.gc.ca> wrote:
> I've installed openldap on a debian woody box and am able to query
> slapd from perl scripts and webmin, but ldapsearch returns
> ldap_sasl_interactive_bind_s: Can't contact LDAP server. I've
> configured /etc/pam_ldap.conf, /etc/nsswitch.conf, and
> /etc/libnss-ldap.conf, but getent passwd only looks at /etc/passwd.
> I'm running slapd in debug mode and it doesn't see the ldapsearch
> connect attempt.
> I've linked /etc/ldap/slapd.conf to /etc/ldap/ldap.conf just in case
> I'm missing something.
I think your 'ldapsearch' is missing the proper configuration file,
which - on several linux-systems - is not the same as that for ldap.
On Redhat-Systems, for example, you have to configure '/etc/ldap.conf'
for the openldap-software and '/etc/openldap/ldap.conf' for ldapsearch
to work. Try a 'strace' on 'ldapsearch' and you will see which file it
will try to read.