{"id":2135,"date":"2009-06-19T11:51:11","date_gmt":"2009-06-19T02:51:11","guid":{"rendered":"https:\/\/lain.dnsalias.org\/~garry\/blog\/?p=2135"},"modified":"2009-06-19T11:51:11","modified_gmt":"2009-06-19T02:51:11","slug":"active_directorysamba","status":"publish","type":"post","link":"https:\/\/lain.dnsalias.org\/~garry\/blog\/?p=2135","title":{"rendered":"Active Directory\u3068Samba\u306e\u30e6\u30fc\u30b6\u30fc\u5171\u6709"},"content":{"rendered":"<p>\u76ee\u7684<br \/>\n\u30fbWindows\u3068Samba\u306e\u30e6\u30fc\u30b6\u5171\u6709<\/p>\n<p>\u4ed5\u69d8<br \/>\n\u30fb\u30e6\u30fc\u30b6\u306e\u767b\u9332\u3001\u30b0\u30eb\u30fc\u30d7\u306e\u767b\u9332\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4\u306fWindows\uff08ActiveDirectory\uff09\u306e\u307f\u3067\u884c\u3046\u3002<br \/>\n\u30fbSamba\u30b5\u30fc\u30d0\u306f\u3001\u5c06\u6765\u306b\u308f\u305f\u3063\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u8907\u6570\u30b5\u30fc\u30d0\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p>\u624b\u9806<br \/>\n\uff11\uff0eSamba\u3092Winbind\u3067\u30e6\u30fc\u30b6\u30fc\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\uff12\uff0eActiveDirectory\u3092Winbind\u3067\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\uff13\uff0eOpenLDAP\u3092\u8a2d\u5b9a\u3057\u3001ActiveDirecotry\u3068\u30e6\u30fc\u30b6\u30fc\u53c2\u7167\u3092\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\uff14\uff0eWinbind\u304cOpenLDAP\u306b\u30e6\u30fc\u30b6\u30fc\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p>\u3067\u3001\u3088\u3046\u3084\u304f\uff11\u3060\u3051\u7d42\u308f\u3063\u305f\u306e\u3067\u30e1\u30e2\u6b8b\u3057<\/p>\n<p>VirtualPC\u4e0a\u3067\u306e\u8a2d\u5b9a\u306f\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3002\uff08\u5b9f\u6a5f\u3067\u306f\u540c\u3058\u8a2d\u5b9a\u3067\u3044\u304f\u304cVirtualPC\u4e0a\u3067\u306f\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u3002\uff09<\/p>\n<p>\uff11\uff0ePorts\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002Samba\u3067\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u5909\u66f4\u3002winbindd\u3092\u5165\u308c\u308b\u3002<\/p>\n<p>\uff12\uff0esmb.conf\u3068nsswitch.conf\u306e\u7de8\u96c6\u3002<\/p>\n<p>smb.conf<\/p>\n<p style=\"MARGIN-LEFT: 4em\">workgroup\u3000domain\u540d\uff1f\u5fc5\u8981\u304b\u3069\u3046\u304b\u5fae\u5999\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">server string\u3000\u30b5\u30fc\u30d0\u4e00\u89a7\u306b\u8f09\u308b\u3068\u304d\u306e\u8aac\u660e<\/p>\n<p style=\"MARGIN-LEFT: 4em\">security = ads<br \/>\n\u6614\u306fdomain\u3060\u3063\u305f\u3089\u3057\u3044\u304cads\u3067\u3046\u307e\u304f\u3044\u3063\u305f\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">password server = *<br \/>\n\u3088\u304f\u5206\u304b\u3089\u3093\u3051\u3069\u540c\u4e00\u30bb\u30b0\u30e1\u30f3\u30c8\u306a\u3089*\u3067\u3044\u3044\u3089\u3057\u3044\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">realm\u3000\u30c9\u30e1\u30a4\u30f3\u540d<\/p>\n<p style=\"MARGIN-LEFT: 4em\">passdb<br \/>\nbackend\u3000\u3053\u308c\u3082\u3088\u304f\u5206\u304b\u3089\u3093\u304b\u3089\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u305f\u3060\u3051<\/p>\n<p style=\"MARGIN-LEFT: 4em\">socket options = TCP_NODELAY<br \/>\n\u6614\u3053\u3046\u3060\u3063\u305f\u304d\u304c\u3057\u305f\u306e\u3067\u5909\u3048\u3066\u307f\u305f\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">netbios name = \u30b5\u30fc\u30d0\u30fc\u4e00\u89a7\u306b\u8f09\u308b\u3068\u304d\u306e\u540d\u524d<\/p>\n<p style=\"MARGIN-LEFT: 4em\">winbind separator = +\u3000FreeBSD\u3067\u306f\u3001\/\u306f\u3001<br \/>\n\u51e6\u7406\u304c\u5909\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3067\u3001+\u306bdomain\u3068\u30b0\u30eb\u30fc\u30d7\u3068\u500b\u4eba\u3092<\/p>\n<p style=\"MARGIN-LEFT: 4em\">\u5206\u3051\u308b\u969b\u306e\/\u3092+\u306b\u7f6e\u63db\u3059\u308b\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">winbind uid =<br \/>\n10000-12000\u3000winbind\u3067\u4f7f\u7528\u3059\u308b\u30e6\u30fc\u30b6\u30fcID\u300110000\u304b\u3089\u306f\u3058\u3081\u308b\u5834\u5408\u304c\u591a\u3044\u306e\u304b\u306a\uff1f<br \/>\n\u30ed\u30fc\u30ab\u30eb\u3068\u304b\u3076\u3089\u306a\u3051\u308c\u3070OK<\/p>\n<p style=\"MARGIN-LEFT: 4em\">winbind gid =<br \/>\n10000-12000\u3000winbind\u3067\u4f7f\u7528\u3059\u308b\u30b0\u30eb\u30fc\u30d7ID\u300110000\u304b\u3089\u306f\u3058\u3081\u308b\u5834\u5408\u304c\u591a\u3044\u3002<br \/>\n\u30ed\u30fc\u30ab\u30eb\u3068\u304b\u3076\u3089\u306a\u3051\u308c\u3070OK<\/p>\n<p style=\"MARGIN-LEFT: 4em\">ldap ssl =<br \/>\nno\u3000Samba3.3\u4ee5\u964d\u3067\u306f\u3053\u308c\u304c\u306a\u3044\u3068\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3068\u306e\u3053\u3068\u300cSoftware\u30c7\u30b6\u30a4\u30f3\u300d\u306b\u66f8\u3044\u3066\u3042\u3063\u305f\u3002<\/p>\n<p style=\"MARGIN-LEFT: 4em\">winbind use default domain =<br \/>\nyes\u3000\u3044\u3061\u3044\u3061\u30c9\u30e1\u30a4\u30f3\u304b\u3089\u8868\u793a\u3055\u308c\u305f\u308a\u6253\u3064\u306e\u304c\u9762\u5012\u306a\u305f\u3081\u77ed\u7e2e\u7528\u3002<\/p>\n<p>nsswitch.conf<\/p>\n<p style=\"MARGIN-LEFT: 4em\">group = files winbind<\/p>\n<p style=\"MARGIN-LEFT: 4em\">passwd = files winbind<\/p>\n<p style=\"MARGIN-LEFT: 4em\">\u3069\u3063\u3061\u3068\u3082\u610f\u5473\u304c\u3044\u307e\u3044\u3061\u5206\u304b\u3089\u3093\u3051\u3069\u3053\u3046\u3057\u308d\u3068\u66f8\u3044\u3066\u3042\u3063\u305f\u306e\u3067\u3057\u3066\u307f\u308b\u3002<\/p>\n<p>\uff13\uff0eAD\u3078\u306e\u53c2\u52a0\u300cnet join ads -U \u30e6\u30fc\u30b6\u30fc\u540d\u300d\u3067\u53c2\u52a0\u3002\u3053\u306e\u5730\u70b9\u3067AD\u4e0a\u306bPC\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\uff14\uff0eSamba\u3068Winbindd\u3092\u8d77\u52d5\u3057\u3001wbinfo\u3067\u3001\u30e6\u30fc\u30b6\u4e00\u89a7\u3084\u30b0\u30eb\u30fc\u30d7\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b\u304b\u8abf\u3079\u308b\u3002<\/p>\n<p>\uff15\uff0esmb.conf\u306bAD\u306e\u30e6\u30fc\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u9818\u57df\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u3002<\/p>\n<p>\u79c1\u306f\u3001\u7279\u306b\u8003\u3048\u305a\u306b<\/p>\n<p>Valid users\u3068force user\u3001force group\u3092\u4f7f\u7528\u3057\u3066\u5f37\u5236\u7684\u306b\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>force user\u3001force group\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u306e\u30e6\u30fc\u30b6\u30fc\u3068ID\u3067\u3044\u3044\u3068\u601d\u308f\u308c\u308b\u3002<\/p>\n<p>\u203bValid users\u3067\u30a2\u30af\u30bb\u30b9\u6a29\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u3060\u304c\u3001<\/p>\n<p>\u30fbAD\u4e0a\u306e\u30b0\u30eb\u30fc\u30d7\u306f\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u30b0\u30eb\u30fc\u30d7\u3067\u306a\u3044\u3068\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u30fb\u500b\u4eba-&gt;\u30b0\u30eb\u30fc\u30d7\uff11-&gt;\u30b0\u30eb\u30fc\u30d7\uff12\u3068\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3002\u30b0\u30eb\u30fc\u30d7\uff12\u3067\u30a2\u30af\u30bb\u30b9\u5b9a\u7fa9\u3057\u3066\u3042\u3063\u3066\u3082\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u3002<\/p>\n<p>\u30fb\u30b9\u30da\u30fc\u30b9\u3092\u542b\u3080\u30b0\u30eb\u30fc\u30d7\u3084\u30e6\u30fc\u30b6\u540d\u306e\u5834\u5408\u3002\u201d\uff08\u30c0\u30d6\u30eb\u30af\u30aa\u30c6\u30fc\u30b7\u30e7\u30f3\uff09\u3067\u56f2\u3080\u3002<\/p>\n<p>\u30fb2\u3064\u4ee5\u4e0a\u306e\u30b0\u30eb\u30fc\u30d7\u3084\u500b\u4eba\u3092\u5b9a\u7fa9\u3059\u308b\u5834\u5408\u306f\u3001,\uff08\u30b3\u30ed\u30f3\uff09\u3067\u5217\u6319\u3059\u308b\u3002<\/p>\n<p>\u30fb\u30b0\u30eb\u30fc\u30d7\u306e\u5834\u5408\u306f\u3001@\uff08\u30a2\u30c3\u30c8\u30de\u30fc\u30af\uff09\u3092\u524d\u306b\u3064\u3051\u308b\u3002<\/p>\n<p>\u3053\u308c\u3067\u4e00\u5fdc\u52d5\u3044\u3066\u3044\u308b\u304c\u307e\u3060\u554f\u984c\u306f\u5c71\u6e08\u307f\u3002<\/p>\n<p>\u30fb\u30ed\u30fc\u30ab\u30eb\u30e6\u30fc\u30b6\u304c\u4f5c\u6210\u3055\u308c\u306a\u3044\u3002<\/p>\n<p>\u30fb\u30ed\u30fc\u30ab\u30eb\u30b0\u30eb\u30fc\u30d7\u304c\u4f5c\u6210\u3055\u308c\u306a\u3044\u3002<\/p>\n<p>\u3053\u306e\uff12\u3064\u306f\u3001\u3082\u3057AD\u304c\u843d\u3061\u305f\u308a\u3057\u305f\u5834\u5408\u306b\u3001\u5358\u4f53\u3067\u306e\u904b\u7528\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u7684 \u30fbWindows\u3068Samba\u306e\u30e6\u30fc\u30b6\u5171\u6709 \u4ed5\u69d8 \u30fb\u30e6\u30fc\u30b6\u306e\u767b\u9332\u3001\u30b0\u30eb\u30fc\u30d7\u306e\u767b\u9332\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5909\u66f4\u306fWindows\uff08ActiveDirectory\uff09\u306e\u307f\u3067\u884c\u3046\u3002 \u30fbSamba\u30b5\u30fc\u30d0\u306f\u3001\u5c06\u6765\u306b\u308f\u305f\u3063\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u8907\u6570\u30b5\u30fc\u30d0\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002 \u624b\u9806 \uff11\uff0eSamba\u3092Winbind\u3067\u30e6\u30fc\u30b6\u30fc\u53c2\u7167\u3067&#8230;<br \/>\n <a href=\"https:\/\/lain.dnsalias.org\/~garry\/blog\/?p=2135\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-2135","post","type-post","status-publish","format-standard","hentry","category-pc","category-11"],"_links":{"self":[{"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2135"}],"version-history":[{"count":0,"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2135\/revisions"}],"wp:attachment":[{"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lain.dnsalias.org\/~garry\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}