{"id":18121,"date":"2013-12-25T10:18:31","date_gmt":"2013-12-25T02:18:31","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/25\/open-ldap-server-%e6%b8%ac%e8%a9%a6\/"},"modified":"2013-12-25T10:18:31","modified_gmt":"2013-12-25T02:18:31","slug":"open-ldap-server-%e6%b8%ac%e8%a9%a6","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/25\/open-ldap-server-%e6%b8%ac%e8%a9%a6\/","title":{"rendered":"Open LDAP Server \u6e2c\u8a66"},"content":{"rendered":"<p>\u8ddd\u96e2\u4e0a\u4e00\u6b21\u6478 LDAP Server\u00a0\u771f\u662f\u6709\u4e9b\u4e45\u4e86\uff0c\u8a72\u5fd8\u4e86\u4e5f\u90fd\u5fd8\u5149\u4e86\uff0c\u53ea\u80fd\u9760\u81ea\u5df1\u4ee5\u524d\u7684\u7b46\u8a18\u548c\u820a\u7684 LDAP Server\u00a0\u7684\u8a2d\u5b9a\u6a94\uff0c\u548c Google\u00a0\u641c\u5c0b\u7db2\u9801\uff0c\u6240\u4ee5\u8981\u4e0d\u65b7\u6e2c\u8a66\u8a2d\u5b9a\u6a94\u548c\u532f\u5165 ldif\u00a0\u8a2d\u5b9a\u6a94\uff0c\u4f46\u5982\u679c\u6c92\u6709\u5148\u628a\u820a\u7684\u8cc7\u6599\u5148\u6e05\u9664\uff0c\u76f4\u63a5\u532f\u5165\u65b0\u7684\u8cc7\u6599\uff0c\u5c31\u6703\u51fa\u73fe\u985e\u4f3c\u4e0b\u9762\u7684\u756b\u9762\uff1a<br \/># <span style=\"color: #ff0000;\">slapadd -v -l \/root\/ldif\/s0990.passwd.ldif_N<\/span><br \/><span style=\"color: #0000ff;\">The first database does not allow slapadd; using the first available one (2)<\/span><br \/><span style=\"color: #0000ff;\">=&gt; bdb_tool_entry_put: id2entry_add failed: DB_KEYEXIST: Key\/data pair already exists (-30995)<\/span><br \/><span style=\"color: #0000ff;\">=&gt; bdb_tool_entry_put: txn_aborted! DB_KEYEXIST: Key\/data pair already exists (-30995)<\/span><br \/><span style=\"color: #0000ff;\">slapadd: could not add entry dn=&#8221;uid=s0990001,ou=Student,dc=ldap,dc=tces.ilc.edu.tw&#8221; (line=1): txn_aborted! DB_KEYEXIST: Key\/data pair already exists (-30995)<\/span><br \/><span style=\"color: #0000ff;\">_\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0.77% eta\u00a0\u00a0 none elapsed\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 none spd 118.5 k\/s<\/span><br \/><span style=\"color: #0000ff;\">Closing DB&#8230;<\/span>[@more@]\u5982\u679c\u662f\u4fee\u6539 \/etc\/openldap\/slapd.conf\u00a0\u8a2d\u5b9a\u6a94<br \/>\u8981\u505a\u4e0b\u9762\u7684\u8655\u7406<br \/># <span style=\"color: #ff0000;\">service slapd stop<\/span><br \/># <span style=\"color: #ff0000;\">rm -rf \/etc\/openldap\/slapd.d\/*<\/span><br \/># <span style=\"color: #ff0000;\">slaptest -f \/etc\/openldap\/slapd.conf -F \/etc\/openldap\/slapd.d<\/span><br \/># <span style=\"color: #ff0000;\">chown -R ldap:ldap \/etc\/openldap\/slapd.d<\/span><br \/># <span style=\"color: #ff0000;\">service slapd start<\/span><\/p>\n<p>\u5982\u679c\u8981\u91cd\u65b0\u532f\u5165\u5168\u90e8\u7684\u8cc7\u6599<br \/># <span style=\"color: #ff0000;\">service slapd stop<\/span><br \/># <span style=\"color: #ff0000;\">rm -rf \/var\/lib\/ldap\/*<\/span><br \/># <span style=\"color: #ff0000;\">cp \/usr\/share\/openldap-servers\/DB_CONFIG.example \/var\/lib\/ldap\/DB_CONFIG<br \/><\/span>\u532f\u5165 LDIF\u00a0\u683c\u5f0f\u6a94\u5f8c<br \/># <span style=\"color: #ff0000;\">chown -R ldap:ldap \/var\/lib\/ldap<\/span><br \/># <span style=\"color: #ff0000;\">service slapd start<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8ddd\u96e2\u4e0a\u4e00\u6b21\u6478 LDAP Server\u00a0\u771f\u662f\u6709\u4e9b\u4e45\u4e86\uff0c\u8a72\u5fd8\u4e86\u4e5f\u90fd\u5fd8\u5149\u4e86\uff0c\u53ea\u80fd\u9760\u81ea\u5df1\u4ee5\u524d\u7684\u7b46\u8a18\u548c\u820a\u7684 LDAP S &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2013\/12\/25\/open-ldap-server-%e6%b8%ac%e8%a9%a6\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Open LDAP Server \u6e2c\u8a66\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[115],"tags":[],"class_list":["post-18121","post","type-post","status-publish","format-standard","hentry","category-c-78460"],"meta_key":{"_encloseme":["1"],"lt_post_id":["467235"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18121"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18121"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18121\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}