{"id":31964,"date":"2025-04-22T16:41:53","date_gmt":"2025-04-22T08:41:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/31964.html"},"modified":"2025-04-22T16:41:53","modified_gmt":"2025-04-22T08:41:53","slug":"windows-server2016%e6%90%ad%e5%bb%baad%e5%9f%9f%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/31964.html","title":{"rendered":"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084144-68075648968bb.jpg\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u4e00\u3001\u80cc\u666f<\/li>\n<li>\u4e8c\u3001\u642d\u5efaAD\u57df\u670d\u52a1\u5668\u6b65\u9aa4<\/li>\n<li>\u4e09\u3001\u751f\u6210\u53ef\u4f9bjava\u7a0b\u5e8f\u4f7f\u7528\u7684keystore\u6587\u4ef6<\/li>\n<li>\u56db\u3001\u5bfc\u51fa\u67d0\u7528\u6237\u7684keytab\u6587\u4ef6<\/li>\n<li>\u4e94\u3001\u4e3b\u673a\u914d\u7f6ehosts\u6587\u4ef6<\/li>\n<li>\u516d\u3001\u4e3b\u673a\u786e\u8ba4\u662f\u5426\u80fdping\u901a<\/li>\n<li>\u672c\u4eba\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\u94fe\u63a5<\/li>\n<\/ul>\n<h2>\u4e00\u3001\u80cc\u666f<\/h2>\n<p>\u4eb2\u6d4b\u53ef\u7528,\u4e4b\u524d\u641c\u7d22\u4e86\u5f88\u591a\u535a\u5ba2&#xff0c;\u5565\u6837\u7684\u90fd\u6709&#xff0c;\u5c31\u662f\u4e0d\u4ecb\u7ecd\u62a5\u9519\u4ee5\u53ca\u914d\u7f6e\u7528\u5904&#xff0c;\u6839\u672c\u4e0d\u61c2\u7167\u6284\u90a3\u4e9b\u914d\u7f6e\u662f\u5e72\u5565\u7684&#xff0c;\u7a00\u91cc\u7cca\u6d82\u7684\u6309\u7167\u535a\u5ba2\u642d\u5b8c\u4e5f\u8dd1\u4e0d\u8d77\u6765&#xff0c;\u56e0\u6b64\u8bb0\u5f55\u8fd9\u4e2a\u3002<\/p>\n<p>\u9879\u76ee\u80cc\u666f&#xff1a;\u516c\u53f8\u9879\u76ee\u5f53\u524d\u91c7\u7528http\u534f\u8bae&#043;shiro&#043;mysql\u7684\u767b\u5f55\u8ba4\u8bc1\u65b9\u5f0f&#xff0c;\u800c\u73b0\u5728\u60f3\u652f\u6301ldap\u534f\u8bae\u8ba4\u8bc1\u767b\u5f55\u7136\u540e\u80fd\u591f\u8bbf\u95ee\u81ea\u5df1\u516c\u53f8\u7684\u9879\u76ee\u7f51\u7ad9\u3002<\/p>\n<p>\u4e3e\u4f8b\u8bf4\u660e&#xff1a;\u5047\u8bbe\u6211\u4eec\u516c\u53f8\u6709\u81ea\u5df1\u7684\u95e8\u6237\u7f51\u7ad9&#xff0c;\u73b0\u5728\u6211\u4eec\u6536\u8d2d\u4e86\u4e00\u5bb6\u516c\u53f8&#xff0c;\u4ed6\u4eec\u6570\u636e\u5e93\u91c7\u7528ldap\u5b58\u50a8\u7528\u6237\u6570\u636e&#xff0c;\u90a3\u4e48\u4e3a\u4e86\u4ed6\u4eec\u8d26\u6237\u80fd\u767b\u9646\u6211\u4eec\u516c\u53f8\u9879\u76ee\u6240\u4ee5\u9700\u8981\u96c6\u6210&#xff0c;\u800c\u4e0d\u662f\u518d\u628a\u4ed6\u4eec\u7684\u8d26\u6237\u91cd\u65b0\u5728mysql\u518d\u521b\u5efa\u4e00\u904d&#xff0c;\u4e07\u4e00\u4eba\u5bb6\u67091W\u4e2a\u8d26\u6237\u5462&#xff0c;\u4e0d\u7d2f\u6b7b\u4e86\u4e14\u4e5f\u4e0d\u73b0\u5b9e\u554a\u3002<\/p>\n<p>\u9700\u8981\u5b89\u88c5AD&#043;kerberos&#xff0c;\u4e14ldap\u548ckerberos\u5b89\u88c5\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a&#xff0c;\u5f53\u524d\u7248\u672c\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>windows server 2016<\/li>\n<li>\u670d\u52a1\u5668IP&#xff1a;10.110.25.48<\/li>\n<\/ul>\n<p>\u6211\u516c\u53f8\u7535\u8111\u5ba4windows10\u7684&#xff0c;\u6211\u662fVietualBox\u5b89\u88c5\u7684windows server 2016&#xff0c;\u7c7b\u4f3c\u5b89\u88c5\u4e2a\u865a\u62df\u673a&#xff0c;\u7136\u540e\u53bb\u5b89\u88c5AD\u3002<\/p>\n<h2>\u4e8c\u3001\u642d\u5efaAD\u57df\u670d\u52a1\u5668\u6b65\u9aa4<\/h2>\n<p>1.\u5728\u9700\u8981\u5b89\u88c5AD\u57df\u63a7\u5236\u5668\u7684\u7535\u8111\u4e0a\u6253\u5f00\u670d\u52a1\u5668\u7ba1\u7406\u5668&#xff0c;\u70b9\u51fb\u6dfb\u52a0\u89d2\u8272\u548c\u529f\u80fd <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084144-68075648e3d70.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>2.\u6253\u5f00\u6dfb\u52a0\u89d2\u8272\u548c\u529f\u80fd\u5411\u5bfc&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084145-6807564921ca1.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>3.\u5b89\u88c5\u7c7b\u578b\u9009\u62e9\u57fa\u4e8e\u89d2\u8272\u6216\u57fa\u4e8e\u529f\u80fd\u7684\u5b89\u88c5&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084145-680756496520c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>4.\u670d\u52a1\u5668\u9009\u62e9\u4ece\u670d\u52a1\u5668\u6c60\u4e2d\u9009\u62e9\u670d\u52a1\u5668&#xff0c;\u518d\u9009\u4e2d\u6c60\u4e2d\u7684\u672c\u5730\u670d\u52a1\u5668&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084145-68075649a81c9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>5.\u670d\u52a1\u5668\u89d2\u8272\u9009\u62e9Active Directory\u57df\u670d\u52a1&#xff0c;\u6839\u636e\u63d0\u793a\u8fdb\u884c\u5b89\u88c5 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084145-68075649eaa9f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>6.\u8fd0\u884cAD DS&#xff08;Active Directory\u57df\u670d\u52a1\u7684\u7b80\u79f0&#xff09;\u90e8\u7f72\u5411\u5bfc&#xff0c;\u6253\u5f00\u672c\u5730\u670d\u52a1\u5668\u7684\u670d\u52a1\u5668\u7ba1\u7406\u5668&#xff0c;\u70b9\u51fb\u901a\u77e5-\u5c06\u6b64\u670d\u52a1\u5668\u63d0\u5347\u4e3a\u57df\u63a7\u5236\u5668 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084146-6807564a3a7ea.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>7.\u6253\u5f00AD DS\u7684\u90e8\u7f72\u5411\u5bfc&#xff0c;\u7531\u4e8e\u6211\u4eec\u8fd9\u91cc\u662f\u90e8\u7f72\u65b0\u7684AD\u63a7\u5236\u5668&#xff0c;\u6240\u4ee5\u90e8\u7f72\u914d\u7f6e\u9009\u62e9\u6dfb\u52a0\u65b0\u6797&#xff0c;\u628a\u6839\u57df\u540d\u8bbe\u7f6e\u6210testldap.com&#xff08;\u81ea\u5b9a\u4e49&#xff09;&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084146-6807564aaf29f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>8.\u8bbe\u7f6e\u57df\u5bc6\u7801&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65<\/p>\n<p>9.\u6839\u636e\u63d0\u793a&#xff0c;\u5b8c\u6210\u914d\u7f6e 10.\u6dfb\u52a0Active Directory \u8bc1\u4e66\u670d\u52a1\u89d2\u8272 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084147-6807564b2e02b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>11.\u9009\u62e9\u89d2\u8272\u670d\u52a1&#xff0c;\u6839\u636e\u63d0\u793a\u8fdb\u884c\u5b89\u88c5 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084147-6807564b9fa0a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>12.\u914d\u7f6e\u57df\u8bc1\u4e66&#xff0c;\u70b9\u51fb\u901a\u77e5-\u914d\u7f6e\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u7684Active Directory \u8bc1\u4e66\u670d\u52a1 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084148-6807564c1ff66.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>13.\u52fe\u9009\u8bc1\u4e66\u9881\u53d1\u673a\u6784&#xff0c;\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084148-6807564c97e69.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>14.\u6307\u5b9aCA\u7684\u52a0\u5bc6&#xff0c;\u9ed8\u8ba4\u5373\u53ef\u3002\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084149-6807564d1af76.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>15.\u6307\u5b9aCA\u540d\u79f0,\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084149-6807564d87c28.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>16.\u6307\u5b9a\u6709\u6548\u671f&#xff0c;\u8fd9\u91cc\u8bbe\u7f6e\u4e3a5\u5e74,\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084150-6807564e086b8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>17.\u6307\u5b9aCA\u6570\u636e\u5e93\u7684\u4f4d\u7f6e&#xff0c;\u9ed8\u8ba4\u5373\u53ef.\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084150-6807564e79d43.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>18.\u786e\u8ba4\u8bc1\u4e66\u7684\u914d\u7f6e&#xff0c;\u70b9\u51fb\u914d\u7f6e.\u70b9\u51fb\u4e0b\u4e00\u6b65 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084150-6807564eeeb5b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>19.\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u91cd\u542f\u4e0b\u670d\u52a1\u5668&#xff0c;\u5728\u8bc1\u4e66\u9881\u53d1\u673a\u6784\u4e2d\u53ef\u4ee5\u770b\u5230\u7ed9\u57df\u63a7\u9881\u53d1\u7684\u8bc1\u4e66 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084151-6807564f6ef14.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h2>\u4e09\u3001\u751f\u6210\u53ef\u4f9bjava\u7a0b\u5e8f\u4f7f\u7528\u7684keystore\u6587\u4ef6<\/h2>\n<p>1.\u5bfc\u51fa\u8bc1\u4e66,\u4f9b\u5ba2\u6237\u7aef\u8fde\u63a5\u4f7f\u7528&#xff0c;\u4e3e\u4f8b\u547d\u540d\u4e3aadserver.cer <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084151-6807564fe1603.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>2.\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4&#xff0c;\u4f7f\u7528\u4e0a\u4e00\u6b65\u9aa4\u5bfc\u51fa\u7684\u8bc1\u4e66\u6587\u4ef6\u751f\u6210\u4f9bjava \u7a0b\u5e8f\u4f7f\u7528\u7684keystore\u6587\u4ef6<\/p>\n<p>keytool <span class=\"token operator\">&#8211;<\/span><span class=\"token keyword\">import<\/span> <span class=\"token operator\">&#8211;<\/span>trustcacerts <span class=\"token operator\">&#8211;<\/span>alias ldapssl <span class=\"token operator\">&#8211;<\/span>file adserver<span class=\"token punctuation\">.<\/span>cer <span class=\"token operator\">&#8211;<\/span>keystore adserver_keystore<span class=\"token punctuation\">.<\/span>jks<\/p>\n<p>\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u65f6&#xff0c;\u586b\u5165\u6307\u5b9a\u5bc6\u7801&#xff1a;ldap&#064;1993<\/p>\n<h2>\u56db\u3001\u5bfc\u51fa\u67d0\u7528\u6237\u7684keytab\u6587\u4ef6<\/h2>\n<p>1.\u5728AD\u57df\u670d\u52a1\u5668\u7684\u670d\u52a1\u5668\u7ba1\u7406\u5668-\u5de5\u5177-Active Directory \u7528\u6237\u548c\u8ba1\u7b97\u673a \u7ba1\u7406\u9762\u677f\u4e2d\u65b0\u5efa\u4e00\u4e2a\u6d4b\u8bd5\u7528\u6237testuser5 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084152-680756506020c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"2025-04-22hn4pbzaccbe.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"2025-04-22qfjvkxh5g05.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>2.\u5728AD\u57df\u670d\u52a1\u5668\u4e2d\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u7a0b\u5e8f&#xff0c;\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210keytab\u6587\u4ef6<\/p>\n<p>ktpass <span class=\"token operator\">\/<\/span>out <span class=\"token class-name\">C<\/span><span class=\"token operator\">:<\/span>\\\\testuser5<span class=\"token punctuation\">.<\/span>keytab <span class=\"token operator\">\/<\/span>princ testuser5<span class=\"token annotation punctuation\">&#064;TESTLDAP.COM<\/span> <span class=\"token operator\">\/<\/span>mapuser <span class=\"token constant\">TESTLDAP<\/span>\\\\testuser5 <span class=\"token operator\">\/<\/span>crypto all <span class=\"token operator\">\/<\/span>ptype <span class=\"token constant\">KRB5_NT_PRINCIPAL<\/span> <span class=\"token operator\">\/<\/span>pass <span class=\"token operator\">*<\/span><\/p>\n<p>\u53c2\u6570\u91ca\u4e49&#xff1a;<\/p>\n<ul>\n<li>\/out \u540e\u53c2\u6570\u4e3akeytab\u6587\u4ef6\u7684\u8f93\u51fa\u8def\u5f84\u548c\u6587\u4ef6\u540d<\/li>\n<li>\/princ kerberos\u4e3b\u4f53\u540d&#xff0c;\u6d4b\u8bd5\u8fc7\u7a0b\u53ef\u7ea6\u5b9a\u4e3a \u8d26\u53f7&#064;\u57df\u540d<\/li>\n<li>\/mapuser \u57df\u8d26\u53f7\u6620\u5c04<\/li>\n<li>\/crypto \u52a0\u5bc6\u7c7b\u578b&#xff0c;\u53ef\u8bbe\u7f6e\u4e3aall&#xff0c;\u4e5f\u53ef\u6309\u9700\u914d\u7f6e<\/li>\n<\/ul>\n<p>\u6267\u884c\u547d\u4ee4\u540e\u6839\u636e\u63d0\u793a\u8f93\u5165\u8d26\u53f7\u7684\u5bc6\u7801&#xff0c;\u5b8c\u6210keytab\u6587\u4ef6\u521b\u5efa\u3002<\/p>\n<h2>\u4e94\u3001\u4e3b\u673a\u914d\u7f6ehosts\u6587\u4ef6<\/h2>\n<p>\u6253\u5f00C:\\\\Windows\\\\System32\\\\drivers\\\\etc\\\\hosts\u6587\u4ef6\u6dfb\u52a0\u5185\u5bb9<\/p>\n<p><span class=\"token number\">10.110<\/span><span class=\"token number\">.25<\/span><span class=\"token number\">.48<\/span> testldap<span class=\"token punctuation\">.<\/span>com<\/p>\n<h2>\u516d\u3001\u4e3b\u673a\u786e\u8ba4\u662f\u5426\u80fdping\u901a<\/h2>\n<p>\u6267\u884c\u547d\u4ee4&#xff0c;\u5982\u679c\u4e0b\u65b9\u4e24\u79cd\u90fd\u80fdping\u901a&#xff0c;\u5219\u8bc1\u660e\u81ea\u5df1\u9879\u76ee\u80fd\u8bbf\u95eeAD\u57df\u4e86\u3002<\/p>\n<p># ping testldap<span class=\"token punctuation\">.<\/span>com<br \/>\n\u6216\u8005<br \/>\n# ping <span class=\"token number\">10.110<\/span><span class=\"token number\">.25<\/span><span class=\"token number\">.48<\/span><\/p>\n<h2>\u672c\u4eba\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\u94fe\u63a5<\/h2>\n<p>1.Centos7.9\u5b89\u88c5openldap 2.Centos7.9\u5b89\u88c5kerberos 3.Openldap\u96c6\u6210Kerberos 4.Centos7.9\u5b89\u88c5phpldapadmin 5.java\u8fde\u63a5ldap\u5b9e\u73b0\u7528\u6237\u67e5\u8be2\u529f\u80fd 6.java\u8fde\u63a5kerberos\u7528\u6237\u8ba4\u8bc1 7.javax.security.auth.login.LoginException: Unable to obtain password from user 8.javax.security.auth.login.LoginException: null (68) 9.javax.security.auth.login.LoginException: Message stream modified (41) 10.javax.security.auth.login.LoginException: Checksum failed 11.javax.security.auth.login.LoginException: No CallbackHandler available to garner authentication info 12.javax.security.auth.login.LoginException: Cannot locate KDC 13.javax.security.auth.login.LoginException: Receive timed out 14.java: \u65e0\u6cd5\u8bbf\u95eeorg.springframework.context.ConfigurableApplicationContext 15.LDAP: error code 34 &#8211; invalid DN 16.LDAP: error code 32 &#8211; No Such Object 17.java: \u65e0\u6cd5\u8bbf\u95eeorg.springframework.ldap.core.LdapTemplate 18.windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 19.java\u8fde\u63a5AD(Microsoft Active Directory)\u6a21\u62df\u7528\u6237\u767b\u5f55\u8ba4\u8bc1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u5047\u8bbe\u6211\u4eec\u516c\u53f8\u6709\u81ea\u5df1\u7684\u95e8\u6237\u7f51\u7ad9\uff0c\u73b0\u5728\u6211\u4eec\u6536\u8d2d\u4e86\u4e00\u5bb6\u516c\u53f8\uff0c\u4ed6\u4eec\u6570\u636e\u5e93\u91c7\u7528ldap\u5b58\u50a8\u7528\u6237\u6570\u636e\uff0c\u90a3\u4e48\u4e3a\u4e86\u4ed6\u4eec\u8d26\u6237\u80fd\u767b\u9646\u6211\u4eec\u516c\u53f8\u9879\u76ee\u6240\u4ee5\u9700\u8981\u96c6\u6210\uff0c\u800c\u4e0d\u662f\u518d\u628a\u4ed6\u4eec\u7684\u8d26\u6237\u91cd\u65b0\u5728mysql\u518d\u521b\u5efa\u4e00\u904d\uff0c\u4e07\u4e00\u4eba\u5bb6\u67091W\u4e2a\u8d26\u6237\u5462\uff0c\u4e0d\u7d2f\u6b7b\u4e86\u4e14\u4e5f\u4e0d\u73b0\u5b9e\u554a\u30027.\u6253\u5f00AD DS\u7684\u90e8\u7f72\u5411\u5bfc\uff0c\u7531\u4e8e\u6211\u4eec\u8fd9\u91cc\u662f\u90e8\u7f72\u65b0\u7684AD\u63a7\u5236\u5668\uff0c\u6240\u4ee5\u90e8\u7f72\u914d\u7f6e\u9009\u62e9\u6dfb\u52a0\u65b0\u6797\uff0c\u628a\u6839\u57df\u540d\u8bbe\u7f6e\u6210testldap.com\uff08\u81ea\u5b9a\u4e49\uff09\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u30024.\u670d\u52a1\u5668\u9009\u62e9\u4ece\u670d\u52a1\u5668\u6c60\u4e2d\u9009\u62e9\u670d\u52a1\u5668\uff0c\u518d\u9009\u4e2d\u6c60\u4e2d\u7684\u672c\u5730\u670d\u52a1\u5668\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u300217.\u6307\u5b9aCA\u6570\u636e\u5e93\u7684\u4f4d\u7f6e\uff0c\u9ed8\u8ba4\u5373\u53ef.\u70b9\u51fb\u4e0b\u4e00\u6b65\u3002_server2016\u642d\u5efaad\u57df\u670d\u52a1\u5668<\/p>\n","protected":false},"author":2,"featured_media":31944,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2590,2585,149,2588,2589,2587,2586,43],"topic":[],"class_list":{"0":"post-31964","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-ad","9":"tag-ldapkerberos","10":"tag-windows","11":"tag-windowsad","15":"tag-43"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/31964.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u5047\u8bbe\u6211\u4eec\u516c\u53f8\u6709\u81ea\u5df1\u7684\u95e8\u6237\u7f51\u7ad9\uff0c\u73b0\u5728\u6211\u4eec\u6536\u8d2d\u4e86\u4e00\u5bb6\u516c\u53f8\uff0c\u4ed6\u4eec\u6570\u636e\u5e93\u91c7\u7528ldap\u5b58\u50a8\u7528\u6237\u6570\u636e\uff0c\u90a3\u4e48\u4e3a\u4e86\u4ed6\u4eec\u8d26\u6237\u80fd\u767b\u9646\u6211\u4eec\u516c\u53f8\u9879\u76ee\u6240\u4ee5\u9700\u8981\u96c6\u6210\uff0c\u800c\u4e0d\u662f\u518d\u628a\u4ed6\u4eec\u7684\u8d26\u6237\u91cd\u65b0\u5728mysql\u518d\u521b\u5efa\u4e00\u904d\uff0c\u4e07\u4e00\u4eba\u5bb6\u67091W\u4e2a\u8d26\u6237\u5462\uff0c\u4e0d\u7d2f\u6b7b\u4e86\u4e14\u4e5f\u4e0d\u73b0\u5b9e\u554a\u30027.\u6253\u5f00AD DS\u7684\u90e8\u7f72\u5411\u5bfc\uff0c\u7531\u4e8e\u6211\u4eec\u8fd9\u91cc\u662f\u90e8\u7f72\u65b0\u7684AD\u63a7\u5236\u5668\uff0c\u6240\u4ee5\u90e8\u7f72\u914d\u7f6e\u9009\u62e9\u6dfb\u52a0\u65b0\u6797\uff0c\u628a\u6839\u57df\u540d\u8bbe\u7f6e\u6210testldap.com\uff08\u81ea\u5b9a\u4e49\uff09\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u30024.\u670d\u52a1\u5668\u9009\u62e9\u4ece\u670d\u52a1\u5668\u6c60\u4e2d\u9009\u62e9\u670d\u52a1\u5668\uff0c\u518d\u9009\u4e2d\u6c60\u4e2d\u7684\u672c\u5730\u670d\u52a1\u5668\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u300217.\u6307\u5b9aCA\u6570\u636e\u5e93\u7684\u4f4d\u7f6e\uff0c\u9ed8\u8ba4\u5373\u53ef.\u70b9\u51fb\u4e0b\u4e00\u6b65\u3002_server2016\u642d\u5efaad\u57df\u670d\u52a1\u5668\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/31964.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-22T08:41:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084144-68075648968bb.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31964.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/31964.html\",\"name\":\"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-22T08:41:53+00:00\",\"dateModified\":\"2025-04-22T08:41:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/31964.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/31964.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/31964.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/31964.html","og_locale":"zh_CN","og_type":"article","og_title":"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf28\u6b21\u3002\u5047\u8bbe\u6211\u4eec\u516c\u53f8\u6709\u81ea\u5df1\u7684\u95e8\u6237\u7f51\u7ad9\uff0c\u73b0\u5728\u6211\u4eec\u6536\u8d2d\u4e86\u4e00\u5bb6\u516c\u53f8\uff0c\u4ed6\u4eec\u6570\u636e\u5e93\u91c7\u7528ldap\u5b58\u50a8\u7528\u6237\u6570\u636e\uff0c\u90a3\u4e48\u4e3a\u4e86\u4ed6\u4eec\u8d26\u6237\u80fd\u767b\u9646\u6211\u4eec\u516c\u53f8\u9879\u76ee\u6240\u4ee5\u9700\u8981\u96c6\u6210\uff0c\u800c\u4e0d\u662f\u518d\u628a\u4ed6\u4eec\u7684\u8d26\u6237\u91cd\u65b0\u5728mysql\u518d\u521b\u5efa\u4e00\u904d\uff0c\u4e07\u4e00\u4eba\u5bb6\u67091W\u4e2a\u8d26\u6237\u5462\uff0c\u4e0d\u7d2f\u6b7b\u4e86\u4e14\u4e5f\u4e0d\u73b0\u5b9e\u554a\u30027.\u6253\u5f00AD DS\u7684\u90e8\u7f72\u5411\u5bfc\uff0c\u7531\u4e8e\u6211\u4eec\u8fd9\u91cc\u662f\u90e8\u7f72\u65b0\u7684AD\u63a7\u5236\u5668\uff0c\u6240\u4ee5\u90e8\u7f72\u914d\u7f6e\u9009\u62e9\u6dfb\u52a0\u65b0\u6797\uff0c\u628a\u6839\u57df\u540d\u8bbe\u7f6e\u6210testldap.com\uff08\u81ea\u5b9a\u4e49\uff09\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u30024.\u670d\u52a1\u5668\u9009\u62e9\u4ece\u670d\u52a1\u5668\u6c60\u4e2d\u9009\u62e9\u670d\u52a1\u5668\uff0c\u518d\u9009\u4e2d\u6c60\u4e2d\u7684\u672c\u5730\u670d\u52a1\u5668\uff0c\u70b9\u51fb\u4e0b\u4e00\u6b65\u300217.\u6307\u5b9aCA\u6570\u636e\u5e93\u7684\u4f4d\u7f6e\uff0c\u9ed8\u8ba4\u5373\u53ef.\u70b9\u51fb\u4e0b\u4e00\u6b65\u3002_server2016\u642d\u5efaad\u57df\u670d\u52a1\u5668","og_url":"https:\/\/www.wsisp.com\/helps\/31964.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-22T08:41:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250422084144-68075648968bb.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/31964.html","url":"https:\/\/www.wsisp.com\/helps\/31964.html","name":"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-22T08:41:53+00:00","dateModified":"2025-04-22T08:41:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/31964.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/31964.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/31964.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"windows server2016\u642d\u5efaAD\u57df\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=31964"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/31964\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/31944"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=31964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=31964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=31964"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=31964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}