I am having such a difficult time getting this to work. I have Applied the updated script and filled in the variables, from another post here, but still I get AUTH_FAILED. Can someone please help??? I am running Community 2.3
I added con.set_option(ldap.OPT_REFERRALS, 0)
and it worked with AD now