Open Legrandin opened 12 years ago
I can confirm this. I have
# python -V
Python 2.6
and master branch got me
PYNTLM: Error when retrieving Type 2 message from server
(ldap://my.server.net/DC=stuff,DC=org) = Connection refused
After I installed urlparse_replacement branch it work.
Thanks a lot!
I had used the Active directory one and got the following error :-1:
Error [Mon Jun 12 20:06:21 2017] [crit] [client 192.168.0.4] PYNTLM: Error when retrieving Type 2 message from server(192.168.0.2) = [Errno 13] Permission denied
Apache Config
AuthType NTLM
AuthName ABCD
require valid-user
PythonAuthenHandler pyntlm
PythonOption Domain ABCD
PythonOption PDC 192.168.0.2
Python Version [root@rhel67 www]# python -V Python 2.6.6
Active Directory - Windows2008R2 OS - RHEL 6.7 Apache 2.2 Mod python - http://archive.apache.org/dist/httpd/modpython/mod_python-3.3.1.tgz
Tried using urlparse_replacement still got the same error.
Http Client [root@rhel67 PyAuthenNTLM2-ActiveDirectory]# python http_client.py -u administrator -p password12 -d ABCD http://192.168.0.3/cgi-bin/whoami.cgi First round NTLM authentication for HTTP request failed 500 Internal Server Error Authentication failed
whoami.cgi
printf "Content-type: text/html\n\n$REMOTE_USER\n"
NTLM Client [root@rhel67 PyAuthenNTLM2-ActiveDirectory]# python ntlm_client.py -u administrator -p password12 -d ABCD -a ldap://192.168.0.2 Using Active Directory (LDAP) to verify credentials. User administrator\ABCD was authenticated.
Kind of confused and stuck, appreciate your thoughts on this.
to use active directory, you have you have to use an ldap url !
ldap url where in the Apache config. Can you share an example.
ldap://10.12.13.1/DC=nasa,DC=gov
Got it i should have read the readme file. Will check and let you guys know.
Worked thanks Oetiker
Urlparse modules in python <2.6.6 do not parse correctly ldap URLs (even though http URLs are fine). As a result, PyAuthenNTLM2 does not work when connecting to an ADS via LDAP.
An untested fix exists on the "urlparse_replacement" branch.