The situation Two server one slackware with latest samba 4.3 another windows with windows2008R2 From a linux client i did

 ldapsearch -vvv -d 100 -b dc=server,dc=prov -H ldap://server.prov  CN="franko fr. micheli" uSNCreated -LLL -Q

And return...

ldap_initialize( ldap://server:389/??base )
ldap_build_search_req ATTRS: supportedSASLMechanisms
filter: CN=franko fr. micheli
requesting: uSNCreated 
ldap_build_search_req ATTRS: uSNCreated
ldap_result: Can't contact LDAP server (-1)

Now tryng with windows

ldapsearch -vvv -d 100 -b dc=server,dc=prov -H ldap://server2.prov  CN="franko fr. micheli" uSNCreated -LLL -Q

And work

Why not on samba?

telnet server 389 OK

smb.conf is

# Global parameters
    workgroup = SERVER
    realm = server.prov
    netbios name = SERVER
    server role = active directory domain controller
    server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate
    host msdfs = yes
    log file = /var/log/samba/samba.log
    log level = 1
    debug level = 1
    max log size = 50
    #other setting
    template shell = /bin/bash
    template homedir = /home/%ACCOUNTNAME%
        winbind separator = /
    winbind use default domain = Yes
    printing = bsd
    printcap name = /dev/null

Solution found,must specifiy gssapi on ldapsearch

ldapsearch -Y GSSAPI -LLL -H ldap://myserver

Not the answer you're looking for? Browse other questions tagged or ask your own question.