Open TransientResponse opened 5 years ago
Additional info: ldapsearch
with the same host, bind, etc and same filter as in the D sample works correctly
do you have openldap installed? I made this package to work on both windows and linux and it works on our linux machines. Note that you might want to try some different bind values. In your bind are you specifying "username@domain"
or "domain\username"
? You have to specify a username with domain here for it to work properly
I've tried both forms with domain and get the same error. It's erroring at app.d line 20, which is the ldap.search line. I get "invalid credentials" on line 18 (bind) if I purposely use a bad username or domain.
Furthermore, it's connecting and switching to protocol version 3, and binding too.
On Ubuntu 18.04, I have libldap and libldap-dev which claim to be OpenLDAP. My OpenSuSE box has openldap2 (and -devel) 2.4.46 installed.
I'll try to ascertain which version of MS Active Directory is running here, as that might have an impact.
So I've whittled down some Wireshark captures between Windows and WSL to see what went wrong and why. As it turns out the actual "operative" filter succeeds in Linux, but some later filters fail and that propagates out to erroring out the whole thing.
A good result from Windows here:
A bad result from within WSL here:
It looks like the same queries but in reverse order. Interestingly, the first one from Windows fails but the rest succeed, while in Linux they all fail despite being the same filters (and previously successfully bound). Could the order the queries are made matter?
Uh I'm not really an expert in LDAP, I just made this library for cross-platform login and basic data fetching in our AD.
I think encryption wasn't properly supported or something, maybe your server has some forced settings here or something?
Doesn't appear to be working on Linux x64, while it does on Windows 10 x64.
The following code (edited to remove secrets) works correctly on Windows (with winldap, built with LDC 1.13.0):
On Windows I get correct results, but on Linux (both OpenSuSE Leap 15 x64 with DMD 2.084.1 and LDC 1.14.0, and Ubuntu 18.04 (WSL) with LDC 1.8.0) I get the same error: