{"id":967,"date":"2018-08-05T18:05:32","date_gmt":"2018-08-05T10:05:32","guid":{"rendered":"https:\/\/blog.freesilo.com\/?p=967"},"modified":"2018-08-05T18:06:43","modified_gmt":"2018-08-05T10:06:43","slug":"%e5%a6%82%e4%bd%95%e8%ae%a9samba-%e4%bd%bf%e7%94%a8smbv2-%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/freesilo.com\/?p=967","title":{"rendered":"\u5982\u4f55\u8ba9Samba \u4f7f\u7528SMBv2 \u7248\u672c"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/blog.freesilo.com\/wp-content\/uploads\/2018\/08\/f620ad01d75cc689e532488214c6f6b4.png\" alt=\"\" \/><\/p>\n<p>\u8fd1\u65e5\u6765\u56e0\u4e3a<a href=\"https:\/\/zh.wikipedia.org\/wiki\/WannaCry\" target=\"_blank\" rel=\"noopener\">WannaCry<\/a>\u52d2\u7d22\u75c5\u6bd2\u7684\u5173\u7cfb\uff0c\u5927\u5bb6\u5f00\u59cb\u5bf9\u4e8e<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E4%BC%BA%E6%9C%8D%E5%99%A8%E8%A8%8A%E6%81%AF%E5%8D%80%E5%A1%8A\" target=\"_blank\" rel=\"noopener\">SMB<\/a>\u8fd9\u540d\u8bcd\u975e\u5e38\u7684\u6709\u5174\u8da3\uff0cSMB\u4e3a<code>Server Message Block<\/code>\u7684\u7f29\u5199\uff0c\u76ee\u7684\u662f\u5bf9\u4e8e\u673a\u5668\u4e0e\u673a\u5668\u4e4b\u95f4\u53ef\u4ee5\u6863\u6848\u4e0e\u5217\u5370\u7684\u5206\u4eab\uff0c\u5176\u4e2d\u5b83\u7684\u6f14\u8fdb\u6709\u8bb8\u591a\u7684\u7248\u672c\uff0c\u8fd9\u6b21\u4f1a\u7206\u53d1\u7684\u4e3b\u56e0\u662f\u5fae\u8f6fWindows\u4f5c\u4e1a\u7cfb\u7edf\u666e\u904d\u7684\u4f7f\u7528\u8fd9\u4e2a\u901a\u8baf\u683c\u5f0f\u8fdb\u884c\u4ea4\u6362\uff0c\u4f46\u5728\u5b9e\u4f5c\u9a71\u52a8\u8fc7\u7a0b\u4e2d\u56e0\u4e3a\u8bbe\u8ba1\u4e0a\u9020\u6210\u6f0f\u6d1e\uff0c\u800c\u8fd9\u6f0f\u6d1e\u53c8\u56e0\u4e3a\u8bb8\u591a\u539f\u56e0\u88ab\u6709\u5fc3\u4eba\u4e8b\u53d6\u5f97\u5e76\u4f7f\u7528\uff0c\u9020\u6210\u6f0f\u6d1e\u4e3a\u4ec0\u4e48\u73b0\u5728\u624d\u4f1a\u88ab\u4fee\u8865\u4e0a\uff0c\u8fde\u5fae\u8f6f\u90fd\u7834\u4f8b\u66ff\u539f\u672c\u4e0d\u518d\u652f\u63f4\u7684<code>Windows XP<\/code>\u5236\u4f5c\u4fee\u8865\u7a0b\u5f0f\u5c31\u77e5\u9053\u5e02\u573a\u65b9\u9762\uff0c<code>Windows XP<\/code>\u8fd8\u6709\u5b58\u5728\u7684\u5fc5\u8981\uff0c\u5728\u8fd9\u8981\u5efa\u8baeWindows\u4f7f\u7528\u8005\u5c3d\u5feb\u5347\u7ea7\u81f3\u6709\u652f\u63f4\u7cfb\u7edf\u66f4\u65b0\u7ef4\u62a4\u7684\u7248\u672c.<\/p>\n<p>\u6b64\u7bc7\u76ee\u7684\u8981\u5c06Samba\u91cd\u65b0\u8bbe\u5b9a\u5176SMB\u4f7f\u7528\u7684\u7248\u672c\uff0c\u9996\u5148\u5728\u4f60\u5df2\u7ecf\u4f7f\u7528Samba\u7684\u4e3b\u673a\u4e2d\u7bc7\u8f91\u8bbe\u5b9a\u6863\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662fnano\u7f16\u8f91\u5668\uff1a<\/p>\n<pre>    nano \/etc\/samba\/smb.conf\r\n\r\n\r\n<\/pre>\n<p>\u5728<code>[Global]<\/code>\u533a\u6bb5\u4e0a\u65b0\u589e\u6700\u5c0f\u652f\u63f4\u7684SMB\u7248\u672c<\/p>\n<pre>[global]\r\n:\r\n:\r\n<span style=\"color: #ff0000;\">min protocol = SMB2\r\n\r\n\r\n<\/span><\/pre>\n<p>\u4fee\u6539\u540e\u5e76\u50a8\u5b58\u6863\u6848\uff0c\u91cd\u65b0\u5f00\u542fSamba\u670d\u52a1\uff0c\u76ee\u524d\u7684Linux\u5168\u9762\u6539\u7528<a href=\"https:\/\/zh.wikipedia.org\/wiki\/Systemd\" target=\"_blank\" rel=\"noopener\">Systemd<\/a>\u7ba1\u7406\u7a0b\u5f0f\uff0c\u4ee5\u5b83\u4e3a\u4f8b\u5b50\uff1a<\/p>\n<pre>    systemctl restart smbd.service\r\n\r\n\r\n<\/pre>\n<p>\u6216\u6709\u4e9bLinux\u5206\u652f\u4f7f\u7528\uff1a<\/p>\n<pre>    systemctl restart smb.service\r\n\r\n\r\n<\/pre>\n<p>\u5982\u6b64\u4e00\u6765\u4f60\u4f7f\u7528\u7684Samba\u5c31\u6539\u7528SMB2\uff0c\u81f3\u4e8e\u76ee\u524d\u4f7f\u7528SMB\u5404\u7248\u672c\u7684Windows\u4f5c\u4e1a\u7cfb\u7edf\u5217\u8868\uff1a<\/p>\n<ul>\n<li>CIFS \u2013 The ancient version of SMB that was part of Microsoft Windows NT 4.0 in 1996. SMB1 supersedes this version.<\/li>\n<li>SMB 1.0 (or SMB1) \u2013 The version used in Windows 2000, Windows XP, Windows Server 2003 and Windows Server 2003 R2<\/li>\n<li>SMB 2.0 (or SMB2) \u2013 The version used in Windows Vista (SP1 or later) and Windows Server 2008<\/li>\n<li>SMB 2.1 (or SMB2.1) \u2013 The version used in Windows 7 and Windows Server 2008 R2<\/li>\n<li>SMB 3.0 (or SMB3) \u2013 The version used in Windows 8 and Windows Server 2012<\/li>\n<li>SMB 3.02 (or SMB3) \u2013 The version used in Windows 8.1 and Windows Server 2012 R2<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u8d44\u8baf\u662f\u4ece\u5fae\u8f6f\u7f51\u7ad9\u6240\u53d6\u5f97\uff0c<a href=\"https:\/\/blogs.technet.microsoft.com\/josebda\/2013\/10\/02\/windows-server-2012-r2-which-version-of-the-smb-protocol-smb-1-0-smb-2-0-smb-2-1-smb-3-0-or-smb-3-02-are-you-using\/\" target=\"_blank\" rel=\"noopener\">\u4f20\u9001\u95e8<\/a>\u5728\u6b64\u3002<\/p>\n<h2>\u53c2\u8003\u8d44\u6599<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.samba.org\/samba\/docs\/man\/manpages-3\/smb.conf.5.html\" target=\"_blank\" rel=\"noopener\">smb.conf<\/a><\/li>\n<\/ul>\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/cms.35g.tw\/coding\/%E5%A6%82%E4%BD%95%E8%AE%93-samba-%E4%BD%BF%E7%94%A8-smbv2-%E7%89%88%E6%9C%AC\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd1\u65e5\u6765\u56e0\u4e3aWannaCry\u52d2\u7d22\u75c5\u6bd2\u7684\u5173\u7cfb\uff0c\u5927\u5bb6\u5f00\u59cb\u5bf9\u4e8eSMB\u8fd9\u540d\u8bcd\u975e\u5e38\u7684\u6709\u5174\u8da3\uff0c&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/freesilo.com\/?p=967\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,23],"tags":[],"class_list":["post-967","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry"],"_links":{"self":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=967"}],"version-history":[{"count":2,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/967\/revisions"}],"predecessor-version":[{"id":970,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/967\/revisions\/970"}],"wp:attachment":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}