{"id":2547,"date":"2014-07-07T22:50:12","date_gmt":"2014-07-07T14:50:12","guid":{"rendered":"http:\/\/blog.pighead.cc\/whsyu\/?p=2547"},"modified":"2014-07-07T22:50:12","modified_gmt":"2014-07-07T14:50:12","slug":"samba3-ldap-pdc-member-quicknote","status":"publish","type":"post","link":"https:\/\/blog.pighead.cc\/whsyu\/2014\/07\/07\/samba3-ldap-pdc-member-quicknote\/","title":{"rendered":"Samba 3, LDAP, PDC, member \u901f\u8a18"},"content":{"rendered":"<p class=\"bb-post-separator\"><strong>[\u83ef\u8a9e, cmn-Hant-TW]  <\/strong><\/p><p>\u525b\u597d\u6709\u5169\u5230\u4e09\u53f0 samba 3 \u5206\u4eab\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u7814\u7a76\u4e86\u4e00\u4e0b\u600e\u9ebc\u628a\u9019\u5806\u6a5f\u5668\u4e32\u5230 ldap \u4e0a\u3002<\/p>\n<p>\u770b\u4e86\u4e00\u4e0b standalone \u7684\u67b6\u69cb\u4e0d\u597d\u7ba1\u7406\uff0c\u6240\u4ee5\u5c31\u7528 domain controller (pdc) \u52a0 members \u7684\u5f62\u5f0f\uff0c\u4e5f\u5c31\u662f\u53ea\u6709 pdc \u4e32\u5230 ldap \u4e0a\uff0c\u5176\u4ed6\u7684 member \u53ea\u8ddf pdc \u554f\u6b0a\u9650\u800c\u5df2\uff0c\u4e0d\u6703\u76f4\u63a5\u4e32 ldap\u3002\u7576\u7136\uff0c\u4e0d\u7ba1\u662f\u9593\u63a5\u6216\u662f\u76f4\u63a5\uff0c\u6574\u500b\u7db2\u57df\u4f7f\u7528\u8005\u5e33\u865f\u8ddf\u6a5f\u5668\u90fd\u6703\u7531 ldap \u7ba1\u63a7\u3002<\/p>\n<p>\u56e0\u70ba\u9084\u883b\u8907\u96dc\u7684\uff0c\u9019\u908a\u5c31\u5927\u6982\u5217\u4e86\u4e00\u4e0b\u5361\u95dc\u7684\u5730\u65b9\uff0c\u8ddf\u8981\u6ce8\u610f\u7684\u9ede\u800c\u5df2<\/p>\n<p>\u9996\u5148\u8981\u628a\u4e00\u53f0\u8a2d\u6210 pdc\uff0c\u7167<a href=\"http:\/\/www.unixmen.com\/setup-samba-domain-controller-with-openldap-backend-in-ubuntu-13-04\/\">\u9019\u7bc7<\/a>\u8ddf\u5b98\u7db2<a href=\"http:\/\/www.samba.org\/samba\/docs\/man\/Samba-HOWTO-Collection\/samba-pdc.html\">\u9019\u7bc7<\/a>\u4f86\u8a2d\u5b9a\u61c9\u8a72\u6c92\u5565\u592a\u5927\u554f\u984c\uff0c\u96d6\u7136\u8aaa\u90a3\u7bc7\u7684\u76ee\u7684\u662f\u8981\u5f04 windows 7 \u767b\u5165\u7db2\u57df\u5c31\u662f\u3002ldap \u5b58\u53d6\u6b0a\u9650\u8981\u8a2d\u597d\uff0c\u6709\u7528 SSL \u7684\u8a71\uff0cCA \u4e5f\u8981\u8a2d\u597d\uff0c\u9019\u6a23 domain \u61c9\u8a72\u5c31\u6703\u81ea\u52d5\u5728 ldap \u4e0a\u958b\u597d\u4e86\uff0c\u4e0d\u904e domain \u6703\u81ea\u52d5\u958b\u5728\u6839\u76ee\u9304\u4e0b\uff0c\u8981\u63db\u4f4d\u5b50\u7684\u8a71\u958b\u597d\u518d\u81ea\u5df1\u79fb\u5373\u53ef\u3002<\/p>\n<p>\u63a5\u4e0b\u4f86\u8981\u8a2d clients\uff0c\u770b\u5b98\u7db2<a href=\"https:\/\/www.samba.org\/samba\/docs\/man\/Samba-Guide\/unixclients.html\">\u9019\u7bc7<\/a>\u5373\u53ef\uff0c\u5927\u81f4\u4e0a\u5c31\u662f\u5728 smb.conf \u88e1\u9762 workgroup \u8981\u8a2d\u6210\u8ddf pdc \u4e00\u6a23\uff0cnetbios \u8a2d\u81ea\u5df1\u7684\u540d\u5b57\uff0csecurity \u8a2d\u6210 domain \u5373\u53ef\uff0c\u63a5\u8457\u53ea\u8981 net join \u6210\u529f\uff0c\u9023\u5230\u9019\u53f0\u8981\u8a8d\u8b49\u7684\u6771\u897f\u90fd\u6703\u900f\u904e pdc \u8655\u7406\u4e86\uff0c\u4e0d\u904e\u8981\u80fd join \u6210\u529f\u5176\u5be6\u6c92\u90a3\u9ebc\u5bb9\u6613\uff0c\u81f3\u5c11\u9084\u8981\u9054\u6210\u9019\u4e9b\u689d\u4ef6<\/p>\n<ol>\n<li>client \u5e33\u865f\u8981\u5728 ldap \u8a3b\u518a\u597d<\/li>\n<li>\u4e0b\u6307\u4ee4\u7684 user \u5e33\u865f\u8981\u6709 join domain \u7684\u6b0a\u9650<\/li>\n<li>\u6240\u6709\u5e33\u865f\u7684 primary group sid \u90fd\u8981\u8ddf domain \u4e00\u81f4<\/li>\n<\/ol>\n<p>\u7b2c\u4e00\u9ede\u5176\u5be6\u53ef\u4ee5\u5728 smb.conf \u88e1\u9762\u8a2d\u597d\u81ea\u52d5\u958b\u5e33\u865f\u7684\u6307\u4ee4\u4f86\u8a3b\u518a\uff0c\u4e0d\u904e\u53cd\u6b63\u8981\u52a0\u7684 server \u662f\u56fa\u5b9a\u90a3\u5e7e\u53f0\uff0c\u7528\u4e00\u4e9b\u5e38\u898b\u7684 ldap \u7ba1\u7406\u5de5\u5177\u5148\u52a0\u597d\u5373\u53ef\u3002\u7b2c\u4e8c\u9ede\u7684\u8a71\u8981\u6ce8\u610f\u7684\u662f\u9019\u500b\u6b0a\u9650\u53ef\u4ee5\u7528<a href=\"https:\/\/www.samba.org\/samba\/docs\/man\/Samba-HOWTO-Collection\/rights.html\">\u9019\u7bc7<\/a>\u63d0\u5230\u7684\u65b9\u6cd5\u8a2d\u5b9a\uff0c\u4f46\u662f\u8981\u7ba1\u7406\u8005\u624d\u80fd\u8a2d\uff0c\u4e0d\u904e\u9810\u8a2d\u60c5\u6cc1\u4e0b samba \u4e0d\u77e5\u9053\u8ab0\u624d\u662f\u7ba1\u7406\u8005\uff0c\u6240\u4ee5\u6c92\u6709\u4eba\u6709\u6b0a\u9650\u53ef\u4ee5\u8a2d\u5b9a\u3002\u8a2d\u7ba1\u7406\u8005\u6700\u65b9\u4fbf\u7684\u65b9\u5f0f\u5c31\u662f\u628a\u67d0\u500b unix \u7fa4\u7d44\u5c0d\u61c9\u6210 samba domain \u7684\u7ba1\u7406\u8005\u7fa4\u7d44\uff0c\u8a73\u7d30\u65b9\u6cd5\u53ef\u4ee5\u770b<a href=\"http:\/\/trufelli.wordpress.com\/2011\/03\/10\/how-to-create-administrators-of-a-samba-domain\/\">\u9019\u7bc7<\/a>\uff0c\u5c0d\u61c9\u597d\u4e4b\u5f8c\u8a72\u7fa4\u7d44\u5c31\u662f\u7ba1\u7406\u8005\uff0c\u7fa4\u7d44\u7684\u6210\u54e1\u5c31\u53ef\u4ee5\u8a2d\u5b9a\u6b0a\u9650\u4e86\uff0c\u6709\u8da3\u7684\u5730\u65b9\u5728\u65bc\u7ba1\u7406\u8005\u672c\u8eab\u5c31\u6709 join domain \u7684\u6b0a\u9650\uff0c\u6240\u4ee5\u8b8a\u6210\u7ba1\u7406\u8005\u4e4b\u5f8c\u4e5f\u4e0d\u7528\u7279\u5225\u518d\u8a2d\u7d66\u81ea\u5df1 join domain \u6b0a\u9650\u4e86\u3002<\/p>\n<p>\u7b2c\u4e09\u9ede\u57fa\u672c\u4e0a\u5c31\u662f\u60f3\u8fa6\u6cd5\u8b93\u6240\u6709\u770b\u5f97\u5230 sid \u7684\u5730\u65b9\u901a\u901a\u4e00\u81f4\u5316\uff0c\u5982\u679c\u4e0d\u5c0f\u5fc3\u6e05\u6389\u672c\u6a5f samba \u7684\u8cc7\u6599\u5eab\uff0c\u4e5f\u8981\u60f3\u8fa6\u6cd5\u7528 net setlocalsid \u628a\u4ed6\u8a2d\u56de\u4f86\uff0c\u7576\u7136 ldap \u88e1\u9762\u7684\u503c\u4e5f\u8981\u4e00\u81f4\uff0c\u53ea\u8981\u6709\u4e0d\u4e00\u81f4\u7684\u5730\u65b9\uff0c\u5c31\u5f88\u53ef\u80fd\u6703\u9023\u4e0d\u4e0a\u3002<\/p>\n<p>\u5927\u81f4\u4e0a\u9019\u6a23\u5c31\u53ef\u4ee5\u52d5\uff0c\u81f3\u65bc\u50cf\u662f ADS \u6216\u662f\u8de8\u7db2\u57df\u767b\u5165\u4e4b\u985e\u7684\u6771\u897f\u9019\u6b21\u6c92\u7528\u5230\u5c31\u5148\u653e\u8457\uff0c\u4e4b\u5f8c\u6709\u8981\u7528\u5230\u7684\u8a71\u518d\u4f86\u4f5c\u529f\u8ab2\u597d\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[\u83ef\u8a9e, cmn-Hant-TW] \u525b\u597d\u6709\u5169\u5230\u4e09\u53f0 samba 3 \u5206\u4eab\u7684\u9700\u6c42\uff0c\u6240\u4ee5\u7814\u7a76\u4e86\u4e00\u4e0b\u600e\u9ebc\u628a\u9019\u5806\u6a5f\u5668\u4e32\u5230 ldap \u4e0a\u3002 \u770b\u4e86\u4e00\u4e0b standalone \u7684\u67b6\u69cb\u4e0d\u597d\u7ba1\u7406\uff0c\u6240\u4ee5\u5c31\u7528 domain controller (pdc) \u52a0 members \u7684\u5f62\u5f0f\uff0c\u4e5f\u5c31\u662f\u53ea\u6709 pdc \u4e32\u5230 ldap \u4e0a\uff0c\u5176\u4ed6\u7684 member \u53ea\u8ddf pdc \u554f\u6b0a\u9650\u800c\u5df2\uff0c\u4e0d\u6703\u76f4\u63a5\u4e32 ldap\u3002\u7576\u7136\uff0c\u4e0d\u7ba1\u662f\u9593\u63a5\u6216\u662f\u76f4\u63a5\uff0c\u6574\u500b\u7db2\u57df\u4f7f\u7528\u8005\u5e33\u865f\u8ddf\u6a5f\u5668\u90fd\u6703\u7531 ldap \u7ba1\u63a7\u3002 \u56e0\u70ba\u9084\u883b\u8907\u96dc\u7684\uff0c\u9019\u908a\u5c31\u5927\u6982\u5217\u4e86\u4e00\u4e0b\u5361\u95dc\u7684\u5730\u65b9\uff0c\u8ddf\u8981\u6ce8\u610f\u7684\u9ede\u800c\u5df2 \u9996\u5148\u8981\u628a\u4e00\u53f0\u8a2d\u6210 pdc\uff0c\u7167\u9019\u7bc7\u8ddf\u5b98\u7db2\u9019\u7bc7\u4f86\u8a2d\u5b9a\u61c9\u8a72\u6c92\u5565\u592a\u5927\u554f\u984c\uff0c\u96d6\u7136\u8aaa\u90a3\u7bc7\u7684\u76ee\u7684\u662f\u8981\u5f04 windows 7 \u767b\u5165\u7db2\u57df\u5c31\u662f\u3002ldap \u5b58\u53d6\u6b0a\u9650\u8981\u8a2d\u597d\uff0c\u6709\u7528 SSL \u7684\u8a71\uff0cCA \u4e5f\u8981\u8a2d\u597d\uff0c\u9019\u6a23 domain \u61c9\u8a72\u5c31\u6703\u81ea\u52d5\u5728&hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[4591,97,4583],"class_list":["post-2547","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-freebsd","tag-samba","tag-windows-domain"],"_links":{"self":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/comments?post=2547"}],"version-history":[{"count":4,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2547\/revisions"}],"predecessor-version":[{"id":2551,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/posts\/2547\/revisions\/2551"}],"wp:attachment":[{"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/media?parent=2547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/categories?post=2547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pighead.cc\/whsyu\/wp-json\/wp\/v2\/tags?post=2547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}