shell\nsudo apt install slapd ldap-utils\n<\/pre>\n<\/p>\n3.\u914d\u7f6eOpenLDAP<\/b><\/p>\n
\u5728\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e\u3002\u4f60\u9700\u8981\u8bbe\u7f6e\u7ba1\u7406\u5458\u5bc6\u7801\u4ee5\u53ca\u57df\u540d\u7b49\u4fe1\u606f\u3002\u8be6\u7ec6\u6b65\u9aa4\u53ef\u4ee5\u53c2\u8003\u76f8\u5173\u6587\u6863\u6216\u8005\u5b98\u65b9\u6307\u5357\u3002<\/p>\n
4.\u521b\u5efaLDAP\u6570\u636e\u5e93<\/b><\/p>\n
\u4f7f\u7528slapadd\u547d\u4ee4\u6765\u521b\u5efa\u4e00\u4e2a\u7a7a\u7684LDAP\u6570\u636e\u5e93\u3002\u8fd9\u4e2a\u547d\u4ee4\u5c06\u6839\u636e\u4f60\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u521b\u5efa\u6570\u636e\u5e93\uff0c\u5e76\u4e3a\u5176\u5206\u914d\u76f8\u5e94\u7684\u76ee\u5f55\u3002<\/p>\n
\n
shell\nsudo slapadd -n 0 -F\/etc\/ldap\/slapd.d\n<\/pre>\n<\/p>\n5.\u6dfb\u52a0LDAP\u7528\u6237<\/b><\/p>\n
\u73b0\u5728\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528ldapadd\u547d\u4ee4\u6765\u6dfb\u52a0\u7528\u6237\u5230LDAP\u6570\u636e\u5e93\u4e2d\u3002\u4f60\u9700\u8981\u63d0\u4f9b\u4e00\u4e2aLDIF\uff08LDAP\u6570\u636e\u4ea4\u6362\u683c\u5f0f\uff09\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u5f85\u6dfb\u52a0\u7684\u7528\u6237\u4fe1\u606f\u3002<\/p>\n
\n
shell\nldapadd -x-D\"cn=admin,dc=example,dc=com\"-W-f user.ldif\n<\/pre>\n<\/p>\n<\/p>\n
6.\u9a8c\u8bc1LDAP\u7528\u6237<\/b><\/p>\n
\u4f7f\u7528ldapsearch\u547d\u4ee4\u6765\u9a8c\u8bc1\u5df2\u7ecf\u6dfb\u52a0\u7684\u7528\u6237\u662f\u5426\u6b63\u786e\u3002\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u81ea\u5b9a\u4e49\u641c\u7d22\u3002<\/p>\n
\n
shell\nldapsearch -x-b\"dc=example,dc=com\"\"(objectClass=*)\"\n<\/pre>\n<\/p>\n7.\u914d\u7f6e\u5ba2\u6237\u7aef\u8bbf\u95ee<\/b><\/p>\n
<\/p>\n
\u5982\u679c\u4f60\u60f3\u5728\u5176\u4ed6\u8ba1\u7b97\u673a\u4e0a\u8bbf\u95eeLDAP\u670d\u52a1\u5668\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u5ba2\u6237\u7aef\u4ee5\u8fde\u63a5\u5230\u8be5\u670d\u52a1\u5668\u3002\u5177\u4f53\u914d\u7f6e\u65b9\u6cd5\u53ef\u4ee5\u53c2\u8003\u76f8\u5173\u6587\u6863\u6216\u8005\u5b98\u65b9\u6307\u5357\u3002<\/p>\n
8.\u9ad8\u7ea7\u529f\u80fd\u62d3\u5c55<\/b><\/p>\n
\u9664\u4e86\u57fa\u672c\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u4e4b\u5916linux \u5b89\u88c5ldap<\/strong>\uff0cLDAP\u8fd8\u652f\u6301\u8bb8\u591a\u9ad8\u7ea7\u529f\u80fd\uff0c\u5982SSL\/TLS\u52a0\u5bc6\u3001\u8bbf\u95ee\u63a7\u5236\u7b49\u3002\u5982\u679c\u4f60\u5bf9\u8fd9\u4e9b\u529f\u80fd\u611f\u5174\u8da3\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6df1\u5165\u5b66\u4e60\u548c\u5b9e\u8df5\u3002<\/p>\n\u901a\u8fc7\u4ee5\u4e0a\u51e0\u4e2a\u6b65\u9aa4\uff0c\u6211\u4eec\u5c31\u6210\u529f\u5730\u5728Linux\u7cfb\u7edf\u4e0a\u5b89\u88c5\u4e86LDAP\uff0c\u5e76\u4e14\u6dfb\u52a0\u4e86\u4e00\u4e9b\u7528\u6237\u4fe1\u606f\u3002\u73b0\u5728\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u7ba1\u7406\u548c\u8bbf\u95ee\u8fd9\u4e9b\u7528\u6237\u4fe1\u606f\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
LDAP\uff08\u8f7b\u91cf\u7ea7\u76ee\u5f55\u8bbf\u95ee\u534f\u8bae\uff09\u662f\u4e00\u79cd\u7528\u4e8e\u5728\u7f51\u7edc\u4e0a\u8bbf\u95ee\u548c\u7ba1\u7406\u76ee\u5f55\u670d\u52a1\u7684\u534f\u8bae\u3002\u5b89\u88c5OpenLDAP\u8f6f\u4ef6\u5305\u4f7f\u7528\u5305\u7ba1\u7406\u5668\uff08\u5982apt\u3001yum\u7b49\uff09\u5b89\u88c5OpenLDAP\u8f6f\u4ef6\u5305\u3002-F\/etc\/ldap\/slapd.\u5982\u679c\u4f60\u60f3\u5728\u5176\u4ed6\u8ba1\u7b97\u673a\u4e0a\u8bbf\u95eeLDAP\u670d\u52a1\u5668\uff0c\u4f60\u9700\u8981\u914d\u7f6e\u5ba2\u6237\u7aef\u4ee5\u8fde\u63a5\u5230\u8be5\u670d\u52a1\u5668\u3002\u9664\u4e86\u57fa\u672c\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u4e4b\u5916\uff0cLDAP\u8fd8\u652f\u6301\u8bb8\u591a\u9ad8\u7ea7\u529f\u80fd\uff0c\u5982SSL\/TLS\u52a0\u5bc6\u3001\u8bbf\u95ee\u63a7\u5236\u7b49\u3002<\/p>\n","protected":false},"author":1,"featured_media":284843,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-284842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/284842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=284842"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/284842\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/284843"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=284842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=284842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=284842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}