{"id":22519,"date":"2025-04-19T06:07:32","date_gmt":"2025-04-18T22:07:32","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22519.html"},"modified":"2025-04-19T06:07:32","modified_gmt":"2025-04-18T22:07:32","slug":"%e3%80%90linux%e7%b3%bb%e5%88%97%e3%80%91centos-9-%e4%b9%8bsamba%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%ae%80%e5%8d%95%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22519.html","title":{"rendered":"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u524d\u8a00<\/li>\n<li>\u4e00\u3001\u5b9e\u9a8c\u73af\u5883<\/li>\n<li>\u4e8c\u3001\u5b9e\u9a8c\u5185\u5bb9<\/li>\n<li>\n<ul>\n<li>&#xff08;\u4e00&#xff09;\u5b89\u88c5Samba\u670d\u52a1\u5668<\/li>\n<li>&#xff08;\u4e8c&#xff09;Samba\u670d\u52a1\u5668\u7684\u914d\u7f6e\u6587\u4ef6<\/li>\n<li>\n<ul>\n<li>1. Samba\u670d\u52a1\u7ba1\u7406<\/li>\n<li>2. \u8bbf\u95ee\u672c\u7528\u6237\u4e3b\u76ee\u5f55<\/li>\n<li>3. \u8bbf\u95ee\u6307\u5b9a\u76ee\u5f55<\/li>\n<\/ul>\n<\/li>\n<li>&#xff08;\u4e09&#xff09;Linux\u4e0bSamba\u5ba2\u6237\u7aef\u7684\u4f7f\u7528<\/li>\n<li>\n<ul>\n<li>1.\u5728Win7\u4e2d&#xff0c;\u5171\u4eab\u4e00\u4e2a\u76ee\u5f55&#xff0c;\u5c06\u5176\u5171\u4eab\u7ed9Everyone\u7ec4\u7528\u6237&#xff0c;\u8be5\u76ee\u5f55\u4e0b\u4efb\u610f\u521b\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u3002<\/li>\n<li>2.\u5173\u6389Win7\u81ea\u5e26\u7684\u7f51\u7edc\u9632\u706b\u5899\u4ee5\u53ca\u5176\u4ed6\u7f51\u7edc\u7c7b\u7684\u9632\u706b\u5899&#xff0c;\u5e76\u4e14\u628a\u201c\u7b80\u5355\u6587\u4ef6\u5171\u4eab\u9009\u9879\u5173\u6389\u201d&#xff08;WinXP&#xff09;&#xff0c;\u8fd8\u53ef\u4ee5\u70b9\u51fb\u201c\u6743\u9650\u201d\u6309\u94ae\u8fdb\u884c\u6743\u9650\u8bbe\u7f6e\u3002<\/li>\n<li>3.\u5728\u63a7\u5236\u9762\u677f\u7684\u7528\u6237\u5e10\u6237\u9009\u9879\u5904\u542f\u7528\u6765\u5bbe&#xff08;Guest&#xff09;\u5e10\u6237<\/li>\n<li>4.\u914d\u7f6e\u7b56\u7565<\/li>\n<li>5.\u4f7f\u7528smbclient\u8bbf\u95ee<\/li>\n<li>6. \u5229\u7528mount\u547d\u4ee4\u5c06\u5171\u4eab\u8d44\u6e90\u52a0\u8f7d\u5230\u672c\u673a<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u603b\u7ed3<\/li>\n<\/ul>\n<hr \/>\n<h2>\u524d\u8a00<\/h2>\n<p>\u672c\u6b21\u5b9e\u9a8c\u4e3b\u8981\u662f\u914d\u7f6e\u548c\u4f7f\u7528 Samba \u670d\u52a1\u5668&#xff0c;\u5b66\u4e60\u5982\u4f55\u5171\u4eab Linux \u7cfb\u7edf\u4e0a\u7684\u6587\u4ef6&#xff0c;\u5e76\u901a\u8fc7 Windows \u5ba2\u6237\u7aef\u4ee5\u53ca Linux \u5ba2\u6237\u7aef\u8bbf\u95ee\u8fd9\u4e9b\u5171\u4eab\u6587\u4ef6\u3002\u540c\u65f6&#xff0c;\u5b9e\u9a8c\u8fd8\u6db5\u76d6\u4e86\u5982\u4f55\u4f7f\u7528 smbclient \u548c mount \u547d\u4ee4\u6765\u8bbf\u95ee\u548c\u6302\u8f7d Samba \u5171\u4eab\u7684\u76ee\u5f55&#xff0c;\u8fdb\u4e00\u6b65\u638c\u63e1\u7f51\u7edc\u6587\u4ef6\u5171\u4eab\u7684\u57fa\u672c\u64cd\u4f5c\u3002<\/p>\n<p>\u672c\u7bc7\u6587\u7ae0\u7b80\u5355\u8bb0\u5f55Samba\u670d\u52a1\u5668\u7684\u5165\u95e8\u914d\u7f6e&#xff0c;\u4e0d\u505a\u5b89\u5168\u65b9\u9762\u7684\u9632\u5fa1&#xff0c;\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003&#xff0c;\u8bf7\u52ff\u76f4\u63a5\u4f7f\u7528\u5728\u751f\u4ea7\u529b\u73af\u5883\u3002<\/p>\n<hr \/>\n<h2>\u4e00\u3001\u5b9e\u9a8c\u73af\u5883<\/h2>\n<p>\u672c\u5b9e\u9a8c\u5728VMWare\u865a\u62df\u673a\u8f6f\u4ef6\u4e0a\u8fdb\u884c&#xff0c;\u5b89\u88c5\u7684Linux\u7cfb\u7edf\u4e3aCentOS 9&#xff0c;\u5bbf\u4e3b\u673a\u4e3aWindows 11\u3002<\/p>\n<p>CentOS \u7f51\u7edc\u91c7\u7528NAT\u6a21\u5f0f<\/p>\n<h2>\u4e8c\u3001\u5b9e\u9a8c\u5185\u5bb9<\/h2>\n<h3>&#xff08;\u4e00&#xff09;\u5b89\u88c5Samba\u670d\u52a1\u5668<\/h3>\n<p>\u901a\u8fc7yum install samba\u6765\u5b89\u88c5\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220726-6802cd1e53e0a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>&#xff08;\u4e8c&#xff09;Samba\u670d\u52a1\u5668\u7684\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u8fdb\u884csamba\u670d\u52a1\u5668\u7684\u914d\u7f6e\u3002\u8fc7\u7a0b\u5982\u4e0b&#xff1a;<\/p>\n<h4>1. Samba\u670d\u52a1\u7ba1\u7406<\/h4>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b Samba \u5b88\u62a4\u8fdb\u7a0b\u7684\u72b6\u6001&#xff1a; systemctl status smb <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220726-6802cd1ed703e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u505c\u6b62\u5b88\u62a4\u8fdb\u7a0b&#xff0c;\u5373\u505c\u6b62Samba\u670d\u52a1&#xff1a; systemctl stop smb \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8\u5b88\u62a4\u8fdb\u7a0b&#xff1a; systemctl start smb \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u91cd\u542f\u5b88\u62a4\u8fdb\u7a0b&#xff1a; systemctl restart smb<\/p>\n<h4>2. \u8bbf\u95ee\u672c\u7528\u6237\u4e3b\u76ee\u5f55<\/h4>\n<p>&#xff08;1&#xff09;\u6307\u5b9a\u7528\u6237\u914d\u7f6eSamba\u5171\u4eab&#xff0c;\u521b\u5efa\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8eSMB\u8fde\u63a5\u7684\u8d26\u6237guest&#xff08;\u5982\u679c\u5df2\u5b58\u5728\u5219\u8df3\u8fc7\u6b64\u6b65&#xff09;&#xff1a;<\/p>\n<p>sudo useradd guest <span class=\"token comment\">\/\/\u6dfb\u52a0\u7528\u6237guest<\/span><br \/>\nsudo passwd guest <span class=\"token comment\">\/\/\u8bbe\u5b9a\u7528\u6237\u5bc6\u7801\u4e3aqetuowryip<\/span><\/p>\n<p>\u63a5\u4e0b\u6765\u521b\u5efaguest\u7684Samba\u8d26\u53f7&#xff0c;\u8bbe\u7f6e\u5bc6\u7801\u4e3aasdfghjkl<\/p>\n<p>smbpasswd <span class=\"token operator\">&#8211;<\/span>a guest<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220727-6802cd1f154ed.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4fee\u6539\/etc\/samba\/smb.conf\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>vim <span class=\"token operator\">\/<\/span>etc<span class=\"token operator\">\/<\/span>samba<span class=\"token operator\">\/<\/span>smb<span class=\"token punctuation\">.<\/span>conf<\/p>\n<p>\u5728[global]\u6807\u7b7e\u4e0b\u914d\u7f6eworkgroup\u3001netbios\u3001server string\u3001interfaces\u3001hosts allow\u3001max protocol\u3001min protocol\u3001ntlm auth\u7b49\u5c5e\u6027&#xff0c;\u5e76\u4e14\u628a[homes]\u6807\u7b7e\u4e0b\u7684browseable\u5c5e\u6027\u7684\u503c\u6539\u6210Yes\u3002<\/p>\n<p>\u5148\u8fdb\u884c\u6b65\u9aa4\u63cf\u8ff0&#xff0c;\u540e\u5bf9\u8bbe\u7f6e\u7684\u53c2\u6570\u8fdb\u884c\u89e3\u6790&#xff1a;<\/p>\n<p>\u9996\u5148\u67e5\u8be2\u5bbf\u4e3b\u673a\u7684\u5de5\u4f5c\u7ec4&#xff0c;\u53f3\u51fb\u3010\u8ba1\u7b97\u673a\u3011-&gt;\u3010\u5c5e\u6027\u3011&#xff0c;\u5728\u7cfb\u7edf\u4fe1\u606f\u4e2d\u70b9\u51fb\u3010\u57df\u6216\u5de5\u4f5c\u7ec4\u3011&#xff0c; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220727-6802cd1f31272.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5f39\u51fa\u3010\u7cfb\u7edf\u5c5e\u6027\u3011\u5bf9\u8bdd\u6846&#xff0c;\u53ef\u4ee5\u67e5\u8be2\u5230\u5de5\u4f5c\u7ec4&#xff0c;\u5c06Samba\u914d\u7f6e\u6587\u4ef6\u7684workgroup\u8bbe\u7f6e\u4e3aWORKGROUP <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220727-6802cd1f8d1c3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5176\u5b9e\u5728CentOS\u4e2d\u67e5\u8be2IP\u5730\u5740&#xff0c;\u4f7f\u7528ifconfig&#xff0c;\u8bb0\u4e0b\u5173\u952e\u53c2\u6570ens160\u4e3a\u7f51\u5361\u540d\u79f0&#xff0c;IP\u5730\u5740192.168.5.130\u548c\u5b50\u7f51\u63a9\u7801255.255.255.0\u5bf9\u5e94\u7684\u662f24\u4f4d\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220727-6802cd1fb6159.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5982\u56fe\u8bbe\u7f6e\u5b8c\u6210\u8fd9\u6837\u7684&#xff0c;\u63a5\u4e0b\u6765\u5bf9\u5404\u53c2\u6570\u8fdb\u884c\u89e3\u6790&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220727-6802cd1fed7a9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u53c2\u6570\u8bf4\u660e\u4e3e\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>netbios name<\/td>\n<td>\u8bbe\u7f6eSamba\u7684NetBIOS\u540d\u79f0<\/td>\n<td>netbios name &#061; mysmb<\/td>\n<\/tr>\n<tr>\n<td>workgroup<\/td>\n<td>\u8bbe\u7f6eSamba\u8981\u52a0\u5165\u7684\u5de5\u4f5c\u7ec4<\/td>\n<td>workgroup &#061; WORKGROUP<\/td>\n<\/tr>\n<tr>\n<td>server string<\/td>\n<td>\u6307\u4ee4\u6d4f\u89c8\u8868\u91cc\u7684\u673a\u5668\u63cf\u8ff0<\/td>\n<td>server string &#061; Sambe Server<\/td>\n<\/tr>\n<tr>\n<td>security<\/td>\n<td>\u5b9a\u4e49Samba\u7684\u5b89\u5168\u7ea7\u522b<\/td>\n<td>security &#061; User<\/td>\n<\/tr>\n<tr>\n<td>hosts allow<\/td>\n<td>\u6307\u5b9a\u53ef\u4ee5\u8bbf\u95eeSamba\u7684\u4e3b\u673a&#xff0c;\u540c\u7406\u8fd8\u6709hosts deny&#xff0c;\u4e3e\u4f8b\u4e2d\u5141\u8bb8192.168.1.X\u7684\u4e3b\u673a\u8bbf\u95eeSamba<\/td>\n<td>hosts allow &#061; 192.168.1.<\/td>\n<\/tr>\n<tr>\n<td>interfaces<\/td>\n<td>\u8bbe\u7f6eSamba\u670d\u52a1\u5668\u6240\u4f7f\u7528\u7684\u7f51\u5361<\/td>\n<td>interfaces &#061; lo ens33 192.168.1.2\/24<\/td>\n<\/tr>\n<tr>\n<td>client code page<\/td>\n<td>\u4f7f\u5f97\u5ba2\u6237\u53ef\u4ee5\u652f\u6301\u7b80\u4f53\u4e2d\u6587\u7684\u5171\u4eab\u540d&#xff0c;\u5728\u65b0\u7248\u7684Samba\u4e2d\u65e0\u9700\u624b\u52a8\u8bbe\u7f6e<\/td>\n<td>client code page &#061; 936<\/td>\n<\/tr>\n<tr>\n<td>max protocol<\/td>\n<td>\u670d\u52a1\u7aef\u6700\u9ad8\u534f\u8bae<\/td>\n<td>max protocol &#061; SMB3<\/td>\n<\/tr>\n<tr>\n<td>min protocol<\/td>\n<td>\u670d\u52a1\u7aef\u6700\u4f4e\u534f\u8bae<\/td>\n<td>min protocol &#061; NT1<\/td>\n<\/tr>\n<tr>\n<td>client max protocol<\/td>\n<td>\u5ba2\u6237\u7aef\u6700\u9ad8\u534f\u8bae<\/td>\n<td>client max protocol &#061; SMB3<\/td>\n<\/tr>\n<tr>\n<td>client min protocol<\/td>\n<td>\u5ba2\u6237\u7aef\u6700\u4f4e\u534f\u8bae<\/td>\n<td>client min protocol &#061; CORE<\/td>\n<\/tr>\n<tr>\n<td>ntlm auth<\/td>\n<td>\u4fee\u6539\u767b\u9646\u9a8c\u8bc1\u65b9\u5f0f&#xff0c;\u652f\u6301WinXP<\/td>\n<td>ntlm auth &#061; Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9644\u4e0aSamba\u534f\u8bae\u7248\u672c\u8bbe\u7f6e<\/p>\n<table>\n<tr>\u534f\u8bae\u7b80\u79f0\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>CORE<\/td>\n<td>\u6700\u65e9\u7684\u534f\u8bae&#xff0c;\u4e0d\u652f\u6301\u7528\u6237\u540d<\/td>\n<\/tr>\n<tr>\n<td>COREPLUS<\/td>\n<td>\u6bd4CORE\u6709\u5c11\u91cf\u4f18\u5316<\/td>\n<\/tr>\n<tr>\n<td>LANMAN1<\/td>\n<td>\u6700\u65e9\u652f\u6301\u957f\u6587\u4ef6\u540d\u7684\u534f\u8bae<\/td>\n<\/tr>\n<tr>\n<td>LANMAN2<\/td>\n<td>LANMAN1\u7684\u5347\u7ea7\u7248<\/td>\n<\/tr>\n<tr>\n<td>NT1<\/td>\n<td>SMB\u7684\u7b2c\u4e00\u4ee3\u7248\u672c&#xff0c;\u652f\u6301Windows 98\/XP<\/td>\n<\/tr>\n<tr>\n<td>SMB2<\/td>\n<td>\u652f\u6301Windows Vista\/Windows 7<\/td>\n<\/tr>\n<tr>\n<td>SMB3<\/td>\n<td>\u652f\u6301Windows 8\u4ee5\u540e\u7248\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u68c0\u6d4bSamba\u914d\u7f6e\u6587\u4ef6\u7684\u6b63\u786e\u6027&#xff1a; # testparm&#xff0c;\u6700\u540e\u91cd\u542fsmb\u670d\u52a1\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd2021424.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd2055ac5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> &#xff08;2&#xff09;\u5728\u7528\u6237\u4e3b\u76ee\u5f55\u4e0b\u521b\u5efa\u6d4b\u8bd5\u6587\u4ef6&#xff1a; \u5207\u6362\u5de5\u4f5c\u76ee\u5f55\u81f3\u7528\u6237\u76ee\u5f55&#xff1a; cd \/home\/guest <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd206ec6e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4f7f\u7528cat\u547d\u4ee4\u521b\u5efa\u5e76\u5199\u5165\u6587\u4ef6test.txt&#xff1a;cat &gt; test.txt &#xff0c;\u8f93\u5165\u7ed3\u675f\u540e\u8f93\u5165Ctrl&#043;D\u7ed3\u675f&#xff0c;\u6216\u8005\u7528vi\u5de5\u5177\u3001gedit\u5de5\u5177\u7b49\u7f16\u8f91\u597d\u5e76\u4efb\u610f\u8f93\u5165\u5185\u5bb9\u4e5f\u53ef\u4ee5\u3002 \u8f93\u5165\u5b8c\u6210\u540e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9: cat test.txt <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd2087ff9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> &#xff08;3&#xff09;\u5728\u5bbf\u4e3b\u673a\u4e2d\u8bbf\u95ee\u8be5Samba\u670d\u52a1\u5668&#xff0c;\u7528\u6237\u4e3aguest&#xff0c;\u5bc6\u7801\u4e3a\u521a\u624d\u521b\u5efa\u7684samba\u5bc6\u7801&#xff08;\u6ce8\u610f&#xff1a;\u4e0d\u662f\u7528\u6237\u767b\u9646\u5bc6\u7801&#xff09;\u3002\u8bbf\u95ee\u6210\u529f\u540e\u6253\u5f00test.txt\u6587\u4ef6\u3002<\/p>\n<p>\u9996\u5148\u8981\u914d\u7f6e\u9632\u706b\u5899\u5141\u8bb8Samba\u670d\u52a1\u901a\u8fc7\u9632\u706b\u5899&#xff0c;\u8bbe\u7f6e\u5b8c\u540e\u91cd\u542f\u9632\u706b\u5899<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4&#xff1a;<\/p>\n<p>firewall<span class=\"token operator\">&#8211;<\/span>cmd <span class=\"token operator\">&#8212;<\/span>add<span class=\"token operator\">&#8211;<\/span>service<span class=\"token operator\">&#061;<\/span>samba <span class=\"token operator\">&#8212;<\/span>permanent<br \/>\nfirewall<span class=\"token operator\">&#8211;<\/span>cmd <span class=\"token operator\">&#8212;<\/span>reload<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd20a4df5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6216\u8005\u53ef\u4ee5\u4e34\u65f6\u5173\u95ed\u9632\u706b\u5899&#xff1a;systemctl stop firewalld<\/p>\n<p>\u63a5\u4e0b\u6765\u5728\u5bbf\u4e3b\u673a\u4e2d\u8f93\u5165Win&#043;R\u6253\u5f00\u8fd0\u884c\u6846&#xff0c;\u8f93\u5165Samba\u670d\u52a1\u5668\u7684\u5730\u5740&#xff08;CentOS 9\u7684IP\u5730\u5740&#xff09;&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd20c6e6a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u8f93\u5165\u5bf9\u5e94\u7684\u8d26\u53f7\u5bc6\u7801<\/p>\n<p>\u6ce8\u610f\u662fSamba\u5bc6\u7801&#xff0c;\u4e0d\u662f\u8d26\u6237\u672c\u8eab\u7684\u5bc6\u7801<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220728-6802cd20e5d7a.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6b64\u65f6\u8bbf\u95ee\u53ef\u80fd\u4f1a\u51fa\u73b0\u65e0\u6cd5\u8bbf\u95ee\u7684\u60c5\u51b5&#xff0c;\u5982\u679c\u6ca1\u6709\u51fa\u73b0\u76f4\u63a5\u8df3\u8fc7\u5373\u53ef\u3002 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220729-6802cd2117c7f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5f15\u5165SELinux\u7684\u6982\u5ff5 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SELinux&#xff08;Security-Enhanced Linux&#xff09;\u662f\u7531\u7f8e\u56fd\u56fd\u5bb6\u5b89\u5168\u5c40&#xff08;NSA&#xff09;\u5f00\u53d1\u7684 Linux \u5b89\u5168\u6a21\u5757&#xff0c;\u65e8\u5728\u901a\u8fc7\u5f3a\u5236\u8bbf\u95ee\u63a7\u5236&#xff08;MAC&#xff09;\u6765\u589e\u5f3a\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002\u5b83\u901a\u8fc7\u4f7f\u7528\u4e00\u5957\u7b56\u7565\u6765\u9650\u5236\u548c\u63a7\u5236\u7a0b\u5e8f\u548c\u7528\u6237\u80fd\u591f\u8bbf\u95ee\u7684\u8d44\u6e90&#xff08;\u5982\u6587\u4ef6\u3001\u7aef\u53e3\u3001\u7f51\u7edc\u7b49&#xff09;\u3002SELinux \u901a\u8fc7\u9650\u5236\u8fdb\u7a0b\u548c\u6587\u4ef6\u4e4b\u95f4\u7684\u4ea4\u4e92&#xff0c;\u9632\u6b62\u6f5c\u5728\u7684\u6f0f\u6d1e\u6216\u4e0d\u5f53\u884c\u4e3a\u6269\u5927\u5316&#xff0c;\u4ece\u800c\u63d0\u9ad8\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5f53 SELinux \u542f\u7528\u65f6&#xff0c;\u9ed8\u8ba4\u4f1a\u6709\u5f88\u591a\u4e25\u683c\u7684\u8bbf\u95ee\u63a7\u5236\u89c4\u5219&#xff0c;\u786e\u4fdd\u53ea\u6709\u5177\u6709\u9002\u5f53\u6743\u9650\u7684\u8fdb\u7a0b\u53ef\u4ee5\u8bbf\u95ee\u7279\u5b9a\u8d44\u6e90\u3002\u5982\u679c Samba \u6ca1\u6709\u9002\u5f53\u7684 SELinux \u4e0a\u4e0b\u6587&#xff0c;\u5b83\u53ef\u80fd\u4f1a\u88ab\u7981\u6b62\u8bbf\u95ee\u5171\u4eab\u6587\u4ef6\u5939&#xff0c;\u5373\u4f7f\u7cfb\u7edf\u672c\u8eab\u5141\u8bb8\u8bbf\u95ee\u8be5\u76ee\u5f55\u3002<\/p>\n<p>\u6211\u4eec\u53ea\u9700\u8981\u4e34\u65f6\u7981\u7528 SELinux \u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u786e\u8ba4\u662f\u5426\u662f SELinux \u5bfc\u81f4\u7684\u95ee\u9898\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06 SELinux \u8bbe\u7f6e\u4e3a\u5bbd\u677e\u6a21\u5f0f&#xff08;permissive&#xff09;&#xff0c;\u5b83\u4e0d\u4f1a\u963b\u6b62\u64cd\u4f5c&#xff0c;\u53ea\u4f1a\u8bb0\u5f55\u8b66\u544a&#xff1a;sudo setenforce 0 <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220729-6802cd21a2401.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6b64\u65f6\u91cd\u65b0\u5efa\u7acb\u8fde\u63a5&#xff0c;\u5c1d\u8bd5\u8bbf\u95ee\u5373\u53ef\u6210\u529f <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220729-6802cd21bba64.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>3. \u8bbf\u95ee\u6307\u5b9a\u76ee\u5f55<\/h4>\n<p>\u4fee\u6539\/etc\/samba\/smb.conf\u6587\u4ef6&#xff0c;\u5728\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9&#xff1a; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220730-6802cd22499e8.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u53c2\u6570\u6ce8\u91ca<\/tr>\n<tbody>\n<tr>\n<td>[xyz]<\/td>\n<td>\u7528\u6237\u4e2a\u4eba\u7684\u4e3b\u76ee\u5f55\u8bbe\u7f6e\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>comment &#061; var dir<\/td>\n<td>\u4e3b\u76ee\u5f55\u6ce8\u91ca<\/td>\n<\/tr>\n<tr>\n<td>browseable &#061; no<\/td>\n<td>\u662f\u5426\u5bb9\u8bb8\u5176\u4ed6\u7528\u6237\u6d4f\u89c8\u4e2a\u4eba\u4e3b\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td>writable &#061; yes<\/td>\n<td>\u662f\u5426\u5bb9\u8bb8\u5199\u5165\u4e2a\u4eba\u76ee\u5f55<\/td>\n<\/tr>\n<tr>\n<td>valid users &#061; %S<\/td>\n<td>\u5bb9\u8bb8\u767b\u9646\u7684\u7528\u6237&#xff0c;%S\u8868\u793a\u5f53\u524d\u767b\u9646\u7684\u7528\u6237<\/td>\n<\/tr>\n<tr>\n<td>create mode &#061; 0664<\/td>\n<td>\u65b0\u5efa\u6587\u4ef6\u7684\u9ed8\u8ba4\u6743\u9650(\u6587\u4ef6\u7684\u6240\u6709\u8005\u548c\u540c\u7ec4\u7528\u6237\u53ef\u4ee5\u7f16\u8f91\u6587\u4ef6&#xff0c;\u800c\u5176\u4ed6\u7528\u6237\u53ea\u80fd\u8bfb\u53d6\u6587\u4ef6&#xff0c;\u4f46\u4e0d\u80fd\u4fee\u6539\u6216\u6267\u884c)<\/td>\n<\/tr>\n<tr>\n<td>directory mode &#061; 0775<\/td>\n<td>\u65b0\u5efa\u76ee\u5f55\u7684\u9ed8\u8ba4\u6743\u9650(\u9002\u7528\u4e8e\u6587\u4ef6\u5939\u5171\u4eab&#xff0c;\u5728\u5141\u8bb8\u7ec4\u5185\u6210\u5458\u5bf9\u6587\u4ef6\u5939\u6709\u5b8c\u5168\u63a7\u5236\u6743\u7684\u540c\u65f6&#xff0c;\u9650\u5236\u5916\u90e8\u7528\u6237\u53ea\u80fd\u8bfb\u53d6\u6216\u6267\u884c\u5176\u4e2d\u7684\u6587\u4ef6\u3002)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u68c0\u6d4bSamba\u914d\u7f6e\u6587\u4ef6\u7684\u6b63\u786e\u6027&#xff1a; testparm&#xff0c;\u7136\u540e\u91cd\u542fsmb\u670d\u52a1\u3002<\/p>\n<p>\u91cd\u65b0\u5efa\u7acb\u8fde\u63a5\u53ef\u4ee5\u53d1\u73b0\u5728\u76ee\u5f55\u4e0b\u591a\u4e86\u4e00\u4e2a\u6587\u4ef6\u5939xyz&#xff0c;\u5e76\u4e14\u5c06\u9f20\u6807\u60ac\u6d6e\u4f1a\u663e\u793a\u6587\u5b57var dir&#xff0c;\u53cc\u51fb\u6253\u5f00xyz <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220730-6802cd226643f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6253\u5f00log\u76ee\u5f55\u4e0b\u7684\u4efb\u610f\u4e00\u4e2a\u65e5\u5fd7\u6587\u4ef6&#xff08;\u540e\u7f00\u4e3a.log&#xff09; <img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220730-6802cd22982f9.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h3>&#xff08;\u4e09&#xff09;Linux\u4e0bSamba\u5ba2\u6237\u7aef\u7684\u4f7f\u7528<\/h3>\n<h4>1.\u5728Win7\u4e2d&#xff0c;\u5171\u4eab\u4e00\u4e2a\u76ee\u5f55&#xff0c;\u5c06\u5176\u5171\u4eab\u7ed9Everyone\u7ec4\u7528\u6237&#xff0c;\u8be5\u76ee\u5f55\u4e0b\u4efb\u610f\u521b\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u3002<\/h4>\n<p><img decoding=\"async\" src=\"2025-04-19hpsrzirxmfp.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2025-04-1904yqnjofdrx.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>2.\u5173\u6389Win7\u81ea\u5e26\u7684\u7f51\u7edc\u9632\u706b\u5899\u4ee5\u53ca\u5176\u4ed6\u7f51\u7edc\u7c7b\u7684\u9632\u706b\u5899&#xff0c;\u5e76\u4e14\u628a\u201c\u7b80\u5355\u6587\u4ef6\u5171\u4eab\u9009\u9879\u5173\u6389\u201d&#xff08;WinXP&#xff09;&#xff0c;\u8fd8\u53ef\u4ee5\u70b9\u51fb\u201c\u6743\u9650\u201d\u6309\u94ae\u8fdb\u884c\u6743\u9650\u8bbe\u7f6e\u3002<\/h4>\n<p><img decoding=\"async\" src=\"2025-04-19znh24k10rqu.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>3.\u5728\u63a7\u5236\u9762\u677f\u7684\u7528\u6237\u5e10\u6237\u9009\u9879\u5904\u542f\u7528\u6765\u5bbe&#xff08;Guest&#xff09;\u5e10\u6237<\/h4>\n<p><img decoding=\"async\" src=\"2025-04-1901gniefboht.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>4.\u914d\u7f6e\u7b56\u7565<\/h4>\n<p>\u6253\u5f00\u7ec4\u7b56\u7565\u7f16\u8f91\u5668&#xff08;\u5728\u542f\u52a8\u6846\u8f93\u5165\u201cgpedit.msc\u201d&#xff09;&#xff0c;\u4f9d\u6b21\u5c55\u5f00\u3010\u8ba1\u7b97\u673a\u914d\u7f6e\u3011\u2013\u3010Windows\u8bbe\u7f6e\u3011\u2013\u3010\u5b89\u5168\u8bbe\u7f6e\u3011\u2013\u3010\u672c\u5730\u7b56\u7565\u3011\u2013\u3010\u7528\u6237\u6743\u9650\u5206\u914d\u3011&#xff0c;\u627e\u5230\u3010\u62d2\u7edd\u4ece\u7f51\u7edc\u8bbf\u95ee\u8fd9\u53f0\u8ba1\u7b97\u673a\u3011&#xff0c;\u53cc\u51fb\u6253\u5f00\u540e\u5220\u9664\u91cc\u9762\u7684Guest&#xff0c;\u8868\u793a\u5141\u8bb8\u6765\u5bbe\u5e10\u6237\u8fdc\u7a0b\u8bbf\u95ee\u3002 <img decoding=\"async\" src=\"2025-04-1910mbntj4g0u.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5728\u7ec4\u7b56\u7565\u7684\u201c\u672c\u5730\u7b56\u7565\u201d\u7684\u201c\u5b89\u5168\u9009\u9879\u201d\u5904&#xff0c;\u5c06\u201c\u7f51\u7edc\u8bbf\u95ee&#xff1a;\u672c\u5730\u5e10\u6237\u7684\u5171\u4eab\u548c\u5b89\u5168\u6a21\u5f0f\u201d\u8bbe\u7f6e\u4e3a\u201c\u4ec5\u6765\u5bbe-\u672c\u5730\u5e10\u6237\u4ee5\u6765\u5bbe\u8eab\u4efd\u9a8c\u8bc1\u201d&#xff0c;\u5e76\u4e14\u628a\u201c\u8d26\u6237&#xff1a;\u4f7f\u7528\u7a7a\u767d\u5bc6\u7801\u7684\u672c\u5730\u5e10\u6237\u53ea\u5141\u8bb8\u8fdc\u7a0b\u63a7\u5236\u53f0\u767b\u5f55\u201d\u8bbe\u4e3a\u201c\u5df2\u7981\u7528\u201d\u3002<\/p>\n<p><img decoding=\"async\" src=\"2025-04-193sxwsna3i4c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <img decoding=\"async\" src=\"2025-04-190wypam052kj.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u6253\u5f00\u6ce8\u518c\u8868\u7f16\u8f91\u5668&#xff08;\u5728\u542f\u52a8\u6846\u8f93\u5165\u201cregedit\u201d&#xff09;&#xff0c;\u4f9d\u6b21\u5c55\u5f00\u201cHKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Control\\\\Lsa\u201d&#xff0c;\u627e\u5230\u91cc\u9762\u7684\u4e24\u4e2a\u4ee5\u201crestrictanony\u201d\u6253\u5934\u7684\u952e&#xff0c;\u628a\u5b83\u4eec\u90fd\u8bbe\u7f6e\u4e3a0&#xff0c;\u8868\u793a\u5141\u8bb8\u533f\u540d\u8bbf\u95ee\u3002 <img decoding=\"async\" src=\"2025-04-19pa1jy53ma5r.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>5.\u4f7f\u7528smbclient\u8bbf\u95ee<\/h4>\n<p>\u5148\u5b89\u88c5smbcilent&#xff1a;yum install samba-client <img decoding=\"async\" src=\"2025-04-194uaaxsvxnqs.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5728smb.conf\u7684[global]\u6807\u7b7e\u4e0b\u9762\u914d\u7f6eclient min protocol\u548cclient max protocol<\/p>\n<p>\u5982\u679c\u5df2\u7ecf\u8bbe\u7f6e&#xff0c;\u5219\u8df3\u8fc7\u6b64\u6b65<\/p>\n<p><img decoding=\"async\" src=\"2025-04-19o1u5wf0jxfq.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u8fde\u63a5\u5171\u4eab\u6587\u4ef6\u5939&#xff1a;smbclient \/\/192.168.5.131\/ShareDir <img decoding=\"async\" src=\"2025-04-19dbosvou4u5p.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5f53\u51fa\u73b0smb: \\\\&gt;\u8868\u793a\u5df2\u7ecf\u5efa\u7acb\u8fde\u63a5&#xff0c;\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528ls\u547d\u4ee4\u53ef\u4ee5\u5217\u51fa\u5171\u4eab\u7684\u6587\u4ef6&#xff0c;mget\u4e0b\u8f7d&#xff0c;mput\u4e0a\u4f20&#xff0c;exit\u9000\u51fa&#xff0c;help\u83b7\u53d6\u5e2e\u52a9\u3002\u7c7b\u4f3c\u4e8eFTP\u7684\u547d\u4ee4<\/p>\n<h4>6. \u5229\u7528mount\u547d\u4ee4\u5c06\u5171\u4eab\u8d44\u6e90\u52a0\u8f7d\u5230\u672c\u673a<\/h4>\n<p>\u5c06\u5171\u4eab\u8d44\u6e90\u6302\u8f7d\u5230\/mnt\/smb\u76ee\u5f55\u4e0b&#xff0c;\u5982\u679c\u76ee\u5f55\u4e0d\u5b58\u5728\u5219\u5148\u521b\u5efa\u8be5\u76ee\u5f55&#xff1a;mkdir \/mnt\/smb<\/p>\n<p>\u6ce8\u610f&#xff1a;\u6302\u8f7d\u7684\u76ee\u5f55\u5fc5\u987b\u5b58\u5728<\/p>\n<p><img decoding=\"async\" src=\"2025-04-19lutehucwmab.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u63a5\u4e0b\u6765\u4f7f\u7528\u6302\u8f7d\u547d\u4ee4: mount \/\/192.168.5.131\/ShareDir \/mnt\/smb -t cifs -o username&#061;Guest,vers&#061;1.0<\/p>\n<p>\/\/192.168.5.131\/ShareDir \u662f\u8981\u6302\u8f7d\u7684\u8fdc\u7a0b SMB\/CIFS \u5171\u4eab\u8d44\u6e90 \/mnt\/smb \u662f\u672c\u5730\u7684\u6302\u8f7d\u70b9 -t cifs \u6307\u5b9a\u4e86\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\u4e3a CIFS&#xff08;Common Internet File System&#xff09;&#xff0c;\u8fd9\u662f\u4e00\u4e2a\u5e7f\u6cdb\u4f7f\u7528\u7684\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u534f\u8bae&#xff0c;\u5c24\u5176\u7528\u4e8e Samba \u6587\u4ef6\u5171\u4eab\u3002 -o \u540e\u9762\u662f\u6302\u8f7d\u9009\u9879&#xff0c;\u5b83\u6307\u5b9a\u4e86\u6302\u8f7d\u65f6\u7684\u7279\u5b9a\u914d\u7f6e\u3002\u8fd9\u91cc\u6709\u4e24\u4e2a\u9009\u9879&#xff1a; 1.username&#061;Guest&#xff1a;\u6307\u5b9a\u7528\u4e8e\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\u7684\u7528\u6237\u540d\u3002\u5728\u6b64\u4f8b\u4e2d\u4f7f\u7528\u7684\u662f Guest \u7528\u6237&#xff0c;\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5176\u4ed6\u51ed\u8bc1&#xff0c;\u53ef\u80fd\u9700\u8981\u63d0\u4f9b\u5bc6\u7801&#xff08;\u4f8b\u5982&#xff1a;password&#061;YourPassword&#xff09;\u3002 2.vers&#061;1.0&#xff1a;\u6307\u5b9a CIFS \u534f\u8bae\u7684\u7248\u672c\u3002\u5728\u8fd9\u91cc&#xff0c;vers&#061;1.0 \u8868\u793a\u4f7f\u7528 SMB 1.0 \u534f\u8bae\u7248\u672c\u3002SMB 1.0 \u534f\u8bae\u6bd4\u8f83\u65e7&#xff0c;\u901a\u5e38\u4e0d\u63a8\u8350\u4f7f\u7528&#xff0c;\u4f46\u5728\u67d0\u4e9b\u8001\u65e7\u8bbe\u5907\u6216\u670d\u52a1\u5668\u4e0a\u4ecd\u7136\u53ef\u80fd\u9700\u8981\u6b64\u7248\u672c\u3002\u6ce8\u610f&#xff0c;\u8bb8\u591a\u73b0\u4ee3\u7cfb\u7edf\u548c\u670d\u52a1\u5df2\u9010\u6b65\u5f03\u7528 SMB 1.0&#xff0c;\u56e0\u6b64\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u66f4\u9ad8\u7248\u672c&#xff0c;\u5982 vers&#061;2.1 \u6216 vers&#061;3.0&#xff0c;\u8fd9\u4e9b\u7248\u672c\u66f4\u5b89\u5168\u4e14\u66f4\u9ad8\u6548\u3002<\/p>\n<p><img decoding=\"async\" src=\"2025-04-19gk0hunhhhke.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4e4b\u540e\u5219\u53ef\u4ee5\u6253\u5f00\u67e5\u770b <img decoding=\"async\" src=\"2025-04-19r4buupthhjp.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u5230\u6b64&#xff0c;\u5b9e\u9a8c\u5185\u5bb9\u7ed3\u675f<\/p>\n<hr \/>\n<h2>\u603b\u7ed3<\/h2>\n<p>Samba \u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u800c\u6709\u6548\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u80fd\u591f\u8ba9 Linux \u7cfb\u7edf\u4e0e Windows \u7cfb\u7edf\u5171\u4eab\u6587\u4ef6&#xff0c;\u5e76\u4e14\u652f\u6301\u4e0d\u540c\u7ea7\u522b\u7684\u6743\u9650\u7ba1\u7406\u548c\u8bbf\u95ee\u63a7\u5236\u3002\u5728\u5b9e\u9a8c\u4e2d&#xff0c;\u91cd\u70b9\u5b66\u4e60\u4e86\u5982\u4f55\u914d\u7f6e smb.conf \u6587\u4ef6&#xff0c;\u786e\u4fdd\u5171\u4eab\u8d44\u6e90\u7684\u6b63\u786e\u914d\u7f6e\u4ee5\u53ca\u5ba2\u6237\u7aef\u7684\u6b63\u5e38\u8bbf\u95ee\u3002\u4f7f\u7528 smbclient \u548c mount \u547d\u4ee4\u5bf9 Samba \u5171\u4eab\u8d44\u6e90\u8fdb\u884c\u4e86\u5b9e\u9645\u64cd\u4f5c&#xff0c;\u8fdb\u4e00\u6b65\u52a0\u6df1\u4e86\u5bf9 Samba \u670d\u52a1\u7684\u7406\u89e3\u3002<\/p>\n<p>\u603b\u7684\u6765\u8bf4&#xff0c;\u672c\u6b21\u5b9e\u9a8c\u4e0d\u4ec5\u63d0\u9ad8\u4e86\u5bf9 Samba \u914d\u7f6e\u548c\u4f7f\u7528\u7684\u638c\u63e1&#xff0c;\u4e5f\u4e3a\u5728\u591a\u64cd\u4f5c\u7cfb\u7edf\u73af\u5883\u4e2d\u8fdb\u884c\u6587\u4ef6\u5171\u4eab\u4e0e\u7ba1\u7406\u63d0\u4f9b\u4e86\u5b9d\u8d35\u7684\u5b9e\u8df5\u7ecf\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf36\u6b21\u3002\u672c\u6b21\u5b9e\u9a8c\u4e3b\u8981\u662f\u914d\u7f6e\u548c\u4f7f\u7528 Samba \u670d\u52a1\u5668\uff0c\u5b66\u4e60\u5982\u4f55\u5171\u4eab Linux \u7cfb\u7edf\u4e0a\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7 Windows \u5ba2\u6237\u7aef\u4ee5\u53ca Linux \u5ba2\u6237\u7aef\u8bbf\u95ee\u8fd9\u4e9b\u5171\u4eab\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u5b9e\u9a8c\u8fd8\u6db5\u76d6\u4e86\u5982\u4f55\u4f7f\u7528 smbclient \u548c mount \u547d\u4ee4\u6765\u8bbf\u95ee\u548c\u6302\u8f7d Samba \u5171\u4eab\u7684\u76ee\u5f55\uff0c\u8fdb\u4e00\u6b65\u638c\u63e1\u7f51\u7edc\u6587\u4ef6\u5171\u4eab\u7684\u57fa\u672c\u64cd\u4f5c\u3002\u672c\u7bc7\u6587\u7ae0\u7b80\u5355\u8bb0\u5f55Samba\u670d\u52a1\u5668\u7684\u5165\u95e8\u914d\u7f6e\uff0c\u4e0d\u505a\u5b89\u5168\u65b9\u9762\u7684\u9632\u5fa1\uff0c\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u8bf7\u52ff\u76f4\u63a5\u4f7f\u7528\u5728\u751f\u4ea7\u529b\u73af\u5883\u3002\u63d0\u793a\uff1a\u4ee5\u4e0b\u662f\u672c\u7bc7\u6587\u7ae0\u6b63\u6587\u5185\u5bb9\uff0c\u4e0b\u9762\u6848\u4f8b\u53ef\u4f9b\u53c2\u8003\u3002_centos samba<\/p>\n","protected":false},"author":2,"featured_media":22499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[59,58,1738,43],"topic":[],"class_list":{"0":"post-22519","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-centos","9":"tag-linux","11":"tag-43"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/22519.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf36\u6b21\u3002\u672c\u6b21\u5b9e\u9a8c\u4e3b\u8981\u662f\u914d\u7f6e\u548c\u4f7f\u7528 Samba \u670d\u52a1\u5668\uff0c\u5b66\u4e60\u5982\u4f55\u5171\u4eab Linux \u7cfb\u7edf\u4e0a\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7 Windows \u5ba2\u6237\u7aef\u4ee5\u53ca Linux \u5ba2\u6237\u7aef\u8bbf\u95ee\u8fd9\u4e9b\u5171\u4eab\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u5b9e\u9a8c\u8fd8\u6db5\u76d6\u4e86\u5982\u4f55\u4f7f\u7528 smbclient \u548c mount \u547d\u4ee4\u6765\u8bbf\u95ee\u548c\u6302\u8f7d Samba \u5171\u4eab\u7684\u76ee\u5f55\uff0c\u8fdb\u4e00\u6b65\u638c\u63e1\u7f51\u7edc\u6587\u4ef6\u5171\u4eab\u7684\u57fa\u672c\u64cd\u4f5c\u3002\u672c\u7bc7\u6587\u7ae0\u7b80\u5355\u8bb0\u5f55Samba\u670d\u52a1\u5668\u7684\u5165\u95e8\u914d\u7f6e\uff0c\u4e0d\u505a\u5b89\u5168\u65b9\u9762\u7684\u9632\u5fa1\uff0c\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u8bf7\u52ff\u76f4\u63a5\u4f7f\u7528\u5728\u751f\u4ea7\u529b\u73af\u5883\u3002\u63d0\u793a\uff1a\u4ee5\u4e0b\u662f\u672c\u7bc7\u6587\u7ae0\u6b63\u6587\u5185\u5bb9\uff0c\u4e0b\u9762\u6848\u4f8b\u53ef\u4f9b\u53c2\u8003\u3002_centos samba\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22519.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T22:07:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220726-6802cd1e53e0a.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22519.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22519.html\",\"name\":\"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T22:07:32+00:00\",\"dateModified\":\"2025-04-18T22:07:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22519.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22519.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22519.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/22519.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb2.8k\u6b21\uff0c\u70b9\u8d5e50\u6b21\uff0c\u6536\u85cf36\u6b21\u3002\u672c\u6b21\u5b9e\u9a8c\u4e3b\u8981\u662f\u914d\u7f6e\u548c\u4f7f\u7528 Samba \u670d\u52a1\u5668\uff0c\u5b66\u4e60\u5982\u4f55\u5171\u4eab Linux \u7cfb\u7edf\u4e0a\u7684\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7 Windows \u5ba2\u6237\u7aef\u4ee5\u53ca Linux \u5ba2\u6237\u7aef\u8bbf\u95ee\u8fd9\u4e9b\u5171\u4eab\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u5b9e\u9a8c\u8fd8\u6db5\u76d6\u4e86\u5982\u4f55\u4f7f\u7528 smbclient \u548c mount \u547d\u4ee4\u6765\u8bbf\u95ee\u548c\u6302\u8f7d Samba \u5171\u4eab\u7684\u76ee\u5f55\uff0c\u8fdb\u4e00\u6b65\u638c\u63e1\u7f51\u7edc\u6587\u4ef6\u5171\u4eab\u7684\u57fa\u672c\u64cd\u4f5c\u3002\u672c\u7bc7\u6587\u7ae0\u7b80\u5355\u8bb0\u5f55Samba\u670d\u52a1\u5668\u7684\u5165\u95e8\u914d\u7f6e\uff0c\u4e0d\u505a\u5b89\u5168\u65b9\u9762\u7684\u9632\u5fa1\uff0c\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u8bf7\u52ff\u76f4\u63a5\u4f7f\u7528\u5728\u751f\u4ea7\u529b\u73af\u5883\u3002\u63d0\u793a\uff1a\u4ee5\u4e0b\u662f\u672c\u7bc7\u6587\u7ae0\u6b63\u6587\u5185\u5bb9\uff0c\u4e0b\u9762\u6848\u4f8b\u53ef\u4f9b\u53c2\u8003\u3002_centos samba","og_url":"https:\/\/www.wsisp.com\/helps\/22519.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T22:07:32+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418220726-6802cd1e53e0a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22519.html","url":"https:\/\/www.wsisp.com\/helps\/22519.html","name":"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T22:07:32+00:00","dateModified":"2025-04-18T22:07:32+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22519.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22519.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22519.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Linux\u7cfb\u5217\u3011CentOS 9 \u4e4bSamba\u670d\u52a1\u5668\u7b80\u5355\u914d\u7f6e"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=22519"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22519\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22499"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22519"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}