From 27096e93261ab2df971b38d54f900ca01b5022c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E4=B9=90=F0=9F=8C=8C?= Date: Tue, 18 Aug 2020 11:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E6=9C=89=E4=BA=9B=E5=9F=9F?= =?UTF-8?q?=E6=8E=A7=E6=B2=A1=E6=9C=89=E5=BC=80=E5=90=AFSSL=E6=94=AF?= =?UTF-8?q?=E6=8C=81=EF=BC=8C=E6=95=85=E4=BC=9A=E6=8F=90=E7=A4=BA=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BF=9E=E6=8E=A5=E5=88=B0=E5=9F=9F=E6=8E=A7=E3=80=82?= =?UTF-8?q?=20=E5=9C=A8readme.md=E6=96=87=E4=BB=B6=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E5=A6=82=E4=BD=95=E5=A4=84=E7=90=86=E8=BF=99?= =?UTF-8?q?=E7=B1=BB=E9=97=AE=E9=A2=98=E7=9A=84=E6=93=8D=E4=BD=9C=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/readme.md b/readme.md index e3b92c0..c3dfa94 100644 --- a/readme.md +++ b/readme.md @@ -10,6 +10,24 @@ 整个验证逻辑写在resetpwd/views.py +提示: +如果使用中提示无法连接到域控,可以修改下resetpwd\utils\ad.py文件: +```python +def __ad_connect(): + """ + AD连接器 + :return: + """ + username = str(AD_LOGIN_USER).lower() + server = Server(host=AD_HOST, use_ssl=True, port=636, get_info='ALL') + try: + conn = Connection(server, auto_bind=True, user=username, password=AD_LOGIN_USER_PWD, authentication='NTLM') + return conn + except Exception: + raise Exception('Server Error. Could not connect to Domain Controller') +``` + +把上面代码中的use_ssl=True改成use_ssl=False ## 截图