Forums

Resolved
0 votes
I am trying to get ldapsearch working so I can establish I can access the ldap directory remotely. The following works:

ldapsearch -h localhost -b "dc=home,dc=htt" -D "cn=manager,ou=internal,dc=home,dc=htt" -s sub "objectclass=GroupOfNames" -x -w m...

But

ldapsearch -h 192.168.128.2 -b "dc=home,dc=htt" -D "cn=manager,ou=internal,dc=home,dc=htt" -s sub "objectclass=GroupOfNames" -x -w m....

Does not (my server is at 192.168.128.2 and all these commands were issued in an SSH session on the server):

ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)

When entering this question here I was prompted to check out:

https://www.clearos.com/clearfoundation/social/community/accessing-ldap-from-cli-or-3rd-party-apps

and looked for /etc/kolab/kolab.conf, but this file does not exist. In fact no /etc/kolab directory.

I am running ClearOS Community release 6.6.0. I have moved my network to a new ISP, so the registration information's external IP address is wrong.

Oh I have even issued 'service firewall stop' did not help.
Friday, September 18 2015, 04:18 PM
Share this post:

Accepted Answer

Friday, September 18 2015, 06:07 PM - #Permalink
Resolved
0 votes
By default ldap is configured only to listen on localhost. I would guess it would work if you changed Webconfig > System > Directory Server > Policies > Edit > Publish Policy to Local Network.

I don't know ldap or ldapsearch but you may have to change your search line so it uses ldaps:// and not ldap:// as the Local Network policy only enables ldaps (but it can be hacked to allow ldap). From looking at the man page you may have to change -h to -H and prefix your IP address with ldaps://. Have a play.
The reply is currently minimized Show
Responses (3)
  • Accepted Answer

    Friday, September 18 2015, 06:32 PM - #Permalink
    Resolved
    0 votes
    -H ldaps://' worked.

    thanks.

    Now to get remote access to ldaps
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 18 2015, 06:30 PM - #Permalink
    Resolved
    0 votes
    I can't really comment any further. What you're saying is logical so makes sense but I have no knowledge.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 18 2015, 06:27 PM - #Permalink
    Resolved
    0 votes
    -H ldaps:// worked.

    Thanks.

    Now to configure my other system right.

    In /etc/samba/smb.ldap.conf ClearOS has:

    passdb backend = ldapsam:ldap://127.0.0.1

    I am ASSuMEing that my remote system will use:

    passdb backend = ldapsam:ldaps://192.168.128.2
    The reply is currently minimized Show
Your Reply