{"id":15231,"date":"2025-04-18T21:49:32","date_gmt":"2025-04-18T13:49:32","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/15231.html"},"modified":"2025-04-18T21:49:32","modified_gmt":"2025-04-18T13:49:32","slug":"%e7%ac%ac%e5%8d%81%e5%85%ad%e7%ab%a0%e3%80%81%e6%96%87%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b9%8b%e4%ba%8c%ef%bc%9a-samba-%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/15231.html","title":{"rendered":"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668"},"content":{"rendered":"<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.1 \u4ec0\u4e48\u662f SAMBA<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u8fd9\u4e2a\u7ae0\u8282\u4e2d&#xff0c;\u6211\u4eec\u8981\u6559\u5927\u5bb6\u8df3\u7684\u662f\u70ed\u60c5\u6709\u52b2\u7684<span style=\"color:#000088\">\u5df4\u897f SAMBA \u821e\u8e48<\/span>&#8230; \u5594\u4e0d&#xff5e;\u641e\u9519\u4e86&#xff5e;\u662f\u8981\u5411\u5927\u5bb6\u4ecb\u7ecd\u00a0<span style=\"color:#000088\">SAMBA<\/span>\u00a0\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u5566&#xff01;\u54a6&#xff01;\u602a\u4e86&#xff01; \u600e\u4e48\u670d\u52a1\u5668\u7684\u540d\u79f0\u4f1a\u4f7f\u7528 SAMBA \u5462&#xff1f;\u8fd8\u771f\u662f\u602a\u602a\u7684\u5462&#xff01;\u90a3\u4e48\u8fd9\u4e2a SAMBA \u670d\u52a1\u5668\u7684\u529f\u80fd\u662f\u4ec0\u4e48\u5462&#xff1f;\u53e6\u5916&#xff0c; \u5b83\u6700\u65e9\u662f\u7ecf\u7531\u4ec0\u4e48\u6837\u7684\u60f3\u6cd5\u800c\u5f00\u53d1\u51fa\u6765\u7684\u5462&#xff1f;\u5e95\u4e0b\u5c31\u8ba9\u6211\u4eec\u6162\u6162\u7684\u8c08\u4e00\u8c08\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.1.1 SAMBA \u7684\u53d1\u5c55\u5386\u53f2\u4e0e\u540d\u79f0\u7684\u7531\u6765<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u65e9\u671f\u7684\u7f51\u7edc\u4e16\u754c\u5f53\u4e2d&#xff0c;\u6863\u6848\u6570\u636e\u5728\u4e0d\u540c\u4e3b\u673a\u4e4b\u95f4\u7684\u4f20\u8f93\u5927\u591a\u662f\u4f7f\u7528\u00a0FTP\u00a0\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u8f6f\u4ef6\u6765\u8fdb\u884c\u4f20\u9001\u3002\u4e0d\u8fc7\u4f7f\u7528 FTP \u4f20\u8f93\u6863\u6848\u5374\u6709\u4e2a\u5c0f\u5c0f\u7684\u95ee\u9898&#xff0c;\u00a0<span style=\"color:#000088\">\u90a3\u5c31\u662f\u4f60\u65e0\u6cd5\u76f4\u63a5\u4fee\u6539\u4e3b\u673a\u4e0a\u9762\u7684\u6863\u6848\u6570\u636e<\/span>&#xff01;\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u4f60\u60f3\u8981\u66f4\u6539 Linux \u4e3b\u673a\u4e0a\u9762\u7684\u67d0\u4e2a\u6863\u6848\u65f6&#xff0c;\u4f60\u5fc5\u987b\u8981\u5c06\u8be5\u6863\u6848\u81ea\u670d\u52a1\u5668\u4e0b\u8f7d\u540e\u624d\u80fd\u4fee\u6539\u3002 \u4e5f\u56e0\u6b64\u8be5\u6863\u6848\u5728\u670d\u52a1\u5668\u4e0e\u5ba2\u6237\u7aef\u90fd\u4f1a\u5b58\u5728\u3002\u8fd9\u4e2a\u65f6\u5019&#xff0c;\u4e07\u4e00\u5982\u679c\u6709\u4e00\u5929\u4f60\u4fee\u6539\u4e86\u67d0\u4e2a\u6863\u6848&#xff0c; \u5374\u5fd8\u8bb0\u5c06\u6570\u636e\u4e0a\u4f20\u56de\u4e3b\u673a&#xff0c;\u90a3\u4e48\u7b49\u8fc7\u4e86\u4e00\u9635\u5b50\u4e4b\u540e&#xff0c;\u5475\u5475&#xff0c;\u4f60\u5982\u4f55\u77e5\u9053\u90a3\u4e2a\u6863\u6848\u624d\u662f\u6700\u65b0\u7684&#xff1f;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8ba9\u6863\u6848\u5728\u4e24\u90e8\u4e3b\u673a\u4e4b\u95f4\u76f4\u63a5\u4fee\u6539&#xff1a; NFS \u4e0e CIFS<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e2\u7136\u6709\u8fd9\u6837\u7684\u95ee\u9898&#xff0c;\u90a3\u4e48\u597d\u5427&#xff0c;\u6211\u53ef\u4e0d\u53ef\u4ee5\u5728\u5ba2\u6237\u7aef\u7684\u673a\u5668\u4e0a\u9762\u76f4\u63a5\u4f7f\u7528\u670d\u52a1\u5668\u4e0a\u9762\u7684\u6863\u6848&#xff0c; \u5982\u679c\u53ef\u4ee5\u5728\u5ba2\u6237\u7aef\u76f4\u63a5\u8fdb\u884c\u670d\u52a1\u5668\u7aef\u6863\u6848\u7684\u5b58\u53d6&#xff0c;\u90a3\u4e48\u6211\u5728\u5ba2\u6237\u7aef\u5c31\u4e0d\u9700\u8981\u5b58\u5728\u8be5\u6863\u6848\u6570\u636e\u5570&#xff0c;\u4e5f\u5c31\u662f\u8bf4&#xff0c; \u6211\u53ea\u8981\u6709 Server \u4e0a\u9762\u7684\u6863\u6848\u8d44\u6599\u5b58\u5728\u5c31\u53ef\u4ee5\u5566&#xff01;\u6709\u6ca1\u6709\u8fd9\u6837\u7684\u6587\u4ef6\u7cfb\u7edf\u554a&#xff01; \u5f88\u9ad8\u5174\u7684\u662f&#xff0c;\u7b2c\u5341\u4e09\u7ae0\u7684 NFS\u00a0\u5c31\u662f\u8fd9\u6837\u7684\u6587\u4ef6\u7cfb\u7edf\u4e4b\u4e00\u5566&#xff01;\u6211\u53ea\u8981\u5728\u5ba2\u6237\u7aef\u5c06 Server \u6240\u63d0\u4f9b\u5206\u4eab\u7684\u76ee\u5f55\u6302\u8f7d\u8fdb\u6765&#xff0c; \u90a3\u4e48\u5728\u5ba2\u6237\u7aef\u7684\u673a\u5668\u4e0a\u9762\u5c31\u53ef\u4ee5\u76f4\u63a5\u53d6\u7528 Server \u4e0a\u7684\u6863\u6848\u8d44\u6599\u5570&#xff0c;\u800c\u4e14&#xff0c;\u00a0<span style=\"color:#000088\">\u8be5\u6570\u636e\u5c31\u50cf\u662f\u6211\u5ba2\u6237\u7aef\u4e0a\u9762\u7684 partition \u4e00\u822c<\/span>&#xff0c;\u771f\u662f\u597d\u7528&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u800c\u9664\u4e86\u53ef\u4ee5\u8ba9 Unix Like \u7684\u673a\u5668\u4e92\u76f8\u5206\u4eab\u6863\u6848\u7684 NFS \u670d\u52a1\u5668\u4e4b\u5916&#xff0c;\u5728\u5fae\u8f6f (Microsoft) \u64cd\u4f5c\u7cfb\u7edf\u4e0a\u9762\u4e5f\u6709\u7c7b\u4f3c\u7684\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u90a3\u5c31\u662f\u00a0<span style=\"color:#000088\">Common Internet File System, CIFS<\/span>\u00a0\u8fd9\u4e2a\u549a\u549a\u5566&#xff01;CIFS \u6700\u7b80\u5355\u7684\u60f3\u6cd5\u5c31\u662f\u76ee\u524d\u5e38\u89c1\u7684\u300e<span style=\"color:#000088\">\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb<\/span>\u300f\u54af&#xff01; Windows \u7cfb\u7edf\u7684\u8ba1\u7b97\u673a\u53ef\u4ee5\u900f\u8fc7\u684c\u9762\u4e0a\u300e\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u300f\u6765\u5206\u4eab\u522b\u4eba\u6240\u63d0\u4f9b\u7684\u6863\u6848\u6570\u636e\u54e9&#xff01;\u771f\u662f\u65b9\u4fbf\u3002 \u4e0d\u8fc7&#xff0c;NFS \u4ec5\u80fd\u8ba9 Unix \u673a\u5668\u6c9f\u901a&#xff0c; CIFS \u53ea\u80fd\u8ba9 Windows \u673a\u5668\u6c9f\u901a\u3002\u4f24\u8111\u7b4b&#xff0c;\u90a3\u4e48\u6709\u6ca1\u6709\u8ba9 Windows \u4e0e Unix-Like \u8fd9\u4e24\u4e2a\u4e0d\u540c\u7684\u5e73\u53f0\u76f8\u4e92\u5206\u4eab\u6863\u6848\u6570\u636e\u7684\u6587\u4ef6\u7cfb\u7edf\u5462&#xff1f;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5229\u7528\u5c01\u5305\u4fa6\u6d4b\u9006\u5411\u5de5\u7a0b\u53d1\u5c55\u7684 SMB Server<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 1991 \u5e74\u4e00\u4e2a\u540d\u53eb Andrew Tridgell \u535a\u58eb\u73ed\u7814\u7a76\u751f\u5c31\u6709\u8fd9\u6837\u7684\u56f0\u6270&#xff0c;\u4ed6\u624b\u4e0a\u6709\u4e09\u90e8\u673a\u5668&#xff0c;\u5206\u522b\u662f\u8dd1 DOS \u7684\u4e2a\u4eba\u8ba1\u7b97\u673a\u3001DEC\u516c\u53f8\u7684 Digital Unix \u7cfb\u7edf\u4ee5\u53ca Sun \u7684 Unix \u7cfb\u7edf\u3002\u5728\u5f53\u65f6&#xff0c; DEC \u516c\u53f8\u6709\u53d1\u5c55\u51fa\u4e00\u5957\u79f0\u4e3a PATHWORKS \u7684\u8f6f\u4ef6&#xff0c;\u8fd9\u5957\u8f6f\u4ef6\u53ef\u4ee5\u7528\u6765\u5206\u4eab DEC \u7684 Unix \u4e0e\u4e2a\u4eba\u8ba1\u7b97\u673a\u7684 DOS \u8fd9\u4e24\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u7684\u6863\u6848\u6570\u636e&#xff0c;\u53ef\u60dc\u8ba9 Tridgell \u89c9\u5f97\u8f83\u56f0\u6270\u7684\u662f&#xff0c;Sun \u7684 Unix \u65e0\u6cd5\u85c9\u7531\u8fd9\u4e2a\u8f6f\u4ef6\u6765\u8fbe\u5230\u6570\u636e\u5206\u4eab\u7684\u76ee\u7684 (\u6ce81)\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u4e2a\u65f6\u5019 Tridgell \u5c31\u60f3\u8bf4&#xff1a;\u300e<span style=\"color:#000088\">\u54a6&#xff01;\u65e2\u7136\u8fd9\u4e24\u90e8\u7cfb\u7edf\u53ef\u4ee5\u76f8\u4e92\u6c9f\u901a&#xff0c;\u6ca1\u9053\u7406 Sun \u5c31\u5fc5\u9700\u8fd9\u4e48\u82e6\u547d\u5427&#xff1f;\u53ef\u4e0d\u53ef\u4ee5\u5c06\u8fd9\u4e24\u90e8\u7cfb\u7edf\u7684\u8fd0\u4f5c\u539f\u7406\u627e\u51fa\u6765&#xff0c;\u7136\u540e\u8ba9 Sun \u8fd9\u90e8\u673a\u5668\u4e5f\u80fd\u591f\u5206\u4eab\u6863\u6848\u6570\u636e\u5462&#xff1f;<\/span>\u300f&#xff0c; \u4e3a\u4e86\u89e3\u51b3\u8fd9\u6837\u7684\u7684\u95ee\u9898&#xff0c;\u4ed6\u8001\u5144\u5c31\u81ea\u884c\u5199\u4e86\u4e2a program \u53bb\u4fa6\u6d4b\u5f53 DOS \u4e0e DEC \u7684 Unix \u7cfb\u7edf\u5728\u8fdb\u884c\u6570\u636e\u5206\u4eab\u4f20\u9001\u65f6\u6240\u4f7f\u7528\u5230\u7684\u901a\u8baf\u534f\u8bae\u4fe1\u606f&#xff0c;\u7136\u540e\u5c06\u8fd9\u4e9b\u91cd\u8981\u7684\u4fe1\u606f\u64b7\u53d6\u4e0b\u6765&#xff0c; \u5e76\u4e14\u57fa\u4e8e\u4e0a\u8ff0\u6240\u627e\u5230\u7684\u901a\u8baf\u534f\u8bae\u800c\u5f00\u53d1\u51fa\u00a0<span style=\"color:#000088\">Server Message Block (SMB)<\/span>\u00a0\u8fd9\u4e2a\u6587\u4ef6\u7cfb\u7edf&#xff0c;\u800c\u5c31\u662f\u8fd9\u5957 SMB \u8f6f\u4ef6\u5c31\u80fd\u591f\u8ba9 Unix \u4e0e DOS \u4e92\u76f8\u7684\u5206\u4eab\u6570\u636e\u5570&#xff01;<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Tips:<span style=\"color:#009000\">\u518d\u6b21\u7684\u7ed9\u4ed6\u5f3a\u8c03\u4e00\u6b21&#xff0c;\u5728 Unix Like \u4e0a\u9762\u53ef\u4ee5\u5206\u4eab\u6863\u6848\u6570\u636e\u7684 file system \u662f NFS&#xff0c;\u90a3\u4e48\u5728 Windows \u4e0a\u9762\u4f7f\u7528\u7684\u300e\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u300f\u6240\u4f7f\u7528\u7684\u6587\u4ef6\u7cfb\u7edf\u5219\u79f0\u4e3a Common Internet File System, CIFS<\/span><\/span><\/span><\/td>\n<td>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u9e1f\u54e5\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134925-68025865dc581.jpg\" width=\"534\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53d6\u540d SAMBA \u7684\u4e3b\u56e0 ^_^<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e2\u7136\u5199\u6210\u4e86\u8f6f\u4ef6&#xff0c;\u60f3\u4e00\u60f3&#xff0c;\u603b\u662f\u9700\u8981\u6ce8\u518c\u4e00\u4e0b\u5546\u6807\u5427&#xff01;\u56e0\u6b64 Tridgell \u5c31\u53bb\u7533\u8bf7\u4e86 SMBServer (Server Message Block \u7684\u7b80\u5199) \u8fd9\u4e2a\u540d\u5b57\u6765\u505a\u4e3a\u4ed6\u64b0\u5199\u7684\u8fd9\u4e2a\u8f6f\u4ef6\u7684\u5546\u6807&#xff0c;\u53ef\u60dc\u7684\u662f&#xff0c;\u56e0\u4e3a SMB \u662f\u6ca1\u6709\u610f\u4e49\u7684\u6587\u5b57&#xff0c;\u56e0\u6b64\u6ca1\u6709\u529e\u6cd5\u8fbe\u6210\u6ce8\u518c\u3002\u65e2\u7136\u5982\u6b64\u7684\u8bdd&#xff0c;\u90a3\u4e48\u80fd\u4e0d\u80fd\u5728\u5b57\u5178\u91cc\u9762\u627e\u5230\u76f8\u5173\u7684\u5b57\u8bcd\u53ef\u4ee5\u505a\u4e3a\u5546\u6807\u6765\u6ce8\u518c\u5462&#xff1f; \u7ffb\u4e86\u8001\u534a\u5929&#xff0c;\u5475\u5475&#xff01;\u8fd9\u4e2a\u00a0<span style=\"color:#000088\">SAMBA<\/span>\u00a0\u521a\u597d\u542b\u6709 SMB &#xff0c; \u53c8\u662f\u70ed\u60c5\u6709\u52b2\u7684\u62c9\u4e01\u821e\u8e48\u7684\u540d\u79f0&#xff0c;\u4e0d\u7136\u5c31\u7528\u8fd9\u4e2a\u540d\u5b57\u6765\u505a\u4e3a\u5546\u6807\u597d\u4e86&#xff01;\u8fd9\u6210\u4e3a\u6211\u4eec\u4eca\u5929\u6240\u4f7f\u7528\u7684 SAMBA \u7684\u540d\u79f0\u7531\u6765\u5566&#xff01; ^_^<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.1.2 SAMBA \u5e38\u89c1\u7684\u5e94\u7528<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e0a\u9762\u8bf4\u660e\u7684 SAMBA \u53d1\u5c55\u7f18\u7531&#xff0c;\u4f60\u5c31\u5e94\u8be5\u4e0d\u96be\u77e5\u9053&#xff0c; SAMBA \u6700\u521d\u53d1\u5c55\u7684\u4e3b\u8981\u76ee\u5c31\u662f\u8981\u7528\u6765\u6c9f\u901a Windows \u4e0e Unix Like \u8fd9\u4e24\u4e2a\u4e0d\u540c\u7684\u4f5c\u4e1a\u5e73\u53f0&#xff0c;\u90a3\u4e48 SAMBA \u53ef\u4ee5\u8fdb\u884c\u54ea\u4e9b\u52a8\u4f5c\u5462&#xff1f;\u60f3\u4e00\u60f3\u7f51\u82b3\u80fd\u505a\u7684\u5427&#xff01;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5206\u4eab\u6863\u6848\u4e0e\u6253\u5370\u673a\u670d\u52a1&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53ef\u4ee5\u63d0\u4f9b\u7528\u6237\u767b\u5165 SAMBA \u4e3b\u673a\u65f6\u7684\u8eab\u4efd\u8ba4\u8bc1&#xff0c;\u4ee5\u63d0\u4f9b\u4e0d\u540c\u8eab\u4efd\u8005\u7684\u4e2a\u522b\u6570\u636e&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53ef\u4ee5\u8fdb\u884c Windows \u7f51\u7edc\u4e0a\u7684\u4e3b\u673a\u540d\u89e3\u6790 (NetBIOS name)<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53ef\u4ee5\u8fdb\u884c\u88c5\u7f6e\u7684\u5206\u4eab (\u4f8b\u5982 Zip, CDROM&#8230;)<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5e95\u4e0b\u6211\u4eec\u6765\u8c08\u51e0\u4e2a SAMBA \u670d\u52a1\u5668\u7684\u5e94\u7528\u5b9e\u4f8b\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5229\u7528\u8f6f\u4ef6\u76f4\u63a5\u7f16\u4fee WWW \u4e3b\u673a\u4e0a\u9762\u7684\u7f51\u9875\u6570\u636e<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u76f8\u4fe1\u5f88\u591a\u4eba\u90fd\u662f\u5229\u7528\u4e2a\u4eba\u8ba1\u7b97\u673a\u5c06\u7f51\u9875\u5236\u4f5c\u5b8c\u6bd5\u4e4b\u540e&#xff0c;\u518d\u4ee5\u7c7b\u4f3c FTP \u4e4b\u7c7b\u7684\u670d\u52a1\u5c06\u7f51\u9875\u4e0a\u4f20\u5230 WWW \u4e3b\u673a\u7684&#xff0c; \u4f46\u8fd9\u6837\u6709\u4e2a\u56f0\u6270&#xff0c;\u90a3\u5c31\u662f\u540c\u65f6\u5728\u5ba2\u6237\u7aef\u4e0e WWW \u4e3b\u673a\u4e0a\u5934\u90fd\u6709\u4e00\u4efd\u7f51\u9875\u6570\u636e&#xff0c;\u5e38\u5e38\u4f1a\u5fd8\u8bb0\u54ea\u4e00\u4efd\u662f\u6700\u65b0\u7684&#xff0c; \u6700\u9ebb\u70e6\u7684\u662f&#xff0c;\u6709\u65f6\u5019\u4e0b\u8f7d\u4e0b\u6765\u7684\u6863\u6848\u5df2\u7ecf\u7ecf\u8fc7\u597d\u591a\u4fee\u6539\u4e86&#xff0c;\u5374\u5728\u4e0b\u6b21\u7684 FTP \u4f5c\u4e1a&#xff0c;\u4e0d\u5c0f\u5fc3\u53c8\u4e0b\u8f7d\u4e00\u6b21\u65e7\u6570\u636e&#xff0c; \u7ed3\u679c\u5c06\u5df2\u7ecf\u4fee\u6539\u8fc7\u7684\u6570\u636e\u8986\u76d6\u8fc7\u53bb&#xff5e;\u5929\u5436&#xff01;\u53c8\u8981\u91cd\u5199\u4e00\u904d&#8230;..\u771f\u662f\u8ba8\u538c&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u6709\u5b89\u88c5 SAMBA \u670d\u52a1\u5668\u7684\u8bbe\u5b9a\u7684\u8bdd&#xff0c;\u90a3\u4e48\u900f\u8fc7\u300e\u7f51\u82b3\u300f\u7684\u529f\u80fd&#xff0c;\u76f4\u63a5\u8054\u673a\u8fdc\u7a0b\u670d\u52a1\u5668\u6240\u63d0\u4f9b\u7684\u76ee\u5f55&#xff0c; \u5982\u6b64\u4e00\u6765\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u4f60\u7684\u4e2a\u4eba\u8ba1\u7b97\u673a\u4e0a\u9762\u4fee\u6539\u4e3b\u673a\u7684\u6863\u6848\u6570\u636e&#xff0c;\u53ea\u6709\u4e00\u4efd\u6b63\u786e\u7684\u6570\u636e\u800c\u5df2\u5594&#xff01; \u8fd9\u5c31\u6709\u70b9\u50cf\u662f\u300e\u5728\u7ebf\u7f16\u4fee\u300f\u5462&#xff0c;\u4e00\u4fee\u6539\u5b8c\u6210&#xff0c;\u5728 Internet \u4e0a\u9762\u53ef\u4ee5\u7acb\u523b\u68c0\u9a8c&#xff0c;\u65b9\u4fbf\u7684\u5f88\u5436&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u505a\u6210\u53ef\u76f4\u63a5\u8054\u673a\u7684\u6587\u4ef6\u670d\u52a1\u5668<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u9e1f\u54e5\u8fc7\u53bb\u5f85\u8fc7\u7684\u5b9e\u9a8c\u5ba4\u4e2d&#xff0c;\u7531\u4e8e\u8ba1\u7b97\u673a\u6570\u91cf\u4e0d\u591a&#xff0c;\u7814\u7a76\u751f\u5e38\u5e38\u4f1a\u4f7f\u7528\u5230\u4e0d\u540c\u7684\u8ba1\u7b97\u673a (\u56e0\u4e3a\u5927\u5bb6\u90fd\u5f97\u62a2\u6ca1\u6709\u4eba\u7528\u7684\u8ba1\u7b97\u673a\u554a&#xff01;) &#xff0c;\u6b64\u5916&#xff0c;\u4e5f\u5e38\u5e38\u6709\u7814\u7a76\u751f\u62ff\u81ea\u5df1\u7684 NoteBook \u6765\u5de5\u4f5c&#xff0c;\u56e0\u6b64&#xff0c;\u6709\u4e9b\u56e2\u961f\u7684\u6570\u636e\u5c31\u5206\u6563\u5728\u5404\u4e2a\u8ba1\u7b97\u673a\u5f53\u4e2d&#xff0c;\u4f7f\u7528\u4e0a\u76f8\u5f53\u7684\u4e0d\u65b9\u4fbf\u3002 \u8fd9\u4e2a\u65f6\u5019&#xff0c;\u9e1f\u54e5\u5c31\u4f7f\u7528 SAMBA \u5c06\u786c\u76d8\u7a7a\u95f4\u5206\u4eab\u51fa\u6765&#xff0c;\u7531\u4e8e\u4f7f\u7528\u8005\u8981\u767b\u5165 SAMBA \u8fd9\u4e2a\u670d\u52a1\u5668\u4e3b\u673a\u65f6\u9700\u8981\u8f93\u5165\u7528\u6237\u6570\u636e (\u8d26\u53f7\u4e0e\u5bc6\u7801)&#xff0c;\u800c\u4e0d\u540c\u7684\u767b\u5165\u8005\u4f1a\u53d6\u5f97\u4e0d\u4e00\u6837\u7684\u76ee\u5f55\u8d44\u6e90&#xff0c;\u6240\u4ee5\u53ef\u4ee5\u907f\u514d\u81ea\u5df1\u7684\u6570\u636e\u5728\u516c\u7528\u8ba1\u7b97\u673a\u4e0a\u9762\u88ab\u7aa5\u89c6&#xff0c; \u6b64\u5916&#xff0c;\u5728\u4e0d\u540c\u7684\u516c\u7528\u8ba1\u7b97\u673a\u4e0a\u9762\u90fd\u53ef\u4ee5\u767b\u5165 SAMBA \u4e3b\u673a&#xff0c;\u6570\u636e\u7684\u4f7f\u7528\u4e0a\u9762\u771f\u662f\u76f8\u5f53\u7684\u68d2\u554a&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6253\u5370\u673a\u670d\u52a1\u5668<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u9664\u4e86\u5206\u4eab\u6587\u4ef6\u7cfb\u7edf\u5916&#xff0c;\u4e5f\u53ef\u4ee5\u5206\u4eab\u6253\u5370\u673a\u5594&#xff0c;\u9e1f\u54e5\u7684\u7814\u7a76\u5ba4\u597d\u51e0\u90e8\u8ba1\u7b97\u673a\u5c31\u662f\u76f4\u63a5\u4ee5 Linux \u5206\u4eab\u7684\u6253\u5370\u673a\u6765\u5370\u5236\u62a5\u544a\u7684\u3002\u4f60\u4f1a\u8bf4\u300e\u554a Windows \u4e5f\u53ef\u4ee5\u529e\u7684\u5230\u554a&#xff01;\u6ca1\u6709\u4ec0\u4e48\u4e86\u4e0d\u8d77\u7684&#xff01;\u300f\u662f\u554a\u3002 \u4f46\u662f\u9e1f\u54e5\u8ba4\u4e3a&#xff0c;\u7528 Linux \u505a\u4e3a\u670d\u52a1\u5668\u4e3b\u673a\u65f6\u6bd5\u7adf\u8fd8\u662f\u6bd4\u8f83\u7a33\u5b9a\u4e00\u70b9&#xff0c;\u53ef\u4ee5 24 \u5c0f\u65f6\u4e14\u5168\u5e74\u65e0\u4f11\u7684\u52aa\u529b\u5de5\u4f5c\u5436\u3002\u6b64\u5916&#xff0c;\u56e0\u4e3a\u76ee\u524d\u900f\u8fc7\u300e\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u300f\u6765\u653b\u51fb\u5c40\u57df\u7f51\u7edc\u7684 Windows \u64cd\u4f5c\u7cfb\u7edf\u7684\u8ba1\u7b97\u673a\u75c5\u6bd2\u5b9e\u5728\u662f\u592a\u591a\u4e86&#xff0c;\u9632\u4e0d\u80dc\u9632&#xff0c; Linux \u5bf9\u4e8e\u8fd9\u6837\u7684\u653b\u51fb\u5e76\u6ca1\u6709\u5f88\u5927\u7684\u5f71\u54cd (\u56e0\u4e3a\u5e38\u89c1\u7684\u653b\u51fb\u624b\u6cd5\u5747\u9488\u5bf9 Windows \u800c\u6765&#xff5e;)&#xff0c;\u6240\u4ee5\u4e5f\u6bd4\u8f83\u5b89\u5168\u4e00\u4e9b\u8bf4&#xff5e;<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u7684\u5e94\u7528\u633a\u5e7f\u6cdb\u7684&#xff0c;\u5c24\u5176\u5bf9\u4e8e\u5c40\u57df\u7f51\u7edc\u5185\u7684\u8ba1\u7b97\u673a\u6765\u8bf4&#xff0c;\u66f4\u662f\u4e00\u9879\u4e0d\u53ef\u591a\u5f97\u7684\u597d\u7528\u7684\u670d\u52a1\u5668&#xff0c; \u867d\u7136\u6216\u8bb8\u4f60\u4f1a\u8bf4&#xff0c;SAMBA \u7684\u529f\u80fd\u4e0d\u8fc7\u662f\u6a21\u4eff Windows \u7684\u7f51\u82b3\u4ee5\u53ca AD \u76f8\u5173\u7684\u8f6f\u4ef6&#xff0c; \u90a3\u6211\u76f4\u63a5\u4f7f\u7528 Windows \u4e0d\u5c31 OK \u4e86&#xff1f;\u53ef\u60dc\u7684\u662f&#xff0c;\u00a0<span style=\"color:#000088\">Windows XP \u5bf9\u4e8e\u7f51\u82b3\u7684\u8054\u673a\u9650\u5236\u4f9d\u7248\u672c\u800c\u6709\u6240\u4e0d\u540c&#xff0c; \u4ee5\u4f01\u4e1a\u5e38\u89c1\u7684\u4e13\u4e1a\u7248 (Professional) \u6765\u8bf4&#xff0c;\u4ed6\u4ec5\u80fd\u63d0\u4f9b\u6700\u591a\u540c\u65f6\u5341\u4e2a\u8054\u673a\u5230\u7f51\u82b3\u7684\u8054\u673a\u80fd\u529b<\/span>&#xff0c;\u8fd9&#8230;\u4e0d\u592a\u591f\u7528\u5427&#xff01; \u6240\u4ee5\u5570&#xff0c;SAMBA \u7a33\u5b9a\u3001\u53ef\u9760\u53c8\u6ca1\u6709\u9650\u5236\u8054\u673a\u6570&#xff0c;\u503c\u5f97\u5b66\u4e60\u5427&#xff01;^_^&#xff01;\u66f4\u591a\u7684\u5e94\u7528\u4f60\u53ef\u4ee5\u81ea\u884c\u53d1\u6398\u5436&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134926-680258662a069.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.1.3 SAMBA \u4f7f\u7528\u7684 NetBIOS \u901a\u8baf\u534f\u8bae<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e8b\u5b9e\u4e0a&#xff0c;\u5c31\u50cf NFS \u662f\u67b6\u6784\u5728 RPC Server \u4e0a\u9762\u4e00\u6837&#xff0c; SAMBA \u8fd9\u4e2a\u6587\u4ef6\u7cfb\u7edf\u662f\u67b6\u6784\u5728\u00a0<span style=\"color:#000088\">NetBIOS (Network Basic Input\/Output System, NetBIOS)<\/span>\u00a0\u8fd9\u4e2a\u901a\u8baf\u534f\u8bae\u4e0a\u9762\u6240\u5f00\u53d1\u51fa\u6765\u7684\u3002\u65e2\u7136\u5982\u6b64&#xff0c;\u6211\u4eec\u5f53\u7136\u5c31\u8981\u4e86\u89e3\u4e00\u4e0b NetBIOS \u5570&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6700\u65e9 IBM \u53d1\u5c55\u51fa NetBIOS \u7684\u76ee\u7684\u4ec5\u662f\u8981\u8ba9\u5c40\u57df\u7f51\u7edc\u5185\u5c11\u6570\u8ba1\u7b97\u673a\u8fdb\u884c\u7f51\u7edc\u94fe\u63a5\u7684\u4e00\u4e2a\u901a\u8baf\u534f\u8bae\u800c\u5df2&#xff0c; \u6240\u4ee5\u8003\u8651\u7684\u89d2\u5ea6\u5e76\u4e0d\u662f\u9488\u5bf9\u5927\u578b\u7f51\u7edc&#xff0c;\u56e0\u6b64&#xff0c;\u8fd9\u4e2a\u00a0<span style=\"color:#000088\">NetBIOS \u662f\u65e0\u6cd5\u8de8\u8def\u7531\u7684 (Router \/ Gateway)<\/span>\u3002\u8fd9\u4e2a NetBIOS \u5728\u5c40\u57df\u7f51\u7edc\u5185\u5b9e\u5728\u662f\u5f88\u597d\u7528&#xff0c; \u6240\u4ee5\u5fae\u8f6f\u7684\u7f51\u7edc\u67b6\u6784\u5c31\u4f7f\u7528\u4e86\u8fd9\u4e2a\u549a\u549a\u6765\u8fdb\u884c\u6c9f\u901a\u7684\u5436&#xff01;\u800c SAMBA \u6700\u65e9\u53d1\u5c55\u7684\u65f6\u5019&#xff0c;\u5176\u5b9e\u662f\u60f3\u8981\u8ba9 Linux \u7cfb\u7edf\u53ef\u4ee5\u52a0\u5165 Windows \u7684\u7cfb\u7edf\u5f53\u4e2d\u6765\u5206\u4eab\u4f7f\u7528\u5f7c\u6b64\u7684\u6863\u6848\u6570\u636e\u7684&#xff0c;\u6240\u4ee5\u5f53\u7136 SAMBA \u5c31\u67b6\u6784\u5728 NetBIOS \u53d1\u5c55\u51fa\u6765\u5570\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0d\u8fc7 NetBIOS \u662f\u65e0\u6cd5\u8de8\u8def\u7531\u7684&#xff0c;\u56e0\u6b64\u4f7f\u7528 NetBIOS \u53d1\u5c55\u8d77\u6765\u7684\u670d\u52a1\u5668\u7406\u8bba\u4e0a\u4e5f\u662f\u65e0\u6cd5\u8de8\u8d8a\u8def\u7531\u7684\u5462&#xff01; \u90a3\u4e48\u8be5\u670d\u52a1\u5668\u7684\u4f7f\u7528\u8303\u56f4\u4e0d\u5c31\u53d7\u9650\u76f8\u5f53\u7684\u591a\u4e86&#xff1f;\u597d\u5728&#xff0c;\u6211\u4eec\u8fd8\u6709\u6240\u8c13\u7684\u00a0<span style=\"color:#000088\">NetBIOS over TCP\/IP<\/span>\u00a0\u7684\u6280\u672f\u5462&#xff01;\u8fd9\u662f\u4ec0\u4e48\u6837\u7684\u6280\u672f\u554a&#xff1f;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3e\u4e2a\u4f8b\u5b50\u6765\u8bf4\u597d\u4e86&#xff0c;\u6211\u4eec\u77e5\u9053 TCP\/IP \u662f\u76ee\u524d\u7f51\u7edc\u8fde\u63a5\u7684\u57fa\u672c\u534f\u8bae&#xff0c;\u73b0\u5728\u6211\u4eec\u5c06 NetBIOS \u60f3\u6210\u662f\u4e00\u5c01\u660e\u4fe1\u7247&#xff0c; \u8fd9\u4e2a\u660e\u4fe1\u7247\u53ea\u80fd\u8ba9\u4f60\u81ea\u5df1\u6b23\u8d4f\u800c\u5df2&#xff0c;\u5982\u679c\u4eca\u5929\u6211\u4eec\u8981\u5c06\u8fd9\u4e2a\u660e\u4fe1\u7247\u9001\u5230\u8fdc\u65b9\u7684\u670b\u53cb\u90a3\u8fb9\u65f6&#xff01;\u5c31\u9700\u8981\u900f\u8fc7\u90ae\u4ef6\u7cfb\u7edf (\u4f8b\u5982\u90ae\u5c40\u5566\u3001\u56fd\u9645\u5feb\u9012\u5566\u7b49\u7b49\u7684) \u6765\u4f20\u9001\u4e86&#xff01;\u8fd9\u4e2a TCP\/IP \u5c31\u53ef\u4ee5\u89c6\u4e3a\u90ae\u4ef6\u4f20\u9012\u7cfb\u7edf\u5566&#xff01;\u900f\u8fc7\u8fd9\u4e2a NetBIOS over TCP\/IP \u7684\u6280\u672f&#xff0c;\u6211\u4eec\u5c31\u53ef\u4ee5\u8de8\u8def\u7531\u7684\u4f7f\u7528 SAMBA \u670d\u52a1\u5668\u6240\u63d0\u4f9b\u7684\u529f\u80fd\u54af&#xff01; \u5f53\u7136\u5566&#xff0c;\u76ee\u524d SAMBA \u8fd8\u662f\u6bd4\u8f83\u5e7f\u6cdb\u7684\u4f7f\u7528\u5728 LAN \u91cc\u9762\u8bf4\u3002<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Tips:<span style=\"color:#009000\">\u6216\u8bb8\u4f60\u4f1a\u53d1\u73b0\u5728 Windows \u7f51\u7edc\u8bbe\u5b9a\u91cc\u9762\u5e38\u5e38\u770b\u5230 NetBEUI \u8fd9\u4e2a\u549a\u549a&#xff0c;\u90a3\u662f\u4ec0\u4e48\u5462&#xff1f;\u90a3\u4e2a\u662f NetBIOS Extened User Interface \u7684\u7b80\u5199&#xff0c;\u4e5f\u662f IBM \u5728 NetBIOS \u53d1\u5c55\u51fa\u6765\u4e4b\u540e\u7684\u6539\u826f\u7248\u672c\u3002\u867d\u7136\u8fd9\u4e24\u8005\u7684\u6280\u672f\u4e0d\u592a\u76f8\u540c&#xff0c; \u4e0d\u8fc7&#xff0c;\u6211\u4eec\u53ea\u8981\u77e5\u9053\u4e00\u4e9b\u7b80\u5355\u7684\u6982\u5ff5\u5c31\u53ef\u4ee5\u4e86&#xff01;\u6240\u4ee5&#xff0c;\u5728\u8fd9\u91cc\u6211\u4eec\u4e0d\u9488\u5bf9 NetBEUI \u6765\u4ecb\u7ecd\u3002<\/span><\/span><\/span><\/td>\n<td>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u9e1f\u54e5\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134926-680258666ad82.jpg\" width=\"534\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134926-68025866b0a5d.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.1.4 SAMBA \u4f7f\u7528\u7684 daemons<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">NetBIOS \u5f53\u521d\u53d1\u5c55\u65f6\u5c31\u7740\u773c\u5728\u5c40\u57df\u7f51\u7edc\u5185\u7684\u5feb\u901f\u6570\u636e\u4ea4\u6d41&#xff0c;\u800c\u56e0\u4e3a\u662f\u5b9a\u4e49\u5728\u5c40\u57df\u7f51\u7edc\u5185&#xff0c;\u56e0\u6b64\u4ed6\u5e76\u6ca1\u6709\u4f7f\u7528\u7c7b\u4f3c TCP\/IP \u4e4b\u7c7b\u7684\u4f20\u8f93\u534f\u8bae&#xff0c;\u4e5f\u5c31\u4e0d\u9700\u8981 IP \u7684\u8bbe\u5b9a\u3002\u5982\u6b64\u4e00\u6765\u6570\u636e\u5982\u4f55\u5728\u4e24\u90e8\u4e3b\u673a\u4e4b\u95f4\u4ea4\u6d41\u5462&#xff1f; \u5176\u5b9e\u4e3b\u673a\u5728 NetBIOS \u534f\u8bae\u5f53\u4e2d\u7684\u5b9a\u4e49\u4e3a\u4f7f\u7528\u300eNetBIOS Name\u300f&#xff0c;\u6bcf\u4e00\u90e8\u4e3b\u673a\u5fc5\u987b\u8981\u6709\u4e0d\u540c\u7684 NetBIOS Name \u624d\u884c&#xff0c; \u800c\u6863\u6848\u6570\u636e\u5c31\u662f\u5728\u4e0d\u540c\u7684 NetBIOS name \u4e4b\u95f4\u6c9f\u901a\u5570&#xff01;\u6211\u4eec\u4ee5\u4e00\u4e2a\u7f51\u82b3\u7684\u8bbe\u5b9a\u6765\u4f5c\u7b80\u5355\u7684\u8bf4\u660e\u597d\u4e86&#xff1a;<\/span><\/span><\/p>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u53d6\u5f97\u5bf9\u65b9\u4e3b\u673a\u7684 NetBIOS name \u5b9a\u4f4d\u8be5\u4e3b\u673a\u6240\u5728&#xff1a;<\/span> \u5f53\u6211\u4eec\u60f3\u8981\u767b\u5165\u67d0\u90e8 Windows \u4e3b\u673a\u4f7f\u7528\u4ed6\u6240\u63d0\u4f9b\u7684\u6863\u6848\u6570\u636e\u65f6&#xff0c;\u5fc5\u9700\u8981\u52a0\u5165\u8be5 Windows \u4e3b\u673a\u7684\u7fa4\u7ec4 (Workgroup)&#xff0c;\u5e76\u4e14\u6211\u4eec\u7684\u673a\u5668\u4e5f\u5fc5\u9700\u8981\u8bbe\u5b9a\u4e00\u4e2a\u4e3b\u673a\u540d&#xff0c;\u6ce8\u610f\u5594&#xff0c;\u8fd9\u4e2a\u4e3b\u673a\u540d\u8ddf Hostname \u662f\u4e0d\u4e00\u6837\u7684&#xff0c;\u56e0\u4e3a\u8fd9\u4e2a\u4e3b\u673a\u540d\u662f\u67b6\u6784\u5728 NetBIOS \u534f\u8bae\u4e0a\u7684&#xff0c;\u6211\u4eec\u53ef\u4ee5\u7b80\u5355\u7684\u79f0\u547c\u4ed6\u4e3a\u00a0<span style=\"color:#000088\">NetBIOS Name\u3002\u5728\u540c\u4e00\u4e2a\u7fa4\u7ec4\u5f53\u4e2d&#xff0c;NetBIOS Name \u5fc5\u9700\u8981\u662f\u72ec\u4e00\u65e0\u4e8c\u7684\u5594&#xff01;<\/span><\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u5229\u7528\u5bf9\u65b9\u7ed9\u4e88\u6743\u9650\u5b58\u53d6\u53ef\u7528\u8d44\u6e90&#xff1a;<\/span> \u5728\u6211\u4eec\u627e\u5230\u8be5\u4e3b\u673a\u540d\u540e&#xff0c;\u662f\u5426\u80fd\u767b\u5165\u8be5\u5bf9\u65b9\u4e3b\u673a\u6216\u8005\u662f\u53d6\u7528\u5bf9\u65b9\u4e3b\u673a\u6240\u63d0\u4f9b\u7684\u8d44\u6e90&#xff0c; \u8fd8\u8981\u770b\u5bf9\u65b9 Windows \u4e3b\u673a\u6709\u6ca1\u6709\u63d0\u4f9b\u6211\u4eec\u4f7f\u7528\u7684\u6743\u9650\u5436&#xff01;\u6240\u4ee5&#xff0c;\u5e76\u4e0d\u662f\u767b\u5165\u8be5 Windows \u4e3b\u673a\u4e4b\u540e\u6211\u4eec\u5c31\u53ef\u4ee5\u65e0\u9650\u5236\u7684\u53d6\u7528\u8be5\u4e3b\u673a\u7684\u6863\u6848\u8d44\u6e90\u4e86\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5982\u679c\u5bf9\u65b9\u4e3b\u673a\u5141\u8bb8\u4f60\u767b\u5165&#xff0c; \u4f46\u662f\u5374\u6ca1\u6709\u5f00\u653e\u4efb\u4f55\u8d44\u6e90\u8ba9\u4f60\u53d6\u7528&#xff0c;\u5475\u5475&#xff0c;\u767b\u5165\u4e3b\u673a\u4e5f\u65e0\u6cd5\u67e5\u770b\u5bf9\u65b9\u7684\u786c\u76d8\u91cc\u9762\u7684\u6570\u636e\u7684\u5566&#xff01;<\/span><\/span><\/li>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eec\u7684 SAMBA \u5219\u662f\u900f\u8fc7\u4e24\u652f\u670d\u52a1\u6765\u63a7\u5236\u8fd9\u4e24\u4e2a\u6b65\u9aa4&#xff0c;\u5206\u522b\u662f&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">nmbd &#xff1a;\u8fd9\u4e2a daemon \u662f\u7528\u6765\u7ba1\u7406\u5de5\u4f5c\u7ec4\u5566\u3001NetBIOS name \u5566\u7b49\u7b49\u7684\u89e3\u6790\u3002\u4e3b\u8981\u5229\u7528 UDP \u534f\u8bae\u5f00\u542f port 137, 138 \u6765\u8d1f\u8d23\u540d\u79f0\u89e3\u6790\u7684\u4efb\u52a1&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smbd &#xff1a;\u8fd9\u4e2a daemon \u7684\u4e3b\u8981\u529f\u80fd\u5c31\u662f\u7528\u6765\u7ba1\u7406 SAMBA \u4e3b\u673a\u5206\u4eab\u7684\u76ee\u5f55\u3001\u6863\u6848\u4e0e\u6253\u5370\u673a\u7b49\u7b49\u3002 \u4e3b\u8981\u5229\u7528\u53ef\u9760\u7684 TCP \u534f\u8bae\u6765\u4f20\u8f93\u6570\u636e&#xff0c;\u5f00\u653e\u7684\u7aef\u53e3\u4e3a 139 \u53ca 445(\u4e0d\u4e00\u5b9a\u5b58\u5728) \u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6240\u4ee5\u5570&#xff0c; SAMBA \u6bcf\u6b21\u542f\u52a8\u81f3\u5c11\u90fd\u9700\u8981\u6709\u8fd9\u4e24\u4e2a daemons \u5594&#xff01;\u8fd9\u53ef\u4e0d\u8981\u5fd8\u8bb0\u5570&#xff01;\u800c\u5f53\u6211\u4eec\u542f\u52a8\u4e86 SAMBA \u4e4b\u540e&#xff0c;\u4e3b\u673a\u7cfb\u7edf\u5c31\u4f1a\u542f\u52a8 137, 138 \u8fd9\u4e24\u4e2a UDP \u53ca 139 \u8fd9\u4e00\u4e2a TCP \u57e0\u53e3&#xff0c;\u8fd9\u4e5f\u4e0d\u8981\u5fd8\u8bb0\u4e86&#xff01; \u56e0\u4e3a\u540e\u9762\u8bbe\u5b9a\u9632\u706b\u5899\u7684\u65f6\u5019&#xff0c;\u8fd8\u4f1a\u4f7f\u7528\u5230\u8fd9\u4e09\u4e2a port \u7684\u5462&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134926-68025866f2bef.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.1.5 \u8054\u673a\u6a21\u5f0f\u7684\u4ecb\u7ecd (peer\/peer, domain model)<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u670d\u52a1\u5668\u7684\u5e94\u7528\u76f8\u5f53\u7684\u5e7f\u6cdb&#xff0c;\u800c\u4e14\u53ef\u4ee5\u4f9d\u7167\u4e0d\u540c\u7684\u7f51\u57df\u8054\u673a\u65b9\u5f0f&#xff0c;\u4e0e\u4e0d\u540c\u7684\u7528\u6237\u8d26\u53f7\u5bc6\u7801\u7684\u63a7\u7ba1\u65b9\u5f0f\u6765\u8fdb\u884c\u5206\u7c7b\u3002 \u4f8b\u5982\u6700\u5e38\u89c1\u7684 Workgroup \u53ca Domain \u4e24\u79cd\u65b9\u5f0f\u7684\u8054\u673a\u6a21\u5f0f\u5462&#xff01;\u5e95\u4e0b\u6211\u4eec\u5c31\u662f\u8981\u6765\u8c08\u4e00\u8c08\u8fd9\u4e24\u79cd\u6700\u5e38\u89c1\u7684\u5c40\u57df\u7f51\u7edc\u7684\u8054\u673a\u6a21\u5f0f&#xff1a; peer\/peer (\u5bf9\u7b49\u6a21\u5f0f) \u53ca domain model (\u4e3b\u63a7\u6a21\u5f0f)\u3002<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">peer\/peer (Workgroup model, \u5bf9\u7b49\u6a21\u5f0f)&#xff1a;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">peer \u6709\u540c\u7b49\u3001\u540c\u8f88\u7684\u610f\u601d\u5b58\u5728&#xff0c;\u6240\u4ee5\u7531\u5b57\u9762\u4e0a\u6765\u770b&#xff0c;peer\/peer \u5f53\u7136\u5c31\u662f\u6307\u4e24\u90e8\u4e3b\u673a\u7684\u5730\u4f4d\u76f8\u7b49\u5570&#xff01; \u8fd9\u662f\u4ec0\u4e48\u610f\u601d\u5462&#xff1f;\u7b80\u5355\u7684\u8bf4&#xff0c;\u5047\u5982\u5728\u5c40\u57df\u7f51\u7edc\u91cc\u9762\u7684\u6240\u6709 PC \u5747\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u8ba1\u7b97\u673a\u4e0a\u9762\u7ba1\u7406\u81ea\u5df1\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c; \u540c\u65f6\u6bcf\u4e00\u90e8\u8ba1\u7b97\u673a\u4e5f\u90fd\u5177\u6709\u72ec\u529b\u6267\u884c\u5404\u9879\u8f6f\u4ef6\u7684\u80fd\u529b&#xff0c;\u53ea\u662f\u85c9\u7531\u7f51\u7edc\u5c06\u5404\u4e2a PC \u94fe\u63a5\u5728\u4e00\u8d77\u800c\u5df2\u7684\u4e00\u4e2a\u67b6\u6784&#xff0c; \u6240\u4ee5&#xff0c;\u6bcf\u4e00\u90e8\u673a\u5668\u90fd\u662f\u53ef\u4ee5\u72ec\u7acb\u8fd0\u4f5c\u7684\u5594&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u6837\u7684\u67b6\u6784\u5728\u76ee\u524d\u5c0f\u578b\u529e\u516c\u5ba4\u91cc\u9762\u662f\u6700\u5e38\u89c1\u7684\u3002\u4f8b\u5982\u529e\u516c\u5ba4\u91cc\u9762\u6709\u5341\u4e2a\u4eba&#xff0c;\u6bcf\u4e2a\u4eba\u684c\u4e0a\u53ef\u80fd\u90fd\u5b89\u88c5\u6709\u4e00\u5957 Windows \u64cd\u4f5c\u7cfb\u7edf\u7684\u4e2a\u4eba\u8ba1\u7b97\u673a&#xff0c;\u800c\u8fd9\u5341\u90e8\u8ba1\u7b97\u673a\u90fd\u53ef\u4ee5\u72ec\u7acb\u8fdb\u884c\u529e\u516c\u5ba4\u8f6f\u4ef6\u7684\u6267\u884c\u554a\u3001\u72ec\u7acb\u4e0a\u7f51\u554a\u3001\u72ec\u7acb\u73a9\u6e38\u620f\u554a\u7b49\u7b49\u7684&#xff0c; \u56e0\u4e3a\u8fd9\u5341\u90e8\u8ba1\u7b97\u673a\u90fd\u53ef\u4ee5\u72ec\u7acb\u8fd0\u4f5c&#xff0c;\u6240\u4ee5\u4e0d\u4f1a\u6709\u4e00\u90e8\u8ba1\u7b97\u673a\u5173\u6389&#xff0c;\u5176\u4ed6\u7684\u8ba1\u7b97\u673a\u5c31\u65e0\u6cd5\u5de5\u4f5c\u7684\u60c5\u51b5\u53d1\u751f&#xff0c;\u8fd9\u5c31\u662f peer\/peer \u7684\u5178\u578b\u67b6\u6784\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u5728\u8fd9\u6837\u7684\u67b6\u6784\u5e95\u4e0b&#xff0c;\u8981\u5982\u4f55\u900f\u8fc7\u7f51\u7edc\u8054\u673a\u6765\u53d6\u5f97\u5bf9\u65b9\u7684\u6570\u636e\u5462&#xff1f;\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u4ee5\u4e0b\u56fe\u7684\u67b6\u6784\u4e3a\u4f8b&#xff0c;\u5728\u8fd9\u6837\u7684\u67b6\u6784\u4e0b&#xff0c;\u5047\u8bbe vbird (PC A) \u5199\u4e86\u4e00\u4e2a\u62a5\u544a\u4e66&#xff0c;\u800c dmtsai (PC B) \u60f3\u8981\u4ee5\u7f51\u7edc\u76f4\u63a5\u53d6\u7528\u8fd9\u4e2a\u62a5\u544a\u4e66\u65f6&#xff0c;\u90a3 dmtsai \u5c31\u5fc5\u987b\u8981\u77e5\u9053 vbird \u4f7f\u7528\u7684\u5bc6\u7801&#xff0c;\u5e76\u4e14 vbird \u5fc5\u987b\u8981\u5728 PC A \u4e0a\u9762\u542f\u7528 Windows \u7684\u300e\u8d44\u6e90\u5171\u4eab(\u6216\u8005\u662f\u5171\u4eab)\u300f\u4e4b\u540e&#xff0c;\u624d\u80fd\u591f\u8ba9 dmtsai \u8054\u673a\u8fdb\u5165\u5594 (\u6b64\u65f6 PC A \u4e3a Server) &#xff01;\u800c\u4e14&#xff0c; vbird \u53ef\u4ee5\u968f\u65f6\u4f9d\u7167\u81ea\u5df1\u7684\u559c\u597d\u6765\u66f4\u6539\u81ea\u5df1\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u800c\u4e0d\u53d7 dmtsai \u7684\u5f71\u54cd\u3002\u4e0d\u8fc7&#xff0c;dmtsai \u5c31\u5f97\u8981\u53d6\u5f97 vbird \u540c\u610f\u53d6\u5f97\u65b0\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u540e&#xff0c;\u624d\u80fd\u591f\u767b\u5165 PC A \u5594&#xff01;\u53cd\u8fc7\u6765\u8bf4&#xff0c;\u540c\u6837\u7684&#xff0c; vbird \u8981\u53d6\u5f97 dmtsai \u7684\u6570\u636e\u65f6&#xff0c;\u540c\u6837\u9700\u8981\u53d6\u5f97 PC B \u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u540e&#xff0c;\u624d\u80fd\u591f\u987a\u5229\u767b\u5165\u554a (\u6b64\u65f6 PC A \u4e3a Client \u5594)&#xff01;\u56e0\u4e3a PC A, PC B \u7684\u89d2\u8272\u4e0e\u5730\u4f4d\u90fd\u540c\u65f6\u53ef\u4ee5\u4e3a Client \u4e0e Server &#xff0c;\u6240\u4ee5\u5c31\u662f peer\/peer \u7684\u67b6\u6784\u4e86&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"peer\/peer \u8054\u673a\u7684\u793a\u610f\u56fe\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134927-6802586740361.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.1-1\u3001peer\/peer \u8054\u673a\u7684\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f7f\u7528 peer\/peer \u7684\u67b6\u6784\u7684\u597d\u5904\u662f\u6bcf\u90e8\u8ba1\u7b97\u673a\u5747\u53ef\u4ee5\u72ec\u7acb\u8fd0\u4f5c&#xff0c;\u800c\u4e0d\u53d7\u4ed6\u4eba\u7684\u5f71\u54cd&#xff01;\u4e0d\u8fc7&#xff0c; \u7f3a\u70b9\u5c31\u662f\u5f53\u6574\u4e2a\u7f51\u57df\u5185\u7684\u6240\u6709\u4eba\u5458\u90fd\u8981\u8fdb\u884c\u6570\u636e\u5206\u4eab\u65f6&#xff0c;\u5149\u662f\u77e5\u9053\u6240\u6709\u8ba1\u7b97\u673a\u91cc\u9762\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u5c31\u4f1a\u5f88\u4f24\u8111\u7b4b\u4e86&#xff01; \u6240\u4ee5&#xff0c; Peer\/Peer \u7684\u67b6\u6784\u662f\u6bd4\u8f83\u9002\u5408\u00a0<span style=\"color:#000088\">(1)\u5c0f\u578b\u7684\u7f51\u57df&#xff0c;\u6216\u8005\u662f (2)\u6ca1\u6709\u9700\u8981\u5e38\u5e38\u8fdb\u884c\u6863\u6848\u6570\u636e\u5206\u4eab\u7684\u7f51\u7edc\u73af\u5883&#xff0c;\u6216\u8005\u662f (3)\u6bcf\u4e2a\u4f7f\u7528\u8005\u90fd\u72ec\u81ea\u62e5\u6709\u8be5\u8ba1\u7b97\u673a\u7684\u62e5\u6709\u6743(\u5c31\u662f\u8bf4&#xff0c;\u8be5\u8ba1\u7b97\u673a\u662f\u7528\u6237\u7684&#xff0c;\u800c\u4e0d\u662f\u516c\u7528\u7684\u5566&#xff01;)<\/span>\u00a0\u800c&#xff0c;\u5982\u679c\u8be5\u5355\u4f4d\u7684\u6240\u6709 PC \u5747\u662f\u516c\u6709\u7684 (\u4f8b\u5982\u5b66\u6821\u7684\u8ba1\u7b97\u673a\u6559\u5ba4\u73af\u5883)&#xff0c;\u800c\u4e14\u4f60\u9700\u8981\u7edf\u4e00\u63a7\u7ba1\u6574\u4e2a\u7f51\u57df\u91cc\u9762\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u7684\u8bdd&#xff0c; \u90a3\u5c31\u5f97\u4f7f\u7528\u5e95\u4e0b\u7684 domain models \u4e86&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">domain model (\u4e3b\u63a7\u6a21\u5f0f)<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5047\u8bbe\u4eca\u5929\u4f60\u670d\u52a1\u7684\u5355\u4f4d\u6709 10 \u90e8\u8ba1\u7b97\u673a&#xff0c;\u4f46\u662f\u4f60\u7684\u5355\u4f4d\u6709 20 \u4e2a\u5458\u5de5&#xff0c;\u8fd9\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u8fd9 20 \u4e2a\u5458\u5de5\u8f6e\u6d41\u62a2\u7740\u7528\u8fd9 10 \u90e8\u8ba1\u7b97\u673a\u3002\u5982\u679c\u6bcf\u90e8\u8ba1\u7b97\u673a\u90fd\u5982\u540c peer\/peer \u7684\u67b6\u6784\u65f6&#xff0c;\u90a3\u4e48\u6bcf\u90e8\u8ba1\u7b97\u673a\u90fd\u9700\u8981\u8f93\u5165\u8fd9 20 \u4e2a\u5458\u5de5\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u6765\u63d0\u4f9b\u4ed6\u4eec\u767b\u5165\u5594\u3002\u800c\u4e14&#xff0c;\u4eca\u5929\u5047\u5982\u6709\u4e2a\u5458\u5de5\u60f3\u8981\u53d8\u66f4\u81ea\u5df1\u7684\u5bc6\u7801\u65f6&#xff0c;\u5c31\u9700\u8981\u5230 10 \u53f0\u8ba1\u7b97\u673a\u4e0a\u9762\u8fdb\u884c\u5bc6\u7801\u53d8\u66f4\u7684\u4f5c\u4e1a&#xff01;\u5426\u5219\u4ed6\u5c31\u5fc5\u987b\u8981\u8bb0\u5f97\u8fd9 10 \u90e8\u8ba1\u7b97\u673a\u91cc\u9762&#xff0c;\u90a3\u4e00\u90e8\u8ba1\u7b97\u673a\u662f\u8bb0\u5fc6\u90a3\u4e00\u4e2a\u5bc6\u7801&#8230;\u597d\u70e6\u90a3&#xff5e;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4e0a\u8ff0\u662f\u8fd9\u6837\u7684\u60c5\u51b5&#xff0c;\u4f7f\u7528 peer\/peer \u67b6\u6784\u5c31\u4e0d\u662f\u4e00\u4e2a\u597d\u65b9\u6cd5\u4e86&#xff01;\u8fd9\u4e2a\u65f6\u5019\u5c31\u9700\u8981\u85c9\u7531 domain model \u6765\u8fbe\u6210\u4f60\u7684\u9700\u6c42\u5566&#xff01;\u6240\u8c13\u7684 domain model \u6982\u5ff5\u5176\u5b9e\u4e5f\u5f88\u7b80\u5355&#xff0c;\u65e2\u7136\u4f7f\u7528\u8ba1\u7b97\u673a\u8d44\u6e90\u9700\u8981\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c; \u90a3\u4e48\u6211\u5c06\u6240\u6709\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u90fd\u653e\u7f6e\u5728\u4e00\u90e8\u4e3b\u63a7\u8ba1\u7b97\u673a (<span style=\"color:#000088\">Primary Domain Controller, PDC<\/span>) \u4e0a\u9762&#xff0c;\u5728\u6211\u7684\u7f51\u57df\u91cc\u9762&#xff0c;\u4efb\u4f55\u4eba\u60f3\u8981\u4f7f\u7528\u4efb\u4f55\u8ba1\u7b97\u673a\u65f6&#xff0c;\u90fd\u9700\u8981\u5728\u5c4f\u5e55\u524d\u65b9\u8f93\u5165\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u7136\u540e\u901a\u901a\u85c9\u7531 PDC \u670d\u52a1\u5668\u7684\u8fa8\u8bc6\u540e&#xff0c;\u624d\u7ed9\u4e88\u9002\u5f53\u7684\u6743\u9650\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u4e0d\u540c\u7684\u8eab\u4efd\u8fd8\u5177\u6709\u4e0d\u4e00\u6837\u7684\u8ba1\u7b97\u673a\u8d44\u6e90\u6743\u9650\u5c31\u662f\u4e86&#xff01; \u4f8b\u5982\u5e95\u4e0b\u7684\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.1-2\u3001domain model \u8054\u673a\u7684\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">PDC \u670d\u52a1\u5668\u63a7\u7ba1\u6574\u4e2a\u7f51\u57df\u91cc\u9762\u7684\u5404\u4e2a\u673a\u5668 (PC A ~ PC D) \u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u7684\u4fe1\u606f&#xff0c;\u5047\u5982\u4eca\u5929\u6709\u4e2a\u4f7f\u7528\u8005\u8d26\u53f7\u540d\u79f0\u4e3a vbird &#xff0c;\u4e14\u5bc6\u7801\u4e3a 12345 \u65f6&#xff0c;\u4ed6\u4e0d\u8bba\u4f7f\u7528\u54ea\u4e00\u90e8\u8ba1\u7b97\u673a (PC A ~ PC D) \u53ea\u8981\u5728\u5c4f\u5e55\u524d\u65b9\u8f93\u5165 vbird \u4e0e\u4ed6\u7684\u5bc6\u7801&#xff0c;\u5219\u8be5\u673a\u5668\u4f1a\u5148\u5230 PDC \u4e0a\u9762\u67e5\u9a8c\u662f\u5426\u6709 vbird \u4ee5\u53ca vbird \u7684\u5bc6\u7801&#xff0c;\u5e76\u4e14 PDC \u4e3b\u673a\u4f1a\u7ed9\u4e88 vbird \u8fd9\u4e2a\u7528\u6237\u76f8\u5173\u7684\u8ba1\u7b97\u673a\u8d44\u6e90\u6743\u9650\u3002\u5f53 vbird \u5728\u4efb\u4f55\u4e00\u90e8\u4e3b\u673a\u4e0a\u9762\u767b\u5165\u6210\u529f\u540e&#xff0c;\u4ed6\u5c31\u53ef\u4ee5\u4f7f\u7528\u76f8\u5173\u7684\u8ba1\u7b97\u673a\u8d44\u6e90\u4e86&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u6837\u7684\u67b6\u6784\u6bd4\u8f83\u9002\u5408\u4eba\u6765\u4eba\u5f80\u7684\u4f01\u4e1a\u67b6\u6784&#xff0c;\u5f53\u7cfb\u7edf\u7ba1\u7406\u5458\u8981\u63a7\u7ba1\u65b0\u8fdb\u4eba\u5458\u7684\u8ba1\u7b97\u673a\u8d44\u6e90\u4f7f\u7528\u6743\u65f6&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u9488\u5bf9 PDC \u6765\u4fee\u6539\u5c31\u597d\u4e86&#xff0c;\u4e0d\u9700\u8981\u6bcf\u4e00\u90e8\u4e3b\u673a\u90fd\u53bb\u4fee\u4fee\u6539\u6539\u7684&#xff0c;\u5bf9\u4e8e\u7cfb\u7edf\u7ba1\u7406\u5458\u6765\u8bf4&#xff0c;\u8fd9\u6837\u7684\u67b6\u6784\u5728\u63a7\u7ba1\u8d26\u53f7\u8d44\u6e90\u4e0a&#xff0c;\u5f53\u7136\u662f\u6bd4\u8f83\u7b80\u5355\u7684\u5566&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5404\u79cd\u67b6\u6784\u9002\u7528\u7684\u73af\u5883\u4e0e\u9002\u7528\u7684\u4eba\u90fd\u4e0d\u76f8\u540c&#xff0c;\u5e76\u6ca1\u6709\u90a3\u4e2a\u662f\u6700\u597d\u5566&#xff01;\u8bf7\u4f9d\u7167\u4f60\u7684\u5de5\u4f5c\u73af\u5883\u6765\u9009\u62e9\u8054\u673a\u7684\u6a21\u5f0f\u5570&#xff01;\u5f53\u7136&#xff0c; SAMBA \u53ef\u4ee5\u8fbe\u5230\u4e0a\u8ff0\u4e24\u79cd\u6a21\u5f0f\u7684\u5566&#xff01;\u5e95\u4e0b\u6211\u4eec\u4f1a\u5206\u522b\u6765\u4ecb\u7ecd\u5594&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.2 SAMBA \u670d\u52a1\u5668\u7684\u57fa\u7840\u8bbe\u5b9a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u8fd9\u4e2a\u8f6f\u4ef6\u51e0\u4e4e\u5728\u6240\u6709\u7684 Linux distributions \u4e0a\u9762\u90fd\u6709\u63d0\u4f9b&#xff0c;\u56e0\u4e3a\u5373\u4f7f\u4f60\u7684 Linux \u4ec5\u505a\u4e3a\u4e2a\u4eba\u684c\u9762\u8ba1\u7b97\u673a\u4f7f\u7528\u65f6&#xff0c; \u4f60\u4f9d\u65e7\u53ef\u80fd\u4f1a\u9700\u8981\u8054\u673a\u5230\u8fdc\u7a0b\u7684 Windows \u7f51\u82b3&#xff0c;\u90a3\u4e2a\u65f6\u5019\u5c31\u5f97\u8981 samba \u63d0\u4f9b\u7684\u5ba2\u6237\u7aef\u8f6f\u4ef6\u529f\u80fd\u5570&#xff01; \u56e0\u6b64\u4f60\u53ea\u8981\u76f4\u63a5\u5b89\u88c5\u7cfb\u7edf\u4e0a\u9762\u63d0\u4f9b\u7684\u9ed8\u8ba4 samba \u7248\u672c\u5373\u53ef\u3002\u5e95\u4e0b\u6211\u4eec\u4f1a\u5148\u4ecb\u7ecd samba \u670d\u52a1\u5668&#xff0c;\u7136\u540e\u518d\u4ecb\u7ecd\u5ba2\u6237\u7aef\u529f\u80fd\u5594&#xff01;<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.1 Samba \u6240\u9700\u8f6f\u4ef6\u53ca\u5176\u8f6f\u4ef6\u7ed3\u6784<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u76ee\u524d\u5e38\u89c1\u7684 samba \u7248\u672c\u4e3a 3.x \u7248&#xff0c;\u65e7\u7248\u7684 2.x \u7248\u5728\u8bbe\u5b9a\u4e0a\u6709\u70b9\u4e0d\u4e00\u6837&#xff0c;\u56e0\u6b64\u5728\u8fdb\u5165\u8bbe\u5b9a\u524d\u8bf7\u5148\u786e\u8ba4\u4f60\u7684 samba \u7248\u672c\u3002 \u54b1\u4eec\u7684 CentOS 6.x \u4e3b\u8981\u63d0\u4f9b\u7684\u662f Samba 3.x \u7684\u7248\u672c&#xff0c;\u4e0d\u8fc7\u4e5f\u6709\u91ca\u51fa 4.x \u7684\u7248\u672c (samba4)&#xff0c;\u6211\u4eec\u8fd9\u91cc\u4e3b\u8981\u4ecb\u7ecd\u7684\u662f\u9884\u8bbe\u7684 3.x \u7248\u672c\u7684\u3002\u90a3\u4e48\u4f60\u9700\u8981\u4ec0\u4e48\u8f6f\u4ef6\u5462&#xff1f;\u57fa\u672c\u4e0a\u6709\u8fd9\u4e9b&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">samba<\/span>&#xff1a; \u8fd9\u4e2a\u8f6f\u4ef6\u4e3b\u8981\u63d0\u4f9b\u4e86 SMB \u670d\u52a1\u5668\u6240\u9700\u7684\u5404\u9879\u670d\u52a1\u7a0b\u5e8f (smbd \u53ca nmbd)\u3001 \u7684\u6587\u4ef6\u6863\u3001\u4ee5\u53ca\u5176\u4ed6\u4e0e SAMBA \u76f8\u5173\u7684 logrotate \u914d\u7f6e\u6587\u4ef6\u53ca\u5f00\u673a\u9ed8\u8ba4\u9009\u9879\u6863\u6848\u7b49&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">samba-client<\/span>&#xff1a; \u8fd9\u4e2a\u8f6f\u4ef6\u5219\u63d0\u4f9b\u4e86\u5f53 Linux \u505a\u4e3a SAMBA Client \u7aef\u65f6&#xff0c;\u6240\u9700\u8981\u7684\u5de5\u5177\u6307\u4ee4&#xff0c;\u4f8b\u5982\u6302\u8f7d SAMBA \u6587\u4ef6\u683c\u5f0f\u7684 mount.cifs\u3001 \u53d6\u5f97\u7c7b\u4f3c\u7f51\u82b3\u76f8\u5173\u6811\u5f62\u56fe\u7684 smbtree \u7b49\u7b49&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">samba-common<\/span>&#xff1a; \u8fd9\u4e2a\u8f6f\u4ef6\u63d0\u4f9b\u7684\u5219\u662f\u670d\u52a1\u5668\u4e0e\u5ba2\u6237\u7aef\u90fd\u4f1a\u4f7f\u7528\u5230\u7684\u6570\u636e&#xff0c;\u5305\u62ec SAMBA \u7684\u4e3b\u8981\u914d\u7f6e\u6587\u4ef6 (smb.conf)\u3001\u8bed\u6cd5\u68c0\u9a8c\u6307\u4ee4 (testparm) \u7b49\u7b49&#xff1b;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u4e09\u4e2a\u8f6f\u4ef6\u4f60\u90fd\u5f97\u8981\u5b89\u88c5\u624d\u884c\u5594&#xff01;\u5982\u679c\u5c1a\u672a\u5b89\u88c5\u7684\u8bdd&#xff0c;\u4f7f\u7528 yum \u53bb\u88c5\u597d\u5b83\u5427&#xff01;\u5b89\u88c5\u5b8c\u6bd5\u4e4b\u540e&#xff0c;\u4f60\u53ef\u4ee5\u4f9d\u5e8f\u5bdf\u770b\u4e00\u4e0b Samba \u7684\u8f6f\u4ef6\u7ed3\u6784\u5594&#xff01;\u4e0e\u5b83\u76f8\u5173\u7684\u914d\u7f6e\u6587\u4ef6\u57fa\u672c\u4e0a\u6709\u8fd9\u4e9b&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/etc\/samba\/smb.conf<\/span>&#xff1a; \u8fd9\u662f Samba \u7684\u4e3b\u8981\u914d\u7f6e\u6587\u4ef6&#xff0c;\u57fa\u672c\u4e0a&#xff0c;\u54b1\u4eec\u7684 Samba \u5c31\u4ec5\u6709\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u800c\u5df2&#xff0c;\u4e14\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u672c\u8eab\u5c31\u662f\u5f88\u8be6\u7ec6\u7684\u8bf4\u660e\u6587\u4ef6\u4e86&#xff0c;\u8bf7\u7528 vim \u53bb\u67e5\u9605\u5b83\u5427&#xff01;\u4e3b\u8981\u7684\u8bbe\u5b9a\u9879\u76ee\u5206\u4e3a\u670d\u52a1\u5668\u7684\u76f8\u5173\u8bbe\u5b9a (global)&#xff0c;\u5982\u5de5\u4f5c\u7ec4\u3001NetBIOS \u540d\u79f0\u4e0e\u5bc6\u7801\u7b49\u7ea7\u7b49&#xff0c; \u4ee5\u53ca\u5206\u4eab\u7684\u76ee\u5f55\u7b49\u76f8\u5173\u8bbe\u5b9a&#xff0c;\u5982\u5b9e\u9645\u76ee\u5f55\u3001\u5206\u4eab\u8d44\u6e90\u540d\u79f0\u4e0e\u6743\u9650\u7b49\u7b49\u4e24\u5927\u90e8\u5206\u3002<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/etc\/samba\/lmhosts<\/span>&#xff1a; \u65e9\u671f\u7684 NetBIOS name \u9700\u989d\u5916\u8bbe\u5b9a&#xff0c;\u56e0\u6b64\u9700\u8981\u8fd9\u4e2a lmhosts \u7684<span style=\"color:#000088\">\u00a0NetBIOS name \u5bf9\u5e94\u7684 IP<\/span>\u00a0\u6a94\u3002 \u4e8b\u5b9e\u4e0a\u5b83\u6709\u70b9\u50cf\u662f \/etc\/hosts \u7684\u529f\u80fd&#xff01;\u53ea\u4e0d\u8fc7\u8fd9\u4e2a lmhosts \u5bf9\u5e94\u7684\u4e3b\u673a\u540d\u662f NetBIOS name \u5594&#xff01;\u4e0d\u8981\u8ddf \/etc\/hosts \u641e\u6df7\u4e86&#xff01;\u76ee\u524d Samba \u9884\u8bbe\u4f1a\u53bb\u4f7f\u7528\u4f60\u7684\u672c\u673a\u540d\u79f0 (hostname) \u4f5c\u4e3a\u4f60\u7684 NetBIOS name&#xff0c;\u56e0\u6b64\u8fd9\u4e2a\u6863\u6848\u4e0d\u8bbe\u5b9a\u4e5f\u65e0\u6240\u8c13\u3002<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/etc\/sysconfig\/samba<\/span>&#xff1a; \u63d0\u4f9b\u542f\u52a8 smbd, nmbd \u65f6&#xff0c;\u4f60\u8fd8\u60f3\u8981\u52a0\u5165\u7684\u76f8\u5173\u670d\u52a1\u53c2\u6570\u3002<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/etc\/samba\/smbusers<\/span>&#xff1a; \u7531\u4e8e Windows \u4e0e Linux \u5728\u7ba1\u7406\u5458\u4e0e\u8bbf\u5ba2\u7684\u8d26\u53f7\u540d\u79f0\u4e0d\u4e00\u81f4&#xff0c;\u4f8b\u5982&#xff1a; administrator (windows) \u53ca root(linux)&#xff0c; \u4e3a\u4e86\u5bf9\u5e94\u8fd9\u4e24\u8005\u4e4b\u95f4\u7684\u8d26\u53f7\u5173\u7cfb&#xff0c;\u53ef\u4f7f\u7528\u8fd9\u4e2a\u6863\u6848\u6765\u8bbe\u5b9a<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/var\/lib\/samba\/private\/{passdb.tdb,secrets.tdb}<\/span>&#xff1a; \u7ba1\u7406 Samba \u7684\u7528\u6237\u8d26\u53f7\/\u5bc6\u7801\u65f6&#xff0c;\u4f1a\u7528\u5230\u7684\u6570\u636e\u5e93\u6863\u6848&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/share\/doc\/samba-&lt;\u7248\u672c&gt;<\/span>&#xff1a; \u8fd9\u4e2a\u76ee\u5f55\u5305\u542b\u4e86 SAMBA \u7684\u6240\u6709\u76f8\u5173\u7684\u6280\u672f\u624b\u518c\u5594&#xff01;\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5f53\u4f60\u5b89\u88c5\u597d\u4e86 SAMBA \u4e4b\u540e&#xff0c;\u4f60\u7684\u7cfb\u7edf\u91cc\u9762\u5c31\u5df2\u7ecf\u542b\u6709\u76f8\u5f53\u4e30\u5bcc\u800c\u5b8c\u6574\u7684 SAMBA \u4f7f\u7528\u624b\u518c\u4e86&#xff01;\u503c\u5f97\u9ad8\u5174\u5427&#xff01; ^_^&#xff0c;\u6240\u4ee5&#xff0c;\u8d76\u7d27\u81ea\u884c\u53c2\u8003\u5594&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u81f3\u4e8e\u5e38\u7528\u7684\u811a\u672c\u6587\u4ef6\u6848\u65b9\u9762&#xff0c;\u82e5\u5206\u4e3a\u670d\u52a1\u5668\u4e0e\u5ba2\u6237\u7aef\u529f\u80fd&#xff0c;\u5219\u4e3b\u8981\u6709\u5e95\u4e0b\u8fd9\u51e0\u4e2a\u6570\u636e&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/sbin\/{smbd,nmbd}<\/span>&#xff1a;\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u5c31\u662f\u6700\u91cd\u8981\u7684\u6743\u9650\u7ba1\u7406 (smbd) \u4ee5\u53ca NetBIOS name \u67e5\u8be2 (nmbd) \u4e24\u4e2a\u91cd\u8981\u7684\u670d\u52a1\u7a0b\u5e8f&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/{tdbdump,tdbtool}<\/span>&#xff1a;\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u5728 Samba 3.0 \u4ee5\u540e\u7684\u7248\u672c\u4e2d&#xff0c;\u7528\u6237\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u53c2\u6570\u5df2\u7ecf\u8f6c\u4e3a\u4f7f\u7528\u6570\u636e\u5e93\u4e86&#xff01;Samba \u4f7f\u7528\u7684\u6570\u636e\u5e93\u540d\u79f0\u4e3a TDB (Trivial DataBase)\u3002 \u65e2\u7136\u662f\u4f7f\u7528\u6570\u636e\u5e93&#xff0c;\u5f53\u7136\u8981\u4f7f\u7528\u6570\u636e\u5e93\u7684\u63a7\u5236\u6307\u4ee4\u6765\u5904\u7406\u5570\u3002tdbdump \u53ef\u4ee5\u5bdf\u770b\u6570\u636e\u5e93\u7684\u5185\u5bb9&#xff0c;tdbtool \u5219\u53ef\u4ee5\u8fdb\u5165\u6570\u636e\u5e93\u64cd\u4f5c\u63a5\u53e3\u76f4\u63a5\u624b\u52a8\u4fee\u6539\u5e10\u5bc6\u53c2\u6570\u3002\u4e0d\u8fc7&#xff0c;<span style=\"color:#000088\">\u4f60\u5f97\u8981\u5b89\u88c5 tdb-tools \u8fd9\u4e2a\u8f6f\u4ef6<\/span>\u624d\u884c&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/smbstatus<\/span>&#xff1a;\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u53ef\u4ee5\u5217\u51fa\u76ee\u524d Samba \u7684\u8054\u673a\u72b6\u51b5&#xff0c; \u5305\u62ec\u6bcf\u4e00\u6761 Samba \u8054\u673a\u7684 PID, \u5206\u4eab\u7684\u8d44\u6e90&#xff0c;\u4f7f\u7528\u7684\u7528\u6237\u6765\u6e90\u7b49\u7b49&#xff0c;\u8ba9\u4f60\u8f7b\u677e\u7ba1\u7406 Samba \u5566&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/{smbpasswd,pdbedit}<\/span>&#xff1a;\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u5728\u7ba1\u7406 Samba \u7684\u7528\u6237\u8d26\u53f7\u5bc6\u7801\u65f6&#xff0c; \u65e9\u671f\u662f\u4f7f\u7528 smbpasswd \u8fd9\u4e2a\u6307\u4ee4&#xff0c;\u4e0d\u8fc7\u56e0\u4e3a\u540e\u6765\u4f7f\u7528 TDB \u6570\u636e\u5e93\u4e86&#xff0c;\u56e0\u6b64\u5efa\u8bae\u4f7f\u7528\u65b0\u7684 pdbedit \u6307\u4ee4\u6765\u7ba1\u7406\u7528\u6237\u6570\u636e&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/testparm<\/span>&#xff1a;\u670d\u52a1\u5668\u529f\u80fd&#xff0c;\u8fd9\u4e2a\u6307\u4ee4\u4e3b\u8981\u5728\u68c0\u9a8c\u914d\u7f6e\u6587\u4ef6 smb.conf \u7684\u8bed\u6cd5\u6b63\u786e\u4e0e\u5426&#xff0c;\u5f53\u4f60\u7f16\u8f91\u8fc7 smb.conf \u65f6&#xff0c;\u8bf7\u52a1\u5fc5\u4f7f\u7528\u8fd9\u4e2a\u6307\u4ee4\u6765\u68c0\u67e5\u4e00\u6b21&#xff0c;\u907f\u514d\u56e0\u4e3a\u6253\u5b57\u9519\u8bef\u5f15\u8d77\u7684\u56f0\u6270\u554a&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/sbin\/mount.cifs<\/span>&#xff1a;\u5ba2\u6237\u7aef\u529f\u80fd&#xff0c;\u5728 Windows \u4e0a\u9762\u6211\u4eec\u53ef\u4ee5\u8bbe\u5b9a\u300e\u7f51\u7edc\u9a71\u52a8\u5668\u673a\u300f\u6765\u8fde\u63a5\u5230\u81ea\u5df1\u7684\u4e3b\u673a\u4e0a\u9762\u3002\u5728 Linux \u4e0a\u9762&#xff0c;\u6211\u4eec\u5219\u662f\u900f\u8fc7 mount (mount.cifs) \u6765\u5c06\u8fdc\u7a0b\u4e3b\u673a\u5206\u4eab\u7684\u6863\u6848\u4e0e\u76ee\u5f55\u6302\u8f7d\u5230\u81ea\u5df1\u7684 Linux \u4e3b\u673a\u4e0a\u9762\u54ea&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/smbclient<\/span>&#xff1a;\u5ba2\u6237\u7aef\u529f\u80fd&#xff0c;\u5f53\u4f60\u7684 Linux \u4e3b\u673a\u60f3\u8981\u85c9\u7531\u300e\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u300f\u7684\u529f\u80fd\u6765\u67e5\u770b\u522b\u53f0\u8ba1\u7b97\u673a\u6240\u5206\u4eab\u51fa\u6765\u7684\u76ee\u5f55\u4e0e\u88c5\u7f6e\u65f6&#xff0c;\u5c31\u53ef\u4ee5\u4f7f\u7528 smbclient \u6765\u67e5\u770b\u5566&#xff01;\u8fd9\u4e2a\u6307\u4ee4\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5728\u81ea\u5df1\u7684 SAMBA \u4e3b\u673a\u4e0a\u9762&#xff0c;\u7528\u6765\u67e5\u770b\u662f\u5426\u8bbe\u5b9a\u6210\u529f\u54e9&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/nmblookup<\/span>&#xff1a;\u5ba2\u6237\u7aef\u529f\u80fd&#xff0c;\u6709\u70b9\u7c7b\u4f3c nslookup \u5566&#xff01;\u91cd\u70b9\u5728\u67e5\u51fa NetBIOS name \u5c31\u662f\u4e86\u3002<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\/usr\/bin\/smbtree<\/span>&#xff1a;\u5ba2\u6237\u7aef\u529f\u80fd&#xff0c;\u8fd9\u73a9\u610f\u5c31\u6709\u70b9\u50cf Windows \u7cfb\u7edf\u7684\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u663e\u793a\u7684\u7ed3\u679c&#xff0c;\u53ef\u4ee5\u663e\u793a\u7c7b\u4f3c\u300e\u9760\u8fd1\u6211\u7684\u8ba1\u7b97\u673a\u300f\u4e4b\u7c7b\u7684\u6570\u636e&#xff0c; \u80fd\u591f\u67e5\u5230\u5de5\u4f5c\u7ec4\u4e0e\u8ba1\u7b97\u673a\u540d\u79f0\u7684\u6811\u72b6\u76ee\u5f55\u5206\u5e03\u56fe&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5927\u81f4\u7684\u8f6f\u4ef6\u7ed3\u6784\u5c31\u662f\u8fd9\u6837&#xff0c;\u5e95\u4e0b\u5c31\u51c6\u5907\u6765\u8bb2\u4e00\u4e2a\u7b80\u5355\u7684\u6848\u4f8b\u5427&#xff01;\u8fd9\u6837\u6bd4\u8f83\u597d\u4ecb\u7ecd\u914d\u7f6e\u6587\u4ef6\u9879\u76ee\u5566&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134927-6802586780f9a.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.2 \u57fa\u7840\u7684\u7f51\u82b3\u5206\u4eab\u6d41\u7a0b\u4e0e smb.conf \u7684\u5e38\u7528\u8bbe\u5b9a\u9879\u76ee<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e2\u7136 Samba \u662f\u8981\u52a0\u5165 Windows \u7684\u7f51\u82b3\u670d\u52a1\u5f53\u4e2d&#xff0c;\u6240\u4ee5\u5b83\u7684\u8bbe\u5b9a\u65b9\u5f0f\u5e94\u8be5\u662f\u8981\u4e0e\u7f51\u82b3\u5dee\u4e0d\u591a\u624d\u662f\u3002\u6240\u4ee5\u6211\u4eec\u5148\u6765\u804a\u4e00\u804a Windows \u7684\u4e00\u4e9b\u7f51\u82b3\u8bbe\u5b9a\u65b9\u6cd5\u518d\u8bf4\u3002\u5728\u65e9\u671f Windows \u7684\u7f51\u82b3\u8bbe\u5b9a\u771f\u662f\u5f88\u7b80\u5355&#xff0c;\u4e0d\u8fc7\u4e5f\u56e0\u4e3a\u592a\u7b80\u5355&#xff0c; \u6240\u4ee5\u4ea7\u751f\u7684\u5b89\u5168\u95ee\u9898\u53ef\u662f\u76f8\u5f53\u7684\u9ebb\u70e6\u7684\u3002\u540e\u6765\u5728 Windows XP \u7684 SP2 (\u670d\u52a1\u5305\u7b2c\u4e8c\u7248) \u4e4b\u540e\u52a0\u5165\u4e86\u5f88\u591a\u7684\u9884\u8bbe\u9632\u706b\u5899\u673a\u5236&#xff0c; \u56e0\u6b64\u4f7f\u7528\u7f51\u82b3\u7684\u9884\u8bbe\u9650\u5236\u5e38\u5e38\u4f1a\u662f\u8fd9\u6837\u7684&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u670d\u52a1\u5668\u4e0e\u5ba2\u6237\u7aef\u4e4b\u95f4\u5fc5\u987b\u8981\u5728\u540c\u4e00\u4e2a\u7f51\u57df\u5f53\u4e2d (\u5426\u5219\u9700\u8981\u4fee\u6539 Windows \u9884\u8bbe\u9632\u706b\u5899)&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6700\u597d\u8bbe\u5b9a\u4e3a\u540c\u4e00\u5de5\u4f5c\u7ec4&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3b\u673a\u7684\u540d\u79f0\u4e0d\u53ef\u76f8\u540c (NetBIOS name)&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e13\u4e1a\u7248 Windows XP \u6700\u591a\u4ec5\u80fd\u63d0\u4f9b\u540c\u65f6 10 \u4e2a\u7528\u6237\u8054\u673a\u5230\u540c\u4e00\u53f0\u7f51\u82b3\u670d\u52a1\u5668\u4e0a\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5de5\u4f5c\u7ec4\u4e0e\u4e3b\u673a\u540d\u7684\u8bbe\u5b9a&#xff0c;\u4f60\u53ef\u4ee5\u5728\u300e\u6211\u7684\u8ba1\u7b97\u673a\u300f\u53f3\u952e\u5355\u51fb&#xff0c;\u9009\u62e9\u5185\u5bb9\u540e\u53bb\u4fee\u8ba2\u76f8\u5173\u7684\u8bbe\u5b9a\u503c\u3002\u5f53\u4f60\u7684 Windows \u4e3b\u673a\u7fa4\u7b26\u5408\u4e0a\u8ff0\u7684\u6761\u4ef6\u540e&#xff0c;\u5c31\u5f88\u5bb9\u6613\u5904\u7406\u7f51\u82b3\u5206\u4eab\u7684\u5de5\u4f5c\u5566&#xff01;\u5206\u4eab\u7684\u6b65\u9aa4\u4e00\u822c\u662f\u8fd9\u6837\u7684&#xff1a;<\/span><\/span><\/p>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53eb\u51fa\u6863\u6848\u603b\u7ba1&#xff0c;\u7136\u540e\u5728\u8981\u5206\u4eab\u7684\u76ee\u5f55\u3001\u78c1\u76d8\u6216\u88c5\u7f6e (\u5982\u6253\u5370\u673a) \u4e0a\u9762\u6309\u4e0b\u53f3\u952e&#xff0c;\u9009\u62e9\u300e\u5171\u4eab\u300f&#xff0c;\u7136\u540e\u5c31\u80fd\u591f\u8bbe\u5b9a\u597d\u5206\u4eab\u7684\u6570\u636e\u4e86&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6700\u597d\u5efa\u7acb\u4e00\u7ec4\u7ed9\u7528\u6237\u4f7f\u7528\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u8ba9\u5176\u4ed6\u4e3b\u673a\u7684\u7528\u6237\u53ef\u4ee5\u900f\u8fc7\u8be5\u8d26\u53f7\u5bc6\u7801\u8054\u673a\u8fdb\u5165\u4f7f\u7528\u7f51\u82b3\u5206\u4eab\u7684\u8d44\u6e90&#xff1b;<\/span><\/span><\/li>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f8b\u9898&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5047\u8bbe\u4f60\u6253\u5f00 Windows XP \u7684\u6863\u6848\u603b\u7ba1&#xff0c;\u5728 D:\\\\VBird\\\\Data \u8fd9\u4e2a\u76ee\u5f55\u4e0b&#xff0c;\u4f60\u6309\u4e0b\u53f3\u952e\u9009\u300e\u5171\u4eab\u4e0e\u5b89\u5168\u6027\u300f&#xff0c;\u4e4b\u540e&#xff0c;\u5728\u51fa\u73b0\u7684\u7a97\u53e3\u4e2d&#xff0c; \u4f60\u9009\u62e9&#xff1a;\u300e\u4f60\u4e86\u89e3\u8fd9\u4e2a\u5b89\u5168\u98ce\u9669&#xff0c;\u4f46\u4ecd\u4e0d\u8981\u6267\u884c\u7cbe\u7075\u800c\u5171\u4eab\u6863\u6848&#xff0c;\u8bf7\u6309\u8fd9\u91cc\u300f&#xff0c;\u7136\u540e\u52fe\u9009&#xff1a;\u300e\u5728\u7f51\u7edc\u4e0a\u5171\u4eab\u8fd9\u4e2a\u6587\u4ef6\u5939\u300f&#xff0c; \u6700\u540e\u5171\u4eab\u7684\u540d\u79f0\u4f60\u8f93\u5165\u4e86&#xff1a;\u300eVBGame\u300f&#xff0c;\u8bf7\u95ee&#xff0c;\u5047\u8bbe\u4f60\u7684 IP \u662f 192.168.100.20 &#xff0c;\u90a3\u4e48\u4f60\u7684\u7528\u6237\u4f1a\u770b\u5230\u4ec0\u4e48\u7f51\u5740\u5217&#xff1f;<\/span><\/span><br \/>\n       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7b54&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7f51\u82b3\u7684\u8d44\u6e90\u540d\u79f0\u901a\u5e38\u7684\u5199\u6cd5\u662f&#xff1a;\u300e \\\\\\\\IP\\\\\u5206\u4eab\u8d44\u6e90\u540d\u79f0\u300f&#xff0c;\u6211\u4eec\u7684\u5206\u4eab\u8d44\u6e90\u540d\u79f0\u4e3a VBGame&#xff0c;\u56e0\u6b64\u6700\u7ec8\u8fd9\u4e2a\u5206\u4eab\u7684\u8d44\u6e90\u540d\u79f0\u5e94\u8be5\u662f&#xff1a;\u300e \\\\\\\\192.168.100.20\\\\VBGame \u300f\u624d\u5bf9&#xff01;\u5f88\u591a\u670b\u53cb\u90fd\u4f1a\u5199\u6210&#xff1a;\u300e \\\\\\\\192.168.100.20\\\\VBird\\\\Game \u300f\u90a3\u9519\u5f97\u5f88\u79bb\u8c31\u5594&#xff01;<\/span><\/span>\n       <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u00a0 <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u771f\u662f\u6709\u591f\u7b80\u5355\u7684&#xff01;\u90a3\u4e48 Samba \u600e\u4e48\u8bbe\u5b9a\u554a&#xff1f;\u4e5f\u662f\u5f88\u7b80\u5355&#xff0c;\u4f9d\u636e\u4e0a\u8ff0\u7684\u9650\u5236\u4ee5\u53ca\u6d41\u7a0b\u4f60\u53ef\u4ee5\u8fd9\u6837\u60f3\u8c61&#xff1a;<\/span><\/span><\/p>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u670d\u52a1\u5668\u6574\u4f53\u8bbe\u5b9a\u65b9\u9762<\/span>&#xff1a;\u5728 smb.conf \u5f53\u4e2d\u8bbe\u5b9a\u597d\u5de5\u4f5c\u7ec4\u3001NetBIOS \u4e3b\u673a\u540d\u3001\u5bc6\u7801\u4f7f\u7528\u72b6\u6001 (\u65e0\u5bc6\u7801\u5206\u4eab\u6216\u672c\u673a\u5bc6\u7801) \u7b49\u7b49&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u89c4\u5212\u51c6\u5907\u5206\u4eab\u7684\u76ee\u5f55\u53c2\u6570<\/span>&#xff1a;\u5728 smb.conf \u5185\u8bbe\u5b9a\u597d\u9884\u8ba1\u8981\u5206\u4eab\u7684\u76ee\u5f55\u6216\u88c5\u7f6e\u4ee5\u53ca\u53ef\u4f9b\u4f7f\u7528\u7684\u8d26\u53f7\u6570\u636e&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u5efa\u7acb\u6240\u9700\u8981\u7684\u6587\u4ef6\u7cfb\u7edf<\/span>&#xff1a;\u6839\u636e\u6b65\u9aa4 2 \u7684\u8bbe\u5b9a&#xff0c;\u5728 Linux \u6587\u4ef6\u7cfb\u7edf\u5f53\u4e2d\u5efa\u7acb\u597d\u5206\u4eab\u51fa\u53bb\u7684\u6863\u6848\u6216\u88c5\u7f6e&#xff0c;\u4ee5\u53ca\u76f8\u5173\u7684\u6743\u9650\u53c2\u6570&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u5efa\u7acb\u53ef\u7528 Samba \u7684\u8d26\u53f7<\/span>&#xff1a;\u6839\u636e\u6b65\u9aa4 2 \u7684\u8bbe\u5b9a&#xff0c;\u5efa\u7acb\u6240\u9700\u7684 Linux \u5b9e\u4f53\u8d26\u53f7&#xff0c;\u518d\u4ee5 pdbedit \u5efa\u7acb\u4f7f\u7528 Samba \u7684\u5bc6\u7801&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u542f\u52a8\u670d\u52a1<\/span>&#xff1a;\u542f\u52a8 Samba \u7684 smbd, nmbd \u670d\u52a1&#xff0c;\u5f00\u59cb\u8fd0\u8f6c\u54e9&#xff01;<\/span><\/span><\/li>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6839\u636e\u4e0a\u9762\u7684\u6d41\u7a0b&#xff0c;\u5176\u5b9e\u6211\u4eec\u6700\u9700\u8981\u77e5\u9053\u7684\u5c31\u662f smb.conf \u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u4fe1\u606f\u5c31\u662f\u4e86\u3002 \u6240\u4ee5\u9996\u5148\u6211\u4eec\u5c31\u8981\u6765\u4ecb\u7ecd\u4e00\u4e0b\u8fd9\u4e2a\u6863\u6848\u7684\u8bbe\u5b9a\u65b9\u5f0f\u5570&#xff01;\u8fd9\u4e2a\u6863\u6848\u5176\u5b9e\u53ef\u4ee5\u5206\u4e3a\u4e24\u90e8\u4efd\u6765\u770b&#xff0c; \u4e00\u4e2a\u662f\u4e3b\u673a\u4fe1\u606f\u90e8\u5206&#xff0c;\u5728 smb.conf \u5f53\u4e2d\u4ee5 [global] (\u5168\u9886\u57df) \u4f5c\u4e3a\u8bbe\u5b9a\u7684\u4f9d\u636e&#xff1b;\u53e6\u4e00\u4e2a\u5219\u662f\u5206\u4eab\u7684\u4fe1\u606f&#xff0c; \u4ee5\u4e2a\u522b\u7684\u76ee\u5f55\u540d\u79f0\u4e3a\u4f9d\u636e\u3002\u53e6\u5916&#xff0c;\u7531\u4e8e Samba \u4e3b\u8981\u662f\u60f3\u52a0\u5165\u7f51\u82b3\u529f\u80fd&#xff0c;\u56e0\u6b64\u5728 smb.conf \u5185\u7684\u5f88\u591a\u8bbe\u5b9a\u90fd\u4e0e Windows \u7c7b\u4f3c\u5594&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 smb.conf \u5f53\u4e2d&#xff0c;\u4e95\u5b57\u53f7\u4e0e\u5206\u53f7 (# \u8ddf \ud83d\ude09 \u90fd\u662f\u6279\u6ce8\u7b26\u53f7&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e2d&#xff0c;\u5927\u5c0f\u5199\u662f\u6ca1\u5173\u7cfb\u7684&#xff01;\u56e0\u4e3a Windows \u6ca1\u5206\u5927\u5c0f\u5199&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smb.conf \u7684\u670d\u52a1\u5668\u6574\u4f53\u53c2\u6570&#xff1a; [global] \u9879\u76ee<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 smb.conf \u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u5f53\u4e2d\u7684\u8bbe\u5b9a\u9879\u76ee\u6709\u70b9\u50cf\u5e95\u4e0b\u8fd9\u6837&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#ff6666\"># \u4f1a\u6709\u5f88\u591a\u52a0\u4e0a # \u6216 ; \u7684\u6279\u6ce8\u8bf4\u660e&#xff0c;\u4f60\u4e5f\u53ef\u4ee5\u81ea\u884c\u52a0\u4e0a\u6765\u63d0\u9192\u81ea\u5df1\u76f8\u5173\u8bbe\u5b9a<\/span><br \/>\n<span style=\"color:#FFFF00\">[global]<br \/>\n   \u53c2\u6570\u9879\u76ee &#061; \u8bbe\u5b9a\u5185\u5bb9<br \/>\n   &#8230;.<\/p>\n<p>[\u5206\u4eab\u8d44\u6e90\u540d\u79f0]<br \/>\n   \u53c2\u6570\u9879\u76ee &#061; \u8bbe\u5b9a\u5185\u5bb9<br \/>\n   &#8230;.<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 [global] \u5f53\u4e2d\u7684\u5c31\u662f\u4e00\u4e9b\u670d\u52a1\u5668\u7684\u6574\u4f53\u53c2\u6570\u4e86&#xff0c;\u5305\u62ec\u5de5\u4f5c\u7ec4\u3001\u4e3b\u673a\u7684 NetBIOS \u540d\u79f0\u3001\u5b57\u7b26\u7f16\u7801\u7684\u663e\u793a\u3001\u767b\u5f55\u6587\u4ef6\u7684\u8bbe\u5b9a\u3001 \u662f\u5426\u4f7f\u7528\u5bc6\u7801\u4ee5\u53ca\u4f7f\u7528\u5bc6\u7801\u9a8c\u8bc1\u7684\u673a\u5236\u7b49\u7b49&#xff0c;\u90fd\u662f\u5728\u8fd9\u4e2a [global] \u9879\u76ee\u4e2d\u8bbe\u5b9a\u7684\u3002\u81f3\u4e8e [\u5206\u4eab\u8d44\u6e90\u540d\u79f0] \u5219\u662f\u9488\u5bf9\u4f60\u5f00\u653e\u7684\u76ee\u5f55\u6765\u8fdb\u6743\u9650\u65b9\u9762\u7684\u8bbe\u5b9a&#xff0c;\u5305\u62ec\u8c01\u53ef\u4ee5\u6d4f\u89c8\u8be5\u76ee\u5f55\u3001\u662f\u5426\u53ef\u4ee5\u8bfb\u5199\u7b49\u7b49\u53c2\u6570\u3002 \u5728 [global] \u90e8\u5206\u5173\u4e8e\u4e3b\u673a\u540d\u4fe1\u606f\u65b9\u9762\u7684\u53c2\u6570\u4e3b\u8981\u6709&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">workgroup &#061; \u5de5\u4f5c\u7ec4\u7684\u540d\u79f0<\/span>&#xff1a;\u6ce8\u610f&#xff0c;\u4e3b\u673a\u7fa4\u8981\u76f8\u540c&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">netbios name &#061; \u4e3b\u673a\u7684 NetBIOS \u540d\u79f0<\/span>\u554a&#xff0c;\u6bcf\u90e8\u4e3b\u673a\u5747\u4e0d\u540c&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">server string &#061; \u4e3b\u673a\u7684\u7b80\u6613\u8bf4\u660e<\/span>&#xff0c;\u8fd9\u4e2a\u968f\u4fbf\u5199\u5373\u53ef\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u8fc7\u53bb\u5e38\u5e38\u8ba9\u4f7f\u7528\u8005\u5fc3\u751f\u4e0d\u6ee1\u7684\u8bed\u7cfb\u663e\u793a\u95ee\u9898\u65b9\u9762&#xff0c;\u4f60\u52a1\u5fc5\u8981\u6e05\u695a\u7684\u77e5\u9053\u7684\u662f&#xff0c;<span style=\"color:#000088\">SAMBA \u670d\u52a1\u5668\u4e0a\u9762\u7684\u6570\u636e (\u4f8b\u5982 mount \u78c1\u76d8\u5206\u533a\u69fd\u7684\u53c2\u6570\u4ee5\u53ca\u539f\u672c\u7684\u6570\u636e\u7f16\u7801), SAMBA \u670d\u52a1\u5668\u663e\u793a\u7684\u8bed\u7cfb, Windows \u5ba2\u6237\u7aef\u663e\u793a\u7684\u8bed\u7cfb, Windows \u5ba2\u6237\u7aef\u8fde\u4e0a SAMBA \u7684\u8f6f\u4ef6<\/span>\u00a0\u90fd\u9700\u8981\u7b26\u5408\u8bbe\u5b9a\u503c\u624d\u884c&#xff01;\u5728\u65b0\u7248\u7684 3.x \u4e0a\u9762\u6709\u6570\u4e2a\u63d0\u4f9b\u8fd9\u4e9b\u8bed\u7cfb\u8f6c\u6362\u7684\u8bbe\u5b9a\u5594&#xff0c;\u5982\u4e0b\u6240\u793a&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">display charset &#061; \u81ea\u5df1\u670d\u52a1\u5668\u4e0a\u9762\u7684\u663e\u793a\u7f16\u7801<\/span>&#xff0c; \u4f8b\u5982\u4f60\u5728\u7ec8\u7aef\u673a\u65f6\u6240\u67e5\u9605\u7684\u7f16\u7801\u4fe1\u606f\u3002\u4e00\u822c\u6765\u8bf4&#xff0c;\u4e0e\u5e95\u4e0b\u7684 unix charset \u4f1a\u76f8\u540c\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">unix charset &#061; \u5728 Linux \u670d\u52a1\u5668\u4e0a\u9762\u6240\u4f7f\u7528\u7684\u7f16\u7801<\/span>&#xff0c;\u4e00\u822c\u6765\u8bf4\u5c31\u662f i18n \u7684\u7f16\u7801\u5570&#xff01; \u6240\u4ee5\u4f60\u5fc5\u987b\u8981\u53c2\u8003 \/etc\/sysconfig\/i18n \u5185\u7684\u300e\u9ed8\u8ba4\u300f\u7f16\u7801\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">dos charset &#061; \u5c31\u662f Windows \u5ba2\u6237\u7aef\u7684\u7f16\u7801\u4e86&#xff01;<\/span>\u00a0\u4e00\u822c\u6765\u8bf4\u6211\u4eec\u7684\u7e41\u4f53\u4e2d\u6587 Windows \u4f7f\u7528\u7684\u662f big5 \u7f16\u7801&#xff0c;\u8fd9\u4e2a\u7f16\u7801\u5728 Samba \u5185\u7684\u683c\u5f0f\u88ab\u79f0\u4e3a\u300e cp950 \u300f\u5594&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5173\u4e8e\u8bed\u7cfb\u7f16\u7801&#xff0c;\u5efa\u8bae\u4f60\u53c2\u8003\u4e00\u4e0b\u8ba8\u8bba\u533a\u7684\u8fd9\u4e00\u7bc7&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/phorum.vbird.org\/viewtopic.php?t&#061;22001<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eec\u7684\u7f51\u53cb eyesblue \u5199\u5f97\u592a\u597d\u4e86&#xff01;\u6240\u4ee5\u5efa\u8bae\u5927\u5bb6\u76f4\u63a5\u524d\u5f80\u67e5\u9605\u5373\u53ef&#xff01;\u5728\u8fd9\u91cc\u9e1f\u54e5\u5c06\u8be5\u6587\u7ae0\u5185\u5bb9\u4f5c\u4e2a\u4f8b\u9898\u6765\u73a9\u73a9\u3002<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f8b\u9898&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5047\u8bbe\u4f60\u7684 Samba \u4f7f\u7528\u7684\u8bed\u7cfb \/etc\/sysconfig\/i18n \u663e\u793a\u7684\u662f\u300e LANG&#061;&#034;zh_TW.big5&#034; \u300f&#xff0c; \u800c\u9884\u8ba1\u8981\u5206\u4eab\u7684\u76ee\u6807 Windows \u7cfb\u7edf\u662f XP&#xff0c;\u90a3\u4e48\u4f60\u7684\u8bed\u7cfb\u6570\u636e\u5e94\u8be5\u5982\u4f55\u8bbe\u5b9a&#xff1f;<\/span><\/span><br \/>\n       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7b54&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e Linux, Windows XP \u90fd\u4f7f\u7528 big5 \u7f16\u7801&#xff0c;\u56e0\u6b64\u8bbe\u5b9a\u503c\u5e94\u8be5\u662f&#xff1a;<\/span><\/span><br \/>\n       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">        unix charset    &#061; cp950<br \/>\n        display charset &#061; cp950<br \/>\n        dos charset     &#061; cp950<\/span><\/span>\n       <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u00a0 <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9664\u6b64\u4e4b\u5916&#xff0c;\u8fd8\u6709\u767b\u5f55\u6587\u4ef6\u65b9\u9762\u7684\u4fe1\u606f&#xff0c;\u5305\u62ec\u8fd9\u4e9b\u53c2\u6570&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">log file &#061; \u767b\u5f55\u6863\u653e\u7f6e\u7684\u6863\u6848&#xff0c;\u6587\u4ef6\u540d\u53ef\u80fd\u4f1a\u4f7f\u7528\u53d8\u91cf\u5904\u7406&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">max log size &#061; \u767b\u5f55\u6863\u6700\u5927\u4ec5\u80fd\u5230\u591a\u5c11 Kbytes &#xff0c;\u82e5\u5927\u4e8e\u8be5\u6570\u5b57&#xff0c;\u5219\u4f1a\u88ab rotate \u6389\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd8\u6709\u7f51\u82b3\u5f00\u653e\u5206\u4eab\u65f6&#xff0c;\u5b89\u5168\u6027\u7a0b\u5ea6\u6709\u5173\u7684\u5bc6\u7801\u53c2\u6570&#xff0c;\u5305\u62ec\u8fd9\u51e0\u4e2a&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">security &#061; share, user, domain<\/span>&#xff1a;\u4e09\u9009\u4e00&#xff0c;\u8fd9\u4e09\u4e2a\u8bbe\u5b9a\u503c\u5206\u522b\u4ee3\u8868&#xff1a;<\/span><\/span> \u00a0\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">share<\/span>&#xff1a;\u5206\u4eab\u7684\u6570\u636e\u4e0d\u9700\u8981\u5bc6\u7801&#xff0c;\u5927\u5bb6\u5747\u53ef\u4f7f\u7528 (\u6ca1\u6709\u5b89\u5168\u6027)&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">user<\/span>\u00a0&#xff1a;\u4f7f\u7528 SAMBA \u670d\u52a1\u5668\u672c\u8eab\u7684\u5bc6\u7801\u6570\u636e\u5e93&#xff0c;\u5bc6\u7801\u6570\u636e\u5e93\u4e0e\u5e95\u4e0b\u7684 passdb backend \u6709\u5173&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">domain<\/span>&#xff1a;\u4f7f\u7528\u5916\u90e8\u670d\u52a1\u5668\u7684\u5bc6\u7801&#xff0c;\u4ea6\u5373 SAMBA \u662f\u5ba2\u6237\u7aef\u4e4b\u610f&#xff0c;\u5982\u679c\u8bbe\u5b9a\u8fd9\u4e2a\u9879\u76ee&#xff0c; \u4f60\u8fd8\u5f97\u8981\u63d0\u4f9b\u300epassword server &#061; IP\u300f\u7684\u8bbe\u5b9a\u503c\u624d\u884c&#xff1b;<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">encrypt passwords &#061; Yes \u4ee3\u8868\u5bc6\u7801\u8981\u52a0\u5bc6<\/span>&#xff0c;\u6ce8\u610f\u90a3\u4e2a passwords \u8981\u6709 s \u624d\u5bf9&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">passdb backend &#061; \u6570\u636e\u5e93\u683c\u5f0f<\/span>&#xff0c;\u5982\u524d\u6240\u8ff0&#xff0c;\u4e3a\u4e86\u52a0\u5feb\u901f\u5ea6&#xff0c; \u76ee\u524d\u5bc6\u7801\u6587\u4ef6\u5df2\u7ecf\u8f6c\u4e3a\u4f7f\u7528\u6570\u636e\u5e93\u4e86&#xff01;\u9ed8\u8ba4\u7684\u6570\u636e\u5e93\u683c\u5f0f\u5fae tdbsam &#xff0c;\u800c\u9884\u8bbe\u7684\u6863\u6848\u5219\u653e\u7f6e\u5230 \/var\/lib\/samba\/private\/passwd.tdb\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e8b\u5b9e\u4e0a Samba \u7684\u5bc6\u7801\u65b9\u9762\u8bbe\u5b9a\u503c\u5f88\u591a\u5594&#xff0c;\u5305\u62ec\u4f60\u8fd8\u53ef\u4ee5\u5229\u7528 samba \u6765\u4fee\u6539 \/etc\/passwd \u91cc\u5934\u7684\u4eba\u7269\u7684\u5bc6\u7801\u5462&#xff01; \u4e0d\u8fc7\u8fd9\u4e2a\u65f6\u5019\u5c31\u5f97\u9700\u8981\u300e unix password sync \u300f\u4ee5\u53ca\u300e passwd program \u300f\u8fd9\u4e24\u4e2a\u53c2\u6570\u503c\u7684\u5e2e\u5fd9\u4e86\u3002 \u6211\u4eec\u8fd9\u91cc\u5148\u8c08\u6bd4\u8f83\u7b80\u5355\u7684&#xff0c;\u5176\u4ed6\u8fdb\u9636\u7684\u90e8\u5206\u53ef\u4ee5 man smb.conf \u53bb\u8fdb\u884c\u641c\u5bfb\u67e5\u9605\u5594&#xff01; ^_^<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5206\u4eab\u8d44\u6e90\u7684\u76f8\u5173\u53c2\u6570\u8bbe\u5b9a [\u5206\u4eab\u7684\u540d\u79f0]<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u90e8\u5206\u5c31\u662f\u6211\u4eec\u5728\u524d\u9762\u7684\u5c0f\u8303\u4f8b\u5f53\u4e2d\u8bf4\u660e\u7684&#xff0c;\u8981\u5c06 (1)\u54ea\u4e2a\u5b9e\u9645\u7684\u76ee\u5f55 (2)\u5206\u4eab\u6210\u4ec0\u4e48\u540d\u79f0&#xff1f;\u4e2d\u522e\u53f7\u91cc\u9762\u653e\u7684\u662f\u300e\u5206\u4eab\u540d\u79f0\u300f&#xff01; \u90a3\u5728\u8fd9\u4e2a\u5206\u4eab\u540d\u79f0\u5185\u5e38\u89c1\u7684\u53c2\u6570\u6709&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">[\u5206\u4eab\u540d\u79f0]<\/span>\u00a0&#xff1a;\u8fd9\u4e2a\u5206\u4eab\u540d\u79f0\u5f88\u91cd\u8981&#xff0c;\u5b83\u662f\u4e00\u4e2a\u300e\u4ee3\u53f7\u300f\u800c\u5df2\u3002\u8bb0\u5f97\u56de\u53bb\u770b\u770b 16.2.2 \u91cc\u9762\u63d0\u5230\u7684\u90a3\u4e2a\u8303\u4f8b&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">comment<\/span>\u00a0&#xff1a;\u53ea\u662f\u8fd9\u4e2a\u76ee\u5f55\u7684\u8bf4\u660e\u800c\u5df2&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">path<\/span>\u00a0&#xff1a;\u8fd9\u4e2a\u5206\u4eab\u540d\u79f0\u5b9e\u9645\u4f1a\u8fdb\u5165\u7684 Linux \u6587\u4ef6\u7cfb\u7edf (\u76ee\u5f55)\u3002 \u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5728\u7f51\u82b3\u5f53\u4e2d\u770b\u5230\u7684\u662f [\u5206\u4eab] \u7684\u540d\u79f0&#xff0c;\u800c\u5b9e\u9645\u64cd\u4f5c\u7684\u6587\u4ef6\u7cfb\u7edf\u5219\u662f\u5728 path \u91cc\u5934\u6240\u8bbe\u5b9a\u7684\u3002<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">browseable<\/span>\u00a0&#xff1a;\u662f\u5426\u8ba9\u6240\u6709\u7684\u7528\u6237\u770b\u5230\u8fd9\u4e2a\u9879\u76ee&#xff1f;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">writable<\/span>\u00a0&#xff1a;\u662f\u5426\u53ef\u4ee5\u5199\u5165&#xff1f;\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u4e00\u4e0b\u5594&#xff01;\u90a3\u4e2a read only \u4e0e writable \u4e0d\u662f\u4e24\u4e2a\u86ee\u76f8\u4f3c\u7684\u8bbe\u5b9a\u503c\u5417&#xff1f;\u5982\u679c writable \u5728\u8fd9\u91cc\u8bbe\u5b9a\u4e3a yes &#xff0c;\u4ea6\u5373\u53ef\u4ee5\u5199\u5165&#xff0c;\u5982\u679c read only \u540c\u65f6\u8bbe\u5b9a\u4e3a yes &#xff0c; \u90a3\u4e0d\u5c31\u4e92\u76f8\u62b5\u89e6\u4e86&#xff01;\u90a3\u4e2a\u624d\u662f\u6b63\u786e\u7684\u8bbe\u5b9a&#xff1f;\u7b54\u6848\u662f&#xff1a;<span style=\"color:#000088\">\u6700\u540e\u51fa\u73b0\u7684\u90a3\u4e2a\u8bbe\u5b9a\u503c\u4e3a\u4e3b\u8981\u7684\u8bbe\u5b9a&#xff01;<\/span><\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">create mode \u4e0e directory mode<\/span>\u00a0\u90fd\u4e0e\u6743\u9650\u6709\u5173\u7684\u54af&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">writelist &#061; \u4f7f\u7528\u8005, &#064;\u7fa4\u7ec4<\/span>&#xff0c;\u8fd9\u4e2a\u9879\u76ee\u53ef\u4ee5\u6307\u5b9a\u80fd\u591f\u8fdb\u5165\u5230\u6b64\u8d44\u6e90\u7684\u7279\u5b9a\u4f7f\u7528\u8005\u3002 \u5982\u679c\u662f &#064;group \u7684\u683c\u5f0f&#xff0c;\u5219\u52a0\u5165\u8be5\u7fa4\u7ec4\u7684\u4f7f\u7528\u8005\u5747\u53ef\u53d6\u5f97\u4f7f\u7528\u7684\u6743\u9650&#xff0c;\u8bbe\u5b9a\u4e0a\u4f1a\u6bd4\u8f83\u7b80\u5355&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56e0\u4e3a\u5206\u4eab\u7684\u8d44\u6e90\u4e3b\u8981\u4e0e Linux \u7cfb\u7edf\u7684\u6863\u6848\u6743\u9650\u6709\u5173&#xff0c;\u56e0\u6b64\u91cc\u5934\u7684\u8bbe\u5b9a\u53c2\u6570\u591a\u4e0e\u6743\u9650\u6709\u5173\u3002<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smb.conf \u5185\u7684\u53ef\u7528\u53d8\u91cf\u529f\u80fd<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3a\u4e86\u7b80\u5316\u8bbe\u5b9a\u503c&#xff0c;Samba \u63d0\u4f9b\u5f88\u591a\u4e0d\u540c\u7684\u53d8\u91cf\u7ed9\u6211\u4eec\u6765\u4f7f\u7528&#xff0c;\u4e3b\u8981\u6709\u5e95\u4e0b\u8fd9\u51e0\u4e2a\u53d8\u91cf\u5594&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%S<\/span>&#xff1a;\u53d6\u4ee3\u76ee\u524d\u7684\u8bbe\u5b9a\u9879\u76ee\u503c&#xff0c;\u6240\u8c13\u7684\u300e\u8bbe\u5b9a\u9879\u76ee\u503c\u300f\u5c31\u662f\u5728 [\u5206\u4eab] \u91cc\u9762\u7684\u5185\u5bb9&#xff01;\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u4f8b\u5982\u5e95\u4e0b\u7684\u8bbe\u5b9a\u8303\u4f8b&#xff1a;<\/span><\/span><br \/>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[homes]<br \/>\n   valid users &#061; %S<br \/>\n   &#8230;.<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56e0\u4e3a valid users \u662f\u5141\u8bb8\u7684\u767b\u5165\u8005&#xff0c;\u8bbe\u5b9a\u4e3a %S \u8868\u793a\u4efb\u4f55\u53ef\u767b\u5165\u7684\u4f7f\u7528\u8005\u90fd\u80fd\u591f\u767b\u5165\u7684\u610f\u601d&#xff5e;\u4eca\u5929\u5982\u679c dmtsai \u8fd9\u4e2a\u4f7f\u7528\u8005\u767b\u5165\u4e4b\u540e&#xff0c;\u90a3\u4e2a [homes] \u5c31\u4f1a\u81ea\u52a8\u7684\u53d8\u6210\u4e86 [dmtsai] \u4e86&#xff01;\u8fd9\u6837\u53ef\u4ee5\u660e\u767d\u4e86\u5417&#xff1f; %S \u7684\u7528\u610f\u5c31\u662f\u5728\u66ff\u6362\u6389\u76ee\u524d [ ] \u91cc\u9762\u7684\u5185\u5bb9\u5566&#xff01;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%m<\/span>&#xff1a;\u4ee3\u8868 Client \u7aef\u7684 NetBIOS \u4e3b\u673a\u540d\u5594&#xff01;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%M<\/span>&#xff1a;\u4ee3\u8868 Client \u7aef\u7684 Internet \u4e3b\u673a\u540d\u5594&#xff01;\u5c31\u662f HOSTNAME\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%L<\/span>&#xff1a;\u4ee3\u8868 SAMBA \u4e3b\u673a\u7684 NetBIOS \u4e3b\u673a\u540d\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%H<\/span>&#xff1a;\u4ee3\u8868\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%U<\/span>&#xff1a;\u4ee3\u8868\u76ee\u524d\u767b\u5165\u7684\u4f7f\u7528\u8005\u7684\u4f7f\u7528\u8005\u540d\u79f0<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%g<\/span>&#xff1a;\u4ee3\u8868\u767b\u5165\u7684\u4f7f\u7528\u8005\u7684\u7ec4\u540d\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%h<\/span>&#xff1a;\u4ee3\u8868\u76ee\u524d\u8fd9\u90e8 SAMBA \u4e3b\u673a\u7684 HOSTNAME \u5594&#xff01;\u6ce8\u610f\u662f hostname \u4e0d\u662f NetBIOS name \u5594&#xff01;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%I<\/span>&#xff1a;\u4ee3\u8868 Client \u7684 IP \u54af\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">%T<\/span>&#xff1a;\u4ee3\u8868\u76ee\u524d\u7684\u65e5\u671f\u4e0e\u65f6\u95f4<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4ee5\u4e0a\u5c31\u662f\u5728 smb.conf \u4e0a\u5934\u5e38\u770b\u5230\u7684\u51e0\u79cd\u8bbe\u5b9a\u9879\u76ee&#xff0c;\u76f8\u4fe1\u521d\u6b21\u63a5\u89e6 Samba \u7684\u670b\u53cb&#xff0c;\u770b\u5230\u4e0a\u5934\u5199\u7684\u8d44\u6599\u80af\u5b9a\u662f\u4e00\u5934\u96fe\u6c34\u7684&#xff01; \u6211\u4eec\u5e95\u4e0b\u7528\u51e0\u4e2a\u5c0f\u8303\u4f8b\u6765\u5b9e\u9645\u7684\u4ecb\u7ecd smb.conf \u7684\u8bbe\u5b9a\u540e&#xff0c;\u4f60\u5c31\u4f1a\u77e5\u9053\u8fd9\u4e9b\u53c2\u6570\u5982\u4f55\u5e94\u7528\u4e86&#xff01; \u8bb0\u5f97&#xff0c;<span style=\"color:#000088\">\u770b\u5b8c\u5e95\u4e0b\u7684\u4e0b\u8303\u4f8b\u540e&#xff0c;\u8981\u56de\u6765\u518d\u5c06\u8fd9\u4e9b\u53c2\u6570\u7684\u610f\u4e49\u77a7\u4e00\u77a7&#xff0c; \u800c\u4e14\u82e5\u6709\u5176\u4ed6\u989d\u5916\u7684\u53c2\u6570\u987b\u77e5&#xff0c;\u52a1\u5fc5\u81ea\u884c man smb.conf \u5594&#xff01;<\/span>\u91cd\u8981\u7684\u5f88&#xff01;<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Tips:<span style=\"color:#009000\">\u65f6\u4ee3\u53d8\u52a8\u592a\u5feb&#xff0c;\u7248\u672c\u53d8\u52a8\u592a\u591a&#xff5e;\u8981\u8bb2\u5b8c\u6240\u6709\u7684\u53c2\u6570\u5b9e\u5728\u662f\u5f88\u96be\u7684\u4e00\u4ef6\u4e8b&#xff5e;\u6240\u4ee5\u5728\u8fd9\u91cc\u9e1f\u54e5\u53ea\u8bb2\u4e00\u4e9b\u5e38\u7528\u7684\u8bbe\u5b9a\u9879\u76ee&#xff0c; \u5f88\u591a\u7ec6\u9879\u5c31\u5f97\u8981\u9760\u5404\u4f4d\u770b\u5b98\u81ea\u5df1\u52aa\u529b\u4e86&#xff5e;\u6587\u672b\u4e5f\u6709\u5217\u51fa\u5f88\u591a Samba \u7684\u5728\u7ebf\u8d44\u6e90&#xff0c;\u8bb0\u5f97\u8981\u67e5\u5bdf\u770b&#xff01;<\/span><\/span><\/span><\/td>\n<td>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u9e1f\u54e5\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134927-68025867c1dde.jpg\" width=\"534\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134928-680258680f074.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.3 \u4e0d\u9700\u5bc6\u7801\u7684\u5206\u4eab (security &#061; share, \u7eaf\u6d4b\u8bd5)<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u778e\u5bc6&#xff1f;\u4e0d\u9700\u8981\u5bc6\u7801\u5c31\u80fd\u591f\u4f7f\u7528 SAMBA \u4e3b\u673a\u6240\u63d0\u4f9b\u7684\u76ee\u5f55\u8d44\u6e90&#xff1f;\u771f\u5047&#xff1f;\u6ca1\u9519\u5566&#xff0c;\u53ef\u4ee5\u8fbe\u5230\u7684\u3002\u4e0d\u8fc7&#xff0c;\u56e0\u4e3a\u4e0d\u9700\u8981\u5bc6\u7801\u5c31\u80fd\u591f\u767b\u5165&#xff0c; \u867d\u7136\u4f60\u53ef\u4ee5\u8bbe\u5b9a\u6743\u9650\u6210\u4e3a\u53ea\u8bfb&#xff0c;\u8ba9\u4f7f\u7528\u8005\u53ef\u4ee5\u300e\u77a7\u77a7\u800c\u5df2\u300f&#xff0c;\u4f46\u662f\u6bd5\u7adf\u6bd4\u8f83\u5371\u9669\u3002 \u56e0\u4e3a\u5982\u679c\u4f60\u4e0d\u5c0f\u5fc3\u5c06\u91cd\u8981\u6570\u636e\u653e\u7f6e\u5230\u8be5\u5206\u4eab\u7684\u76ee\u5f55\u5f53\u4e2d&#xff0c;\u5c82\u4e0d\u5371\u9669&#xff1f;\u6240\u4ee5\u5c3d\u91cf\u4e0d\u8981\u8fd9\u6837\u8bbe\u5b9a&#xff0c;\u6240\u4ee5\u6807\u9898\u624d\u4f1a\u8bb2&#xff1a;\u300e\u7eaf\u6d4b\u8bd5\u300f\u561b&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">0. \u5047\u8bbe\u6761\u4ef6<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u5e95\u4e0b\u7684\u6848\u4f8b\u4e2d&#xff0c;\u670d\u52a1\u5668 (192.168.100.254) \u9884\u8ba1\u8bbe\u5b9a\u7684\u53c2\u6570\u72b6\u51b5\u4e3a&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 LAN \u5185\u6240\u6709\u7684\u7f51\u82b3\u4e3b\u673a\u5de5\u4f5c\u7ec4 (workgroup) \u4e3a&#xff1a; vbirdhouse<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u90e8 Samba \u670d\u52a1\u5668\u7684 NetBIOS \u540d\u79f0 (netbios name) \u4e3a&#xff1a; vbirdserver<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f7f\u7528\u8005\u8ba4\u8bc1\u5c42\u7ea7\u8bbe\u5b9a (security) \u4e3a&#xff1a; share<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53d6\u6d88\u539f\u672c\u6709\u653e\u884c\u7684 [homes] \u76ee\u5f55&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4ec5\u5206\u4eab \/tmp \u8fd9\u4e2a\u76ee\u5f55\u800c\u5df2&#xff0c;\u4e14\u53d6\u540d\u4e3a&#xff1a; temp<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Linux \u670d\u52a1\u5668\u7684\u7f16\u7801\u683c\u5f0f\u5047\u8bbe\u4e3a\u4e07\u56fd\u7801 (Unicode, \u4ea6\u5373 utf8)<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5ba2\u6237\u7aef\u4e3a\u4e2d\u6587 Windows &#xff0c;\u5728\u5ba2\u6237\u7aef\u7684\u8f6f\u4ef6\u4e5f\u4f7f\u7528 big5 \u7684\u7f16\u7801<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8001\u5b9e\u8bf4&#xff0c; netbios name \u51e0\u4e4e\u53ef\u4ee5\u4e0d\u7528\u8bbe\u5b9a\u4e86&#xff0c;\u56e0\u4e3a\u73b0\u5728\u6211\u4eec\u90fd\u7528 IP \u8fdb\u884c\u7f51\u82b3\u8054\u673a&#xff0c;\u4e0d\u4e00\u5b9a\u4f1a\u4f7f\u7528\u4e3b\u673a\u540d\u561b&#xff01; \u6240\u4ee5\u8fd9\u4e00\u7248\u5f53\u4e2d&#xff0c;\u9e1f\u54e5\u53d6\u6d88\u4e86 lmhosts \u7684\u8bbe\u5b9a\u503c\u5594&#xff01;\u597d\u4e86&#xff0c;\u5e95\u4e0b\u5c31\u5f00\u59cb\u4f9d\u5e8f\u6765\u8fdb\u884c samba \u7684\u8bbe\u5b9a\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">1. \u8bbe\u5b9a smb.conf \u914d\u7f6e\u6587\u4ef6<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u6211\u4eec\u6709\u8bbe\u5b9a\u8bed\u7cfb\u76f8\u5173\u7684\u6570\u636e&#xff0c;\u56e0\u6b64\u5f97\u8981\u5148\u67e5\u67e5\u770b&#xff0c;\u5230\u5e95\u6211\u4eec Linux \u670d\u52a1\u5668\u7684\u8bed\u7cfb\u662f\u5426\u4e3a utf8 \u5462&#xff1f;\u68c0\u67e5\u65b9\u6cd5\u5982\u4e0b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">cat \/etc\/sysconfig\/i18n<\/span><br \/>\nLANG&#061;&#034;zh_TW.UTF-8&#034;  <span style=\"color:#777777\">&lt;&#061;&#061;\u786e\u5b9e\u662f\u51fa\u73b0\u4e86 utf8 \u5594&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u4e0a\u6240\u793a&#xff0c;\u786e\u5b9e\u662f utf8 \u554a&#xff01;\u800c\u5728\u8fd9\u4e2a\u4f8b\u5b50\u5f53\u4e2d\u6211\u4eec\u4ec5\u5206\u4eab \/tmp \u8fd9\u4e2a\u76ee\u5f55\u800c\u5df2&#xff0c;\u800c\u4e14\u5047\u8bbe\u8fd9\u4e2a\u5206\u4eab\u51fa\u6765\u7684\u76ee\u5f55\u662f\u53ef\u64e6\u5199\u7684&#xff0c; \u53e6\u5916&#xff0c;\u6211\u4eec\u5e76\u6ca1\u6709\u5206\u4eab\u6253\u5370\u673a\u5594&#xff01;\u800c\u5728 smb.conf \u5f53\u4e2d\u7684\u6279\u6ce8\u7b26\u53f7\u53ef\u4ee5\u662f\u300e # \u300f\u4e5f\u53ef\u4ee5\u662f\u300e ; \u300f\u5594&#xff01;\u8981\u6ce8\u610f&#xff01;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">cd \/etc\/samba<\/span><br \/>\n[root&#064;www samba]# <span style=\"color:#FFFF00\">cp smb.conf smb.conf.raw<\/span>  <span style=\"color:#ff6666\">&lt;&#061;&#061;\u5148\u5907\u4efd\u518d\u8bf4&#xff01;<\/span><br \/>\n[root&#064;www samba]# <span style=\"color:#FFFF00\">vim smb.conf<\/span><br \/>\n<span style=\"color:#ff6666\"># 1. \u5148\u8bbe\u5b9a\u597d\u670d\u52a1\u5668\u6574\u4f53\u73af\u5883\u65b9\u9762\u7684\u53c2\u6570<\/span><br \/>\n<span style=\"color:#FFFF00\">[global]<br \/>\n        <span style=\"color:#ff6666\"># \u4e0e\u4e3b\u673a\u540d\u6709\u5173\u7684\u8bbe\u5b9a\u4fe1\u606f<\/span><br \/>\n        workgroup     &#061; vbirdhouse<br \/>\n        netbios name  &#061; vbirdserver<br \/>\n        server string &#061; This is vbird&#039;s samba server<\/p>\n<p>        <span style=\"color:#ff6666\"># \u4e0e\u8bed\u7cfb\u65b9\u9762\u6709\u5173\u7684\u8bbe\u5b9a\u9879\u76ee\u5594&#xff0c;\u4e3a\u4f55\u5982\u6b64\u8bbe\u5b9a\u8bf7\u53c2\u8003\u524d\u9762\u7684\u8bf4\u660e<\/span><br \/>\n        unix charset    &#061; utf8<br \/>\n        display charset &#061; utf8<br \/>\n        dos charset     &#061; cp950<\/p>\n<p>        <span style=\"color:#ff6666\"># \u4e0e\u767b\u5f55\u6587\u4ef6\u6709\u5173\u7684\u8bbe\u5b9a\u9879\u76ee&#xff0c;\u6ce8\u610f\u53d8\u91cf (%m)<\/span><br \/>\n        log file &#061; \/var\/log\/samba\/log.%m<br \/>\n        max log size &#061; 50<\/p>\n<p>        <span style=\"color:#ff6666\"># \u8fd9\u91cc\u624d\u662f\u4e0e\u5bc6\u7801\u6709\u5173\u7684\u8bbe\u5b9a\u9879\u76ee\u54e9&#xff01;<\/span><br \/>\n        security &#061; share<\/p>\n<p>        <span style=\"color:#ff6666\"># \u4fee\u6539\u4e00\u4e0b\u6253\u5370\u673a\u7684\u52a0\u8f7d\u65b9\u5f0f&#xff0c;\u4e0d\u8981\u52a0\u8f7d\u5566&#xff01;<\/span><br \/>\n        load printers&#061; no<\/p>\n<p><span style=\"color:#ff6666\"># 2. \u5206\u4eab\u7684\u8d44\u6e90\u8bbe\u5b9a\u65b9\u9762&#xff1a;\u4e3b\u8981\u5f97\u5c06\u65e7\u7684\u6279\u6ce8&#xff0c;\u65b0\u7684\u52a0\u5165&#xff01;<br \/>\n#    \u5148\u53d6\u6d88 [homes], [printers] \u7684\u9879\u76ee&#xff0c;\u7136\u540e\u9488\u5bf9 \/tmp \u7684\u8bbe\u5b9a&#xff0c;\u53ef\u6d4f\u89c8\u4e14\u53ef\u5199\u5165\u5594<\/span><br \/>\n[temp]                                     <span style=\"color:#777777\">&lt;&#061;&#061;\u5206\u4eab\u8d44\u6e90\u540d\u79f0<\/span><br \/>\n        comment    &#061; Temporary file space  <span style=\"color:#777777\">&lt;&#061;&#061;\u7b80\u5355\u7684\u89e3\u91ca\u6b64\u8d44\u6e90<\/span><br \/>\n        path       &#061; \/tmp                  <span style=\"color:#777777\">&lt;&#061;&#061;\u5b9e\u9645 Linux \u5206\u4eab\u7684\u76ee\u5f55<\/span><br \/>\n        writable   &#061; yes                   <span style=\"color:#777777\">&lt;&#061;&#061;\u662f\u5426\u53ef\u5199\u5165&#xff1f;\u5728\u6b64\u4f8b\u4e3a\u662f\u7684<\/span><br \/>\n        browseable &#061; yes                   <span style=\"color:#777777\">&lt;&#061;&#061;\u80fd\u4e0d\u80fd\u88ab\u6d4f\u89c8\u5230\u8d44\u6e90\u540d\u79f0<\/span><br \/>\n        guest ok   &#061; yes<\/span>                   <span style=\"color:#777777\">&lt;&#061;&#061;\u5355\u7eaf\u5206\u4eab\u65f6&#xff0c;\u8ba9\u7528\u6237\u968f\u610f\u767b\u5165\u7684\u8bbe\u5b9a\u503c<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bf7\u4f60\u7279\u522b\u7559\u610f&#xff0c;\u5728\u539f\u672c\u7684 smb.conf \u4e0a\u9762\u5c31\u5df2\u7ecf\u6709\u5f88\u591a\u9ed8\u8ba4\u503c\u4e86&#xff0c;\u8fd9\u4e9b\u9ed8\u8ba4\u503c\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u4ed6\u7684\u7528\u9014&#xff0c; \u5c3d\u91cf\u4fdd\u7559\u9ed8\u8ba4\u503c&#xff0c;\u4e5f\u53ef\u4ee5\u4f7f\u7528 man smb.conf \u53bb\u67e5\u8be2\u8be5\u9ed8\u8ba4\u503c\u7684\u610f\u4e49\u3002\u4e0a\u8ff0\u7684\u8bbe\u5b9a\u662f\u5b8c\u5168\u63a7\u5236\u4f7f\u7528\u8005\u7684\u8ba4\u8bc1\u5c42\u7ea7\u7684\u5466&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">2. \u7528 testparm \u67e5\u9605 smb.conf \u7684\u8bed\u6cd5\u8bbe\u5b9a\u6b63\u786e\u6027<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u542f\u52a8 samba \u4e4b\u524d&#xff0c;\u6211\u4eec\u52a1\u5fc5\u8981\u4e86\u89e3\u5230 smb.conf \u91cc\u9762\u8bed\u6cd5\u662f\u5426\u6b63\u786e&#xff0c;\u68c0\u9a8c\u7684\u65b9\u5f0f\u4f7f\u7528 testparm \u8fd9\u4e2a\u6307\u4ee4\u5373\u53ef\u3002 \u6d4b\u8bd5\u65b9\u5f0f\u5982\u4e0b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-v &#xff1a;\u67e5\u9605\u5b8c\u6574\u7684\u53c2\u6570\u8bbe\u5b9a&#xff0c;\u8fde\u540c\u9ed8\u8ba4\u503c\u4e5f\u4f1a\u663e\u793a\u51fa\u6765\u5594&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\nLoad smb config files from \/etc\/samba\/smb.conf<br \/>\nProcessing section &#034;[temp]&#034;   <span style=\"color:#777777\">&lt;&#061;&#061;\u770b\u6709\u51e0\u4e2a\u4e2d\u62ec\u53f7&#xff0c;\u82e5\u4e2d\u522e\u53f7\u524d\u51fa\u73b0\u8baf\u606f&#xff0c;\u5219\u6709\u9519\u8bef<\/span><br \/>\nLoaded services file OK.<br \/>\nServer role: ROLE_STANDALONE<br \/>\nPress enter to see a dump of your service definitions <span style=\"color:#777777\">&lt;&#061;&#061;\u6309 Enter \u7ee7\u7eed<\/span><\/p>\n<p>[global]   <span style=\"color:#777777\">&lt;&#061;&#061;\u5e95\u4e0b\u5c31\u662f\u521a\u521a\u5728 smb.conf \u91cc\u5934\u8bbe\u5b9a\u7684\u6570\u636e&#xff01;<\/span><br \/>\n        dos charset &#061; cp950<br \/>\n        unix charset &#061; utf8<br \/>\n        display charset &#061; utf8<br \/>\n        workgroup &#061; VBIRDHOUSE<br \/>\n        netbios name &#061; VBIRDSERVER<br \/>\n        server string &#061; This is vbird&#039;s samba server<br \/>\n        security &#061; SHARE<br \/>\n        log file &#061; \/var\/log\/samba\/log.%m<br \/>\n        max log size &#061; 50<br \/>\n        load printers &#061; No<\/p>\n<p>[temp]<br \/>\n        comment &#061; Temporary file space<br \/>\n        path &#061; \/tmp<br \/>\n        read only &#061; No<br \/>\n        guest ok &#061; Yes<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u5934\u662f\u8bed\u6cd5\u9a8c\u8bc1\u4e0e\u5404\u4e2a\u9879\u76ee\u7684\u5217\u51fa&#xff0c;\u5982\u679c\u4f60\u4e0b\u8fbe testparm \u5374\u51fa\u73b0\u5982\u4e0b\u753b\u9762\u90a3\u5c31\u662f\u6709\u95ee\u9898&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\nLoad smb config files from \/etc\/samba\/smb.conf<br \/>\nUnknown parameter encountered: &#034;linux charset&#034; <span style=\"color:#777777\">&lt;&#061;&#061;\u4e2d\u62ec\u53f7\u524d\u4e3a\u9519\u8bef\u8baf\u606f&#xff01;<\/span><br \/>\nIgnoring unknown parameter &#034;linux charset&#034;<br \/>\nProcessing section &#034;[temp]&#034;<br \/>\nLoaded services file OK.<br \/>\nServer role: ROLE_STANDALONE<br \/>\nPress enter to see a dump of your service definitions<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u53d1\u73b0\u4e0a\u8ff0\u7684\u9519\u8bef&#xff0c;\u8fd9\u8868\u793a\u4f60\u7684 smb.conf \u6709\u4e2a\u300e linux charset \u300f\u7684\u8bbe\u5b9a\u53c2\u6570&#xff0c;\u4e0d\u8fc7 smb.conf \u5176\u5b9e\u662f\u4e0d\u652f\u6301\u8fd9\u4e2a\u53c2\u6570\u7684\u3002 \u53ef\u80fd\u7684\u95ee\u9898\u662f samba 2.x \u4e0e samba 3.x \u6709\u4e00\u4e9b\u9879\u76ee\u7684\u652f\u6301\u5df2\u7ecf\u4e0d\u5b58\u5728\u4e86&#xff0c;\u6240\u4ee5\u4f60\u4f7f\u7528\u65e7\u7248\u7684 2.x \u914d\u7f6e\u6587\u4ef6\u6765 3.x \u4e0a\u5934\u6267\u884c\u65f6&#xff0c;\u5c31\u4f1a\u51fa\u73b0\u95ee\u9898\u3002\u6b64\u5916&#xff0c;\u300e\u6253\u5b57\u9519\u8bef\u300f\u4e5f\u662f\u5f88\u5e38\u89c1\u7684\u4e00\u4e2a\u95ee\u9898\u5436&#xff01;\u8d76\u7d27\u6d4b\u8bd5\u4e00\u4e0b\u8bed\u6cd5\u5148&#xff0c; \u7136\u540e\u6839\u636e smb.conf \u5b58\u5728\u7684\u9879\u76ee\u53bb\u8fdb\u884c\u4fee\u6539\u5427\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u60f3\u8981\u4e86\u89e3 samba \u7684\u6240\u6709\u8bbe\u5b9a (\u5305\u62ec\u6ca1\u6709\u5728 smb.conf \u91cc\u5934\u8bbe\u5b9a\u7684\u9ed8\u8ba4\u503c)&#xff0c;\u53ef\u4ee5\u4f7f\u7528 testparm -v \u6765\u4f5c\u8be6\u7ec6\u7684\u8f93\u51fa&#xff0c; \u8d44\u6599\u76f8\u5f53\u7684\u4e30\u5bcc&#xff0c;\u900f\u8fc7\u8fd9\u4e2a\u4f60\u4e5f\u53ef\u4ee5\u77e5\u9053\u4f60\u7684\u4e3b\u673a\u73af\u5883\u8bbe\u5b9a\u4e3a\u4f55\u5462&#xff01; ^_^<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">3. \u670d\u52a1\u5668\u7aef\u7684\u670d\u52a1\u542f\u52a8\u4e0e\u57e0\u53e3\u89c2\u5bdf<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u542f\u52a8\u5b9e\u5728\u592a\u7b80\u5355\u4e86&#xff0c;\u5229\u7528\u9884\u8bbe\u7684 CentOS \u542f\u52a8\u65b9\u5f0f\u6765\u5904\u7406\u5373\u53ef\u3002<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb start<\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u4e00\u7248\u5f00\u59cb\u8981\u542f\u52a8\u4e24\u4e2adaemon<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/nmb start<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chkconfig smb on<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chkconfig nmb on<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">netstat -tlunp | grep mbd<\/span><br \/>\nActive Internet connections (only servers)<br \/>\nProto Recv-Q Send-Q Local Address        Foreign Address State   PID\/Program name<br \/>\ntcp        0      0 :::139               :::*            LISTEN  1772\/smbd<br \/>\ntcp        0      0 :::445               :::*            LISTEN  1772\/smbd<br \/>\nudp        0      0 192.168.1.100:137    0.0.0.0:*               1780\/nmbd<br \/>\nudp        0      0 192.168.100.254:137  0.0.0.0:*               1780\/nmbd<br \/>\nudp        0      0 0.0.0.0:137          0.0.0.0:*               1780\/nmbd<br \/>\nudp        0      0 192.168.1.100:138    0.0.0.0:*               1780\/nmbd<br \/>\nudp        0      0 192.168.100.254:138  0.0.0.0:*               1780\/nmbd<br \/>\nudp        0      0 0.0.0.0:138          0.0.0.0:*               1780\/nmbd<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7279\u522b\u6ce8\u610f&#xff0c;\u5728 Samba \u5f53\u4e2d\u9884\u8bbe\u4f1a\u542f\u52a8\u591a\u4e2a\u7aef\u53e3&#xff0c;\u8fd9\u5305\u62ec\u6570\u636e\u4f20\u8f93\u7684 TCP \u7aef\u53e3 (139, 445)&#xff0c;\u4ee5\u53ca\u8fdb\u884c NetBIOS \u540d\u79f0\u89e3\u6790\u4e4b\u7c7b\u5de5\u4f5c\u7684 UDP \u57e0\u53e3 (137, 138)&#xff0c;\u6240\u4ee5\u4f60\u624d\u4f1a\u770b\u5230\u5f88\u591a\u6570\u636e\u7684\u3002\u90a3\u4e48\u80fd\u5426\u4ec5\u652f\u6301 139 \u8fd9\u4e2a\u5fc5\u8981\u7684\u57e0\u53e3&#xff0c;\u5173\u95ed 445 \u5462&#xff1f;\u53ef\u4ee5\u554a&#xff5e;\u900f\u8fc7 testparm -v \u7684\u89c2\u5bdf&#xff0c;\u53ef\u4ee5\u53d1\u73b0\u300e smb ports &#061; 445 139 \u300f\u8fd9\u4e2a\u8bbe\u5b9a\u503c\u6307\u5b9a\u4e24\u4e2a\u57e0\u53e3\u7684&#xff0c;\u56e0\u6b64\u4f60\u53ef\u4ee5\u5728 smb.conf \u589e\u52a0\u8fd9\u4e2a\u8bbe\u5b9a\u503c&#xff0c;\u5e76\u6539\u4e3a smb ports &#061; 139 \u5373\u53ef\u3002\u4e0d\u8fc7&#xff0c;\u5efa\u8bae\u5148\u4fdd\u7559\u9ed8\u8ba4\u503c\u5566&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">4. \u5047\u8bbe\u81ea\u6211\u4e3a\u5ba2\u6237\u7aef\u7684\u68c0\u9a8c (\u9ed8\u8ba4\u7528 lo \u63a5\u53e3)<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5173\u4e8e\u5ba2\u6237\u7aef\u7684\u89c2\u5bdf\u6211\u4eec\u4f1a\u5728\u540e\u7eed\u8fdb\u884c\u4ecb\u7ecd\u3002\u5728\u8fd9\u91cc\u4ec5\u662f\u8bf4\u660e\u5982\u4f55\u786e\u5b9a\u6211\u4eec\u7684 Samba \u8bbe\u5b9a\u4e0e\u670d\u52a1\u6709\u987a\u5229\u7684\u5728\u8fd0\u4f5c\u3002 \u6211\u4eec\u53ef\u4ee5\u5728\u672c\u673a\u4e0a\u900f\u8fc7 smbclient \u8fd9\u652f\u7a0b\u5e8f\u6765\u5904\u7406&#xff0c;\u5b83\u7684\u57fa\u672c\u67e5\u8be2\u8bed\u6cd5\u662f\u8fd9\u6837\u7684&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">smbclient -L [\/\/\u4e3b\u673a\u6216IP] [-U \u4f7f\u7528\u8005\u8d26\u53f7]<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-L &#xff1a;\u4ec5\u67e5\u9605\u540e\u9762\u63a5\u7684\u4e3b\u673a\u6240\u63d0\u4f9b\u5206\u4eab\u7684\u76ee\u5f55\u8d44\u6e90&#xff1b;<br \/>\n-U &#xff1a;\u4ee5\u540e\u9762\u63a5\u7684\u8fd9\u4e2a\u8d26\u53f7\u6765\u5c1d\u8bd5\u53d6\u5f97\u8be5\u4e3b\u673a\u7684\u53ef\u4f7f\u7528\u8d44\u6e90<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u5728\u8fd9\u4e2a\u8303\u4f8b\u5f53\u4e2d\u6211\u4eec\u5e76\u6ca1\u6709\u89c4\u8303\u7528\u6237\u7684\u5b89\u5168\u7b49\u7ea7 (share)&#xff0c;\u6240\u4ee5\u4e0d\u5fc5\u4f7f\u7528 -U \u8fd9\u4e2a\u9009\u9879&#xff0c;\u56e0\u6b64\u4f60\u53ef\u4ee5\u8fd9\u6837\u770b\u770b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/127.0.0.1 <\/span><br \/>\nEnter root&#039;s password: <span style=\"color:#777777\">&lt;&#061;&#061;\u56e0\u4e3a\u4e0d\u9700\u8981\u5bc6\u7801&#xff0c;\u56e0\u6b64\u8fd9\u91cc\u5355\u51fb [Enter] \u5427&#xff01;<\/span><br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Sharename       Type      Comment<br \/>\n        &#8212;&#8212;&#8212;       &#8212;-      &#8212;&#8212;-<br \/>\n        <span style=\"color:#FFFF00\">temp            Disk      Temporary file space<\/span><br \/>\n        IPC$            IPC       IPC Service (This is vbird&#039;s samba server)<br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Server               Comment<br \/>\n        &#8212;&#8212;&#8212;            &#8212;&#8212;-<br \/>\n        VBIRDSERVER          This is vbird&#039;s samba server<\/p>\n<p>        Workgroup            Master<br \/>\n        &#8212;&#8212;&#8212;            &#8212;&#8212;-<br \/>\n        VBIRDHOUSE           VBIRDSERVER<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u8868\u8f93\u51fa\u7684\u4fe1\u606f\u5f53\u4e2d&#xff0c;\u5206\u4eab\u7684\u76ee\u5f55\u8d44\u6e90 (Sharename) \u5c31\u662f\u5728 smb.conf \u5f53\u4e2d\u8bbe\u5b9a\u7684 [temp] \u540d\u79f0\u5570&#xff01; \u56e0\u6b64\u5728\u8fd9\u91cc\u7684\u610f\u601d\u662f&#xff1a;<span style=\"color:#000088\">\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8fdb\u5165 \/\/127.0.0.1\/temp \u8fd9\u4e2a\u76ee\u5f55\u5f53\u4e2d&#xff0c; \u800c\u8fd9\u4e2a\u76ee\u5f55\u5728 Linux \u7cfb\u7edf\u5176\u5b9e\u662f \/tmp \u76ee\u5f55\u3002<\/span>\u81f3\u4e8e\u90a3\u4e2a IPC$ \u5219\u662f\u4e3a\u4e86\u8981\u5e94\u4ed8 Windows \u73af\u5883\u6240\u5fc5\u987b\u8981\u5b58\u5728\u7684\u9879\u76ee\u5c31\u662f\u4e86\u3002\u90a3\u4e48\u8be5\u5982\u4f55\u4f7f\u7528\u8fd9\u4e2a\u8d44\u6e90\u5462&#xff1f;\u63a5\u4e0b\u6765\u6211\u4eec\u53ef\u4ee5\u5229\u7528 mount \u8fd9\u4e2a\u6307\u4ee4\u6765\u6d4b\u8bd5\u770b\u770b\u5570&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">mount -t cifs \/\/127.0.0.1\/temp \/mnt<\/span><br \/>\nPassword: <span style=\"color:#777777\">&lt;&#061;&#061;\u56e0\u4e3a\u6ca1\u6709\u5bc6\u7801&#xff0c;\u6240\u4ee5\u8fd9\u91cc\u8fd8\u662f\u6309 Enter \u5373\u53ef<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">df<\/span><br \/>\nFilesystem           1K-blocks      Used Available Use% Mounted on<br \/>\n<span style=\"color:#ff6666\">&#8230;.(\u524d\u9762\u7701\u7565)&#8230;.<\/span><br \/>\n\/\/127.0.0.1\/temp\/      1007896     53688    903008   6% \/mnt<\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">cd \/mnt<\/span><br \/>\n[root&#064;www mnt]# <span style=\"color:#FFFF00\">ll<\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u4ee5\u4e0a\u8fd9\u4e24\u4e2a\u52a8\u4f5c\u8981\u8fdb\u884c&#xff01;\u624d\u4f1a\u77e5\u9053\u6709\u6ca1\u6709\u6743\u9650\u7684\u95ee\u9898&#xff01;<\/span><br \/>\n[root&#064;www mnt]# <span style=\"color:#FFFF00\">touch zzz<\/span><br \/>\n[root&#064;www mnt]# <span style=\"color:#FFFF00\">ll zzz \/tmp\/zzz<\/span><br \/>\n-rw-r&#8211;r&#8211;. 1 <span style=\"color:#FFFF00\">nobody nobody<\/span> 0 Jul 29 13:08 \/tmp\/zzz<br \/>\n-rw-r&#8211;r&#8211;. 1 nobody nobody 0 Jul 29 13:08 zzz<br \/>\n<span style=\"color:#ff6666\"># \u6ce8\u610f\u5594&#xff01;\u4f60\u8fdb\u5165 \/mnt \u8eab\u4efd\u4f1a\u88ab\u538b\u7f29\u6210\u4e3a nobody \u5462&#xff01;\u4e0d\u518d\u662f root \u554a&#xff01;<\/span><\/p>\n<p>[root&#064;www mnt]# <span style=\"color:#FFFF00\">cd ; umount \/mnt<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u786e\u5b9e\u53ef\u4ee5\u6302\u8f7d\u7684\u8d77\u6765&#xff0c;\u6240\u4ee5&#xff0c;\u6d4b\u8bd5\u5b8c\u6bd5\u540e&#xff0c;\u5c31\u5c06\u8fd9\u4e2a\u6302\u8f7d\u7684\u8d44\u6599\u5378\u9664\u5427\u3002\u5173\u4e8e mount \u7684\u7528\u6cd5&#xff0c;\u6211\u4eec\u4f1a\u5728\u540e\u9762\u7684\u5c0f\u8282\u7ee7\u7eed\u4ecb\u7ecd\u3002<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u57fa\u672c\u4e0a&#xff0c;\u5230\u6b64\u4e3a\u6b62\u54b1\u4eec\u5c31\u8bbe\u5b9a\u597d\u4e00\u4e2a\u7b80\u5355\u7684\u4e0d\u9700\u8981\u5bc6\u7801\u5373\u53ef\u767b\u5165\u7684 Samba \u670d\u52a1\u5668\u4e86&#xff01; \u4f60\u53ef\u4ee5\u5148\u884c\u5230\u5ba2\u6237\u7aef\u8f6f\u4ef6\u529f\u80fd\u7684\u90e8\u5206\u8fdb\u884c\u66f4\u7ec6\u90e8\u7684\u6302\u8f7d\u6d4b\u8bd5\u3002 \u63a5\u4e0b\u6765&#xff0c;\u8ba9\u6211\u4eec\u4ee5\u7b80\u6613\u7684\u9700\u8981\u5bc6\u7801\u624d\u80fd\u591f\u767b\u5165 Samba \u7684\u65b9\u5f0f\u6765\u8bbe\u8ba1\u4e00\u4e2a\u8303\u4f8b\u5427&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134928-680258684ff1f.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.4 \u9700\u8d26\u53f7\u5bc6\u7801\u624d\u53ef\u767b\u5165\u7684\u5206\u4eab (security &#061; user)<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bbe\u5b9a\u4e00\u90e8\u4e0d\u9700\u5bc6\u7801\u5373\u53ef\u767b\u5165\u7684 Samba server \u662f\u975e\u5e38\u7b80\u5355\u7684&#xff0c;\u4e0d\u8fc7&#xff0c; \u4f60\u603b\u4e0d\u5e0c\u671b\u67d0\u4e9b\u6709\u673a\u5bc6\u6027\u8d28\u7684\u8d44\u6599\u653e\u5728\u4e0d\u8bbe\u9632\u7684\u7f51\u82b3\u4e2d\u8ba9\u5927\u5bb6\u67e5\u9605\u5427&#xff1f; \u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u4f60\u603b\u4e0d\u5e0c\u671b\u4f60\u7684\u5bb6\u76ee\u5f55\u88ab\u4eba\u5bb6\u968f\u610f\u6d4f\u89c8\u5427&#xff1f;\u5bb6\u76ee\u5f55\u5185\u53ef\u80fd\u6709\u4f60\u81ea\u5df1\u7684\u60c5\u4e66\u5462&#xff01;^_^<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u600e\u4e48\u529e&#xff1f;\u6ca1\u5173\u7cfb&#xff0c;\u6211\u4eec\u53ef\u4ee5\u900f\u8fc7 Samba \u670d\u52a1\u5668\u63d0\u4f9b\u7684\u8ba4\u8bc1\u65b9\u5f0f\u6765\u8fdb\u884c\u7528\u6237\u6743\u529b\u7684\u7ed9\u4e88&#xff0c; \u4e5f\u5c31\u662f\u8bf4&#xff0c;\u4f60\u5728\u5ba2\u6237\u7aef\u8054\u673a\u5230\u670d\u52a1\u5668\u65f6&#xff0c;\u5fc5\u987b\u8981\u8f93\u5165\u6b63\u786e\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u540e&#xff0c;\u624d\u80fd\u591f\u767b\u5165 Samba \u67e5\u9605\u5230\u4f60\u81ea\u5df1\u7684\u6570\u636e&#xff01; \u90a3\u4f1a\u4e0d\u4f1a\u5f88\u96be\u554a&#xff1f;\u4e0d\u4f1a\u5566&#xff01; Samba \u672c\u8eab\u5c31\u63d0\u4f9b\u4e00\u4e2a\u5c0f\u7a0b\u5e8f\u6765\u5e2e\u52a9\u6211\u4eec\u5904\u7406\u5bc6\u7801\u7684\u5efa\u7acb\u4e86&#xff0c;\u6574\u4e2a\u6d41\u7a0b\u8fd8\u4e0d\u592a\u96be\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6bd4\u8f83\u91cd\u8981\u7684\u662f\u00a0<span style=\"color:#000088\">Samba \u4f7f\u7528\u8005\u8d26\u53f7\u5fc5\u987b\u8981\u5b58\u5728\u4e8e Linux \u7cfb\u7edf\u5f53\u4e2d (\/etc\/passwd)&#xff0c; \u4f46\u662f Samba \u7684\u5bc6\u7801\u4e0e Unix \u7684\u5bc6\u7801\u6863\u6848\u5e76\u4e0d\u76f8\u540c<\/span>\u00a0(\u8fd9\u662f\u56e0\u4e3a Linux \u4e0e\u7f51\u82b3\u7684\u5bc6\u7801\u9a8c\u8bc1\u65b9\u5f0f\u53ca\u7f16\u7801\u683c\u5f0f\u4e0d\u540c\u6240\u81f4)\u3002 \u8fd9\u5c31\u6bd4\u8f83\u6709\u70b9\u5c0f\u9ebb\u70e6&#xff5e;\u6ca1\u5173\u7cfb&#xff0c;\u5c31\u8ba9\u6211\u4eec\u4f9d\u6837\u753b\u846b\u82a6\u6765\u5904\u7406\u4e00\u4e0b\u8fd9\u4e2a\u90e8\u5206\u7684\u8bbe\u5b9a\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">0. \u5047\u8bbe\u6761\u4ef6<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u4f7f\u7528\u8005\u5c42\u7ea7\u4f1a\u6539\u53d8\u6210 user \u7684\u9636\u6bb5&#xff0c;\u56e0\u6b64 [temp] \u5df2\u7ecf\u6ca1\u6709\u5fc5\u8981\u5b58\u5728&#xff01;\u8bf7\u5c06\u8be5\u8bbe\u5b9a\u5220\u9664\u6216\u6279\u6ce8\u3002 \u800c\u670d\u52a1\u5668\u65b9\u9762\u7684\u6574\u4f53\u6570\u636e\u5219\u8bf7\u4fdd\u7559&#xff0c;\u5305\u62ec\u5de5\u4f5c\u7ec4\u7b49\u7b49\u7684\u6570\u636e&#xff0c;\u5e76\u65b0\u589e\u5e95\u4e0b\u7684\u8d44\u6599&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f7f\u7528\u8005\u8ba4\u8bc1\u5c42\u7ea7\u8bbe\u5b9a (security) \u4e3a&#xff1a; user<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7528\u6237\u5bc6\u7801\u6863\u6848\u4f7f\u7528 TDB \u6570\u636e\u5e93\u683c\u5f0f&#xff0c;\u9ed8\u8ba4\u6863\u6848\u5728 \/var\/lib\/samba\/private\/ \u5185&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5bc6\u7801\u5fc5\u987b\u8981\u52a0\u5bc6&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6bcf\u4e2a\u53ef\u4f7f\u7528 samba \u7684\u4f7f\u7528\u8005\u5747\u62e5\u6709\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bbe\u5b9a\u4e09\u4e2a\u7528\u6237&#xff0c;\u540d\u79f0\u4e3a smb1, smb2, smb3 &#xff0c;\u4e14\u5747\u52a0\u5165 users \u4e3a\u6b21\u8981\u7fa4\u7ec4\u3002\u6b64\u4e09\u4e2a\u7528\u6237 Linux \u5bc6\u7801\u4e3a 1234&#xff0c; Samba \u5bc6\u7801\u5219\u4e3a 4321&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5206\u4eab \/home\/project \u8fd9\u4e2a\u76ee\u5f55&#xff0c;\u4e14\u8d44\u6e90\u540d\u79f0\u53d6\u540d\u4e3a&#xff1a; project&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u52a0\u5165 users \u8fd9\u4e2a\u7fa4\u7ec4\u7684\u4f7f\u7528\u8005\u53ef\u4ee5\u4f7f\u7528 \/\/IP\/project \u8d44\u6e90&#xff0c;\u4e14\u5728\u8be5\u76ee\u5f55\u4e0b users \u8fd9\u4e2a\u7fa4\u7ec4\u7684\u4f7f\u7528\u8005\u5177\u6709\u5199\u5165\u7684\u6743\u9650\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u597d\u4e86&#xff0c;\u5f00\u59cb\u4e00\u6b65\u6b65\u7684\u5904\u7406\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">1. \u8bbe\u5b9a smb.conf \u914d\u7f6e\u6587\u4ef6\u4e0e\u76ee\u5f55\u6743\u9650\u76f8\u5173\u4e4b\u8bbe\u5b9a<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u8fd9\u4e2a\u8303\u4f8b\u7684\u914d\u7f6e\u6587\u4ef6\u5f53\u4e2d&#xff0c;\u6211\u4eec\u4f1a\u65b0\u589e\u51e0\u4e2a\u53c2\u6570&#xff0c;\u65b0\u589e\u7684\u53c2\u6570\u90e8\u5206\u4f1a\u7528\u7279\u6b8a\u5b57\u4f53\u5708\u8d77\u6765&#xff0c; \u5f15\u7528\u4e4b\u524d\u53c2\u6570\u7684\u90e8\u5206\u5219\u4e3a\u4e00\u822c\u5b57\u4f53\u3002\u8bf7\u4ea4\u4e92\u53c2\u8003\u770b\u770b\u5570&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 1. \u5f00\u59cb\u8bbe\u5b9a\u91cd\u8981\u7684 smb.conf \u6863\u6848\u5466&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n        workgroup       &#061; vbirdhouse<br \/>\n        netbios name    &#061; vbirdserver<br \/>\n        server string   &#061; This is vbird&#039;s samba server<br \/>\n        unix charset    &#061; utf8<br \/>\n        display charset &#061; utf8<br \/>\n        dos charset     &#061; cp950<br \/>\n        log file        &#061; \/var\/log\/samba\/log.%m<br \/>\n        max log size    &#061; 50<br \/>\n        load printers&#061; no<\/p>\n<p><span style=\"color:#ff6666\">        # \u4e0e\u5bc6\u7801\u6709\u5173\u7684\u8bbe\u5b9a\u9879\u76ee&#xff0c;\u5305\u62ec\u5bc6\u7801\u6863\u6848\u6240\u5728\u683c\u5f0f\u5594&#xff01;<\/span><br \/>\n<span style=\"color:#FFFF00\">        security &#061; user          <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u884c\u5c31\u662f\u91cd\u70b9\u5566&#xff01;\u6539\u6210 user \u5c42\u7ea7<\/span><br \/>\n        passdb backend &#061; tdbsam  <span style=\"color:#777777\">&lt;&#061;&#061;\u4f7f\u7528\u7684\u662f TDB \u6570\u636e\u5e93\u683c\u5f0f&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#ff6666\"># 2. \u5206\u4eab\u7684\u8d44\u6e90\u8bbe\u5b9a\u65b9\u9762&#xff1a;\u5220\u9664 temp  \u52a0\u5165 homes \u4e0e project<\/span><br \/>\n<span style=\"color:#FFFF00\">[homes]                                   <span style=\"color:#777777\">&lt;&#061;&#061;\u5206\u4eab\u7684\u8d44\u6e90\u540d\u79f0<\/span><br \/>\n        comment        &#061; Home Directories<br \/>\n        browseable     &#061; no               <span style=\"color:#777777\">&lt;&#061;&#061;\u9664\u4e86\u4f7f\u7528\u8005\u81ea\u5df1\u5916&#xff0c;\u4e0d\u53ef\u88ab\u5176\u4ed6\u4eba\u6d4f\u89c8<\/span><br \/>\n        writable       &#061; yes              <span style=\"color:#777777\">&lt;&#061;&#061;\u6302\u8f7d\u540e\u53ef\u64e6\u5199\u6b64\u5206\u4eab<\/span><br \/>\n        create mode    &#061; 0664             <span style=\"color:#777777\">&lt;&#061;&#061;\u5efa\u7acb\u6863\u6848\u7684\u6743\u9650\u4e3a 664<\/span><br \/>\n        directory mode &#061; 0775             <span style=\"color:#777777\">&lt;&#061;&#061;\u5efa\u7acb\u76ee\u5f55\u7684\u6743\u9650\u4e3a 775<\/span><\/p>\n<p>[project]                                 <span style=\"color:#777777\">&lt;&#061;&#061;\u5c31\u662f\u90a3\u4e09\u4f4d\u4f7f\u7528\u8005\u7684\u5171\u4eab\u8d44\u6e90<\/span><br \/>\n        comment    &#061; smbuser&#039;s project<br \/>\n        path       &#061; \/home\/project        <span style=\"color:#777777\">&lt;&#061;&#061;\u5b9e\u9645\u7684 Linux \u4e0a\u9762\u7684\u76ee\u5f55\u4f4d\u7f6e<\/span><br \/>\n        browseable &#061; yes                  <span style=\"color:#777777\">&lt;&#061;&#061;\u53ef\u88ab\u5176\u4ed6\u4eba\u6240\u6d4f\u89c8\u5230\u8d44\u6e90\u540d\u79f0(\u975e\u5185\u5bb9)<\/span><br \/>\n        writable   &#061; yes                  <span style=\"color:#777777\">&lt;&#061;&#061;\u53ef\u4ee5\u88ab\u5199\u5165<\/span><br \/>\n        write list &#061; &#064;users<\/span>               <span style=\"color:#777777\">&lt;&#061;&#061;\u5199\u5165\u8005\u6709\u54ea\u4e9b\u4eba\u7684\u610f\u601d<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2. \u6bcf\u6b21\u6539\u5b8c smb.conf \u4f60\u90fd\u9700\u8981\u91cd\u65b0\u68c0\u67e5\u4e00\u4e0b\u8bed\u6cd5\u6b63\u786e\u5426&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u8be6\u7ec6\u7684 debug \u8bf7\u81ea\u884c\u5904\u7406\u5570&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u4e0a\u8868\u5f53\u4e2d\u6bd4\u8f83\u6709\u8da3\u7684\u8bbe\u5b9a\u9879\u76ee\u4e3b\u8981\u6709&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">[global] \u4fee\u6539\u4e0e\u65b0\u589e\u7684\u90e8\u5206<\/span>&#xff1a;security \u8bbe\u5b9a\u4e3a user \u5c42\u7ea7&#xff0c;\u4e14\u4f7f\u7528\u300epassdb backend &#061; tdbsam\u300f\u8fd9\u4e2a\u6570\u636e\u5e93\u683c\u5f0f&#xff0c;\u56e0\u6b64\u5bc6\u7801\u6587\u4ef6\u4f1a\u653e\u7f6e\u4e8e \/var\/lib\/samba\/private\/ \u5185\u3002 \u6b64\u5916&#xff0c;\u9ed8\u8ba4\u5bc6\u7801\u5c31\u662f\u52a0\u5bc6\u7684&#xff0c;\u56e0\u6b64\u4e0d\u9700\u8981\u989d\u5916\u4f7f\u7528\u5176\u4ed6\u7684\u8bbe\u5b9a\u53c2\u6570\u6765\u89c4\u8303&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">[homes] \u8fd9\u4e2a\u4f7f\u7528\u8005\u8d44\u6e90\u5171\u4eab\u90e8\u5206<\/span>&#xff1a; homes \u662f\u6700\u7279\u6b8a\u7684\u8d44\u6e90\u5171\u4eab\u540d\u79f0&#xff0c;\u56e0\u4e3a Linux \u4e0a\u9762\u7684\u6bcf\u4f4d\u7528\u6237\u5747\u6709\u5bb6\u76ee\u5f55&#xff0c;\u4f8b\u5982 smb1 \u7684\u5bb6\u76ee\u5f55\u4f4d\u4e8e \/home\/smb1\/ &#xff0c;\u90a3\u5f53 smb1 \u7528\u6237\u4f7f\u7528 samba \u65f6&#xff0c;\u5979\u5c31\u4f1a\u53d1\u73b0\u591a\u4e86\u4e2a \/\/127.0.0.1\/smb1\/ \u7684\u8d44\u6e90\u53ef\u7528&#xff0c;\u800c smb2 \u5c31\u5728 \/\/127.0.0.1\/smb2\/ \u8fd9\u4e2a\u8d44\u6e90\u3002\u7531\u4e8e\u4e0d\u53ef\u6d4f\u89c8 (browseable)&#xff0c;\u6240\u4ee5\u9664\u4e86\u4f7f\u7528\u8005\u53ef\u4ee5\u770b\u5230\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55\u8d44\u6e90\u5916&#xff0c;\u5176\u4ed6\u4eba\u662f\u65e0\u6cd5\u6d4f\u89c8\u7684\u3002\u6b64\u5916&#xff0c;\u4e3a\u4e86\u89c4\u8303\u6743\u9650&#xff0c;\u800c\u591a\u4e86 create mode \u4e0e directory mode \u4e24\u4e2a\u8bbe\u5b9a\u503c (\u6b64\u503c\u53ef\u8bbe\u5b9a\u4e5f\u53ef\u4e0d\u7406\u4f1a)&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">[project] \u8fd9\u4e2a\u4f7f\u7528\u8005\u8d44\u6e90\u5171\u4eab\u90e8\u5206<\/span>&#xff1a;\u5f53\u6211\u4eec\u65b0\u589e\u4e00\u4e2a\u5171\u4eab\u8d44\u6e90\u65f6&#xff0c; \u6700\u91cd\u8981\u7684\u5c31\u662f\u89c4\u8303\u8d44\u6e90\u540d\u79f0\u3002\u5728\u6b64\u4f8b\u4e2d\u6211\u4eec\u4f7f\u7528 project \u8fd9\u4e2a\u8d44\u6e90\u540d\u79f0\u6765\u6307\u5411 \/home\/project &#xff0c;\u4e5f\u5c31\u662f\u8bf4&#xff0c; \/\/127.0.0.1\/project \u4ee3\u8868\u7684\u662f \/home\/project \u7684\u610f\u601d\u3002\u6b64\u5916&#xff0c;\u80fd\u591f\u4f7f\u7528\u8fd9\u4e2a\u8d44\u6e90\u7684\u8d26\u53f7&#xff0c;\u4e3a\u52a0\u5165 users \u8fd9\u4e2a\u7fa4\u7ec4\u7684\u7528\u6237\u5594&#xff01; \u900f\u8fc7 write list \u8fd9\u4e2a\u9879\u76ee\u6bd4\u8f83\u5355\u7eaf&#xff0c;\u5982\u679c\u662f\u65e9\u671f\u7684\u8bbe\u5b9a&#xff0c;\u53ef\u80fd\u4f1a\u4f7f\u7528 valid users &#xff0c;\u4f46\u8fd1\u6765\u9e1f\u54e5\u6bd4\u8f83\u504f\u597d write list \u8bbe\u5b9a\u9879\u76ee\u3002\u00a0<span style=\"color:#000088\">\u4e0d\u8fc7\u80fd\u5426\u987a\u5229\u7684\u5b58\u53d6\u6863\u6848\u8fd8\u4e0e Linux \u6700\u5e95\u5c42\u7684\u6863\u6848\u6743\u9650\u6709\u5173\u3002<\/span><\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5343\u4e07\u4e0d\u8981\u5fd8\u8bb0\u4e86&#xff0c;\u9664\u4e86\u914d\u7f6e\u6587\u4ef6\u4e4b\u5916&#xff0c;\u8be6\u7ec6\u7684\u76ee\u5f55\u6743\u9650\u4e0e\u8d26\u53f7\u8bbe\u5b9a\u7b49\u89c4\u8303\u4e5f\u8981\u8bbe\u5b9a\u597d&#xff01;\u5e95\u4e0b\u6211\u4eec\u7528\u8303\u4f8b\u6765\u8fdb\u884c\u6b64\u9879\u5de5\u4f5c&#xff01;<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f8b\u9898&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eec\u9884\u8ba1\u8981\u5206\u4eab \/home\/project \u76ee\u5f55&#xff0c;\u8fd9\u4e2a\u76ee\u5f55\u7684\u6743\u9650\u8be5\u5982\u4f55\u8bbe\u5b9a&#xff1f;<\/span><\/span><br \/>\n       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7b54&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56e0\u4e3a\u662f\u8981\u5f00\u653e\u7ed9 users \u7fa4\u7ec4&#xff0c;\u800c\u5171\u4eab\u7fa4\u7ec4\u7684\u6743\u9650\u901a\u5e38\u662f\u300e 2770 \u300f\u8fd9\u4e2a\u542b\u6709 SGID \u7684\u7279\u6b8a\u65d7\u6807\u529f\u80fd\u3002\u56e0\u6b64\u8fd9\u4e2a\u76ee\u5f55\u5e94\u8be5\u5982\u6b64\u8bbe\u5b9a\u624d\u597d&#xff1a;<\/span><\/span> <\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">mkdir \/home\/project<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chgrp users \/home\/project<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chmod 2770 \/home\/project<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">ll -d \/home\/project<\/span><br \/>\ndrwxrws&#8212;. 2 root users 4096 Jul 29 13:17 \/home\/project<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u00a0 <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">2. \u8bbe\u5b9a\u53ef\u4f7f\u7528 Samba \u7684\u7528\u6237\u8d26\u53f7\u4e0e\u5bc6\u7801<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bbe\u5b9a\u4f7f\u7528\u8005\u8d26\u53f7\u662f\u5f88\u91cd\u8981\u7684\u4e00\u73af&#xff0c;\u56e0\u4e3a\u8bbe\u5b9a\u9519\u8bef\u7684\u8bdd&#xff0c;\u5f53\u7136\u4e5f\u5c31\u4efb\u4f55\u4eba\u90fd\u6ca1\u6709\u529e\u6cd5\u767b\u5165\u7684&#xff01;\u5728\u8fd9\u91cc\u6211\u4eec\u5fc5\u987b\u5148\u8981\u8bf4\u660e\u4e00\u4e0b Linux \u7684\u6587\u4ef6\u7cfb\u7edf\u4e0e SAMBA \u8bbe\u5b9a\u7684\u4f7f\u7528\u8005\u767b\u5165\u6743\u9650\u7684\u76f8\u5173\u6027&#xff01;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 Linux \u8fd9\u4e2a\u7cfb\u7edf\u4e0b&#xff0c;\u4efb\u4f55\u7a0b\u5e8f\u90fd\u9700\u8981\u53d6\u5f97 UID \u4e0e GID (User ID \u4e0e Group ID) \u7684\u8eab\u4efd\u4e4b\u540e&#xff0c;\u624d\u80fd\u591f\u62e5\u6709\u8be5\u8eab\u4efd\u7684\u6743\u9650&#xff0c;\u4e5f\u624d\u80fd\u591f\u9002\u5f53\u7684\u8fdb\u884c\u5b58\u53d6\u6863\u6848\u7b49\u52a8\u4f5c&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5173\u4e8e Linux \u8fd9\u4e2a\u7cfb\u7edf\u7684 UID \u4e0e GID \u4e0e\u8d26\u53f7\u7684\u76f8\u5bf9\u5173\u7cfb&#xff0c;\u4e00\u822c\u8bb0\u5f55\u5728 \/etc\/passwd \u5f53\u4e2d&#xff0c;\u5f53\u7136\u4e5f\u80fd\u900f\u8fc7 NIS, ldap \u7b49\u65b9\u5f0f\u6765\u53d6\u5bf9\u5e94&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u4ec5\u53ea\u662f Linux \u5e95\u4e0b\u7684\u4e00\u5957\u8f6f\u4ef6&#xff0c;\u4f7f\u7528 SAMBA \u6765\u8fdb\u884c Linux \u6587\u4ef6\u7cfb\u7edf\u65f6&#xff0c;\u8fd8\u662f\u9700\u8981\u4ee5 Linux \u7cfb\u7edf\u4e0b\u7684 UID \u4e0e GID \u4e3a\u51c6\u5219&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4e0a\u9762\u8fd9\u51e0\u70b9\u8bf4\u660e\u4f60\u6ca1\u6709\u95ee\u9898\u4e86&#xff0c;\u73b0\u5728\u5c31\u6765\u770b\u4e00\u4e0b\u5f53\u6211\u4eec\u5728 Windows \u8ba1\u7b97\u673a\u4e0a\u9762\u4ee5\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u6765\u8fde\u63a5 Linux \u5e76\u4e14\u8fdb\u884c\u6570\u636e\u7684\u5b58\u53d6\u65f6&#xff0c;\u4f1a\u662f\u600e\u6837\u7684\u4e00\u4e2a\u60c5\u51b5\u5462&#xff1f;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">\u6211\u4eec\u9700\u8981\u900f\u8fc7 SAMBA \u6240\u63d0\u4f9b\u7684\u529f\u80fd\u6765\u8fdb\u884c Linux \u7684\u5b58\u53d6&#xff0c;\u800c Linux \u7684\u5b58\u53d6\u662f\u9700\u8981\u53d6\u5f97 Linux \u7cfb\u7edf\u4e0a\u9762\u7684 UID \u4e0e GID \u7684&#xff0c;\u56e0\u6b64&#xff0c;\u6211\u4eec\u767b\u5165 SAMBA \u670d\u52a1\u5668\u65f6&#xff0c;\u6240\u5229\u7528 SAMBA \u53d6\u5f97\u7684\u5176\u5b9e\u662f Linux \u7cfb\u7edf\u91cc\u9762\u7684\u76f8\u5173\u8d26\u53f7&#xff01;\u8fd9\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5728 SAMBA \u4e0a\u9762\u7684\u4f7f\u7528\u8005\u8d26\u53f7&#xff0c;\u5fc5\u987b\u8981\u662f Linux \u8d26\u53f7\u4e2d\u7684\u4e00\u4e2a&#xff01;<\/span><\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6240\u4ee5\u8bf4&#xff0c;\u5728\u4e0d\u8003\u8651 NIS \u6216 LDAP \u7b49\u5176\u4ed6\u8d26\u53f7\u7684\u9a8c\u8bc1\u65b9\u5f0f&#xff0c;\u5355\u7eaf\u4ee5 Linux \u672c\u673a\u8d26\u53f7 (\/etc\/passwd) \u4f5c\u4e3a\u8eab\u4efd\u9a8c\u8bc1\u65f6&#xff0c;\u00a0<span style=\"color:#000088\">\u5728 Samba \u670d\u52a1\u5668\u6240\u63d0\u4f9b\u53ef\u767b\u5165\u7684\u8d26\u53f7\u540d\u79f0&#xff0c;\u5fc5\u987b\u8981\u5b58\u5728\u4e8e \/etc\/passwd \u5f53\u4e2d&#xff01;<\/span>\u00a0\u8fd9\u662f\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u6982\u5ff5&#xff01;\u4f8b\u5982\u4f60\u8981\u5148\u6709 dmtsai \u5728 \/etc\/passwd \u5f53\u4e2d\u540e&#xff0c;\u624d\u80fd\u5c06 dmtsai \u52a0\u5165 Samba \u7684\u4f7f\u7528\u8005\u5f53\u4e2d\u3002\u8fd9\u90fd\u662f\u5f88\u57fa\u672c\u7684\u8d26\u53f7\u6743\u9650\u6982\u5ff5&#xff0c;\u5982\u679c\u4f60\u89c9\u5f97\u8fd9\u91cc\u9605\u8bfb\u65b9\u9762\u6709\u95ee\u9898&#xff0c; \u82e5\u4e0d\u8003\u8651\u9e1f\u54e5\u7684\u89e3\u91ca\u4e0d\u826f&#xff0c;\u8868\u793a\u4f60\u5fc5\u987b\u8981\u56de\u53bb\u8bfb\u8bfb\u57fa\u7840\u7bc7\u4e86&#xff5e; ^_^<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u6211\u4eec\u77e5\u9053\u9700\u8981\u65b0\u589e smb1, smb2, smb3 \u4e09\u4e2a\u7528\u6237&#xff0c;\u4e14\u8fd9\u4e09\u4e2a\u7528\u6237\u9700\u8981\u52a0\u5165 users \u7fa4\u7ec4\u3002\u6b64\u5916&#xff0c;\u6211\u4eec\u4e4b\u524d\u8fd8\u5efa\u7acb\u8fc7 student \u8fd9\u4e2a\u7528\u6237&#xff0c;\u5047\u8bbe\u8fd9\u56db\u4e2a\u4eba\u90fd\u9700\u8981\u80fd\u7528 Samba \u670d\u52a1&#xff0c;\u90a3\u4e48\u9664\u4e86\u65b0\u589e\u7528\u6237\u4e4b\u5916&#xff0c;\u6211\u4eec\u8fd8\u9700\u8981\u5229\u7528 pdbedit \u8fd9\u4e2a\u6307\u4ee4\u6765\u5904\u7406 Samba \u7528\u6237\u529f\u80fd\u5594&#xff01;<\/span><\/span><\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 1. \u5148\u6765\u5efa\u7acb\u6240\u9700\u8981\u7684\u5404\u4e2a\u8d26\u53f7&#xff0c;\u4f46\u5047\u8bbe student \u5df2\u7ecf\u5b58\u5728\u4e86\u5594&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -G users smb1<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -G users smb2<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -G users smb3<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">echo 1234 | passwd &#8211;stdin smb1<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">echo 1234 | passwd &#8211;stdin smb2<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">echo 1234 | passwd &#8211;stdin smb3<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2. \u4f7f\u7528 pdbedit \u6307\u4ee4\u529f\u80fd<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -L [-vw]           <\/span> <span style=\"color:#777777\">&lt;&#061;&#061;\u5355\u7eaf\u7684\u5bdf\u770b\u5e10\u6237\u4fe1\u606f<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a|-r|-x -u \u8d26\u53f7   <\/span> <span style=\"color:#777777\">&lt;&#061;&#061;\u65b0\u589e\/\u4fee\u6539\/\u5220\u9664\u8d26\u53f7<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -m -u \u673a\u5668\u8d26\u53f7  <\/span> <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0e PDC \u6709\u5173\u7684\u673a\u5668\u7801<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-L &#xff1a;\u5217\u51fa\u76ee\u524d\u5728\u6570\u636e\u5e93\u5f53\u4e2d\u7684\u8d26\u53f7\u4e0e UID \u7b49\u76f8\u5173\u4fe1\u606f&#xff1b;<br \/>\n-v &#xff1a;\u9700\u8981\u642d\u914d -L \u6765\u6267\u884c&#xff0c;\u53ef\u5217\u51fa\u66f4\u591a\u7684\u8baf\u606f&#xff0c;\u5305\u62ec\u5bb6\u76ee\u5f55\u7b49\u6570\u636e&#xff1b;<br \/>\n-w &#xff1a;\u9700\u8981\u642d\u914d -L \u6765\u6267\u884c&#xff0c;\u4f7f\u7528\u65e7\u7248\u7684 smbpasswd \u683c\u5f0f\u6765\u663e\u793a\u6570\u636e&#xff1b;<br \/>\n-a &#xff1a;\u65b0\u589e\u4e00\u4e2a\u53ef\u4f7f\u7528 Samba \u7684\u8d26\u53f7&#xff0c;\u540e\u9762\u7684\u8d26\u53f7\u9700\u8981\u5728 \/etc\/passwd \u5185\u5b58\u5728\u8005&#xff1b;<br \/>\n-r &#xff1a;\u4fee\u6539\u4e00\u4e2a\u8d26\u53f7\u7684\u76f8\u5173\u4fe1\u606f&#xff0c;\u9700\u642d\u914d\u5f88\u591a\u7279\u6b8a\u53c2\u6570&#xff0c;\u8bf7 man pdbedit&#xff1b;<br \/>\n-x &#xff1a;\u5220\u9664\u4e00\u4e2a\u53ef\u4f7f\u7528 Samba \u7684\u8d26\u53f7&#xff0c;\u53ef\u5148\u7528 -L \u627e\u5230\u8d26\u53f7\u540e\u518d\u5220\u9664&#xff1b;<br \/>\n-m &#xff1a;\u540e\u9762\u63a5\u7684\u662f\u673a\u5668\u7684\u4ee3\u7801 (machine account)&#xff0c;\u4e0e domain model \u6709\u5173&#xff01;<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2.1 \u5f00\u59cb\u65b0\u589e\u4f7f\u7528\u8005\u5427&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -u smb1<\/span><br \/>\nnew password: <span style=\"color:#777777\">&lt;&#061;&#061;\u8f93\u5165 4321 \u8fd9\u4e2a\u5bc6\u7801\u77a7\u77a7<\/span><br \/>\nretype new password: <span style=\"color:#777777\">&lt;&#061;&#061;\u518d\u8f93\u5165\u4e00\u6b21\u5427&#xff01;<\/span><br \/>\nUnix username:        smb1   <span style=\"color:#777777\">&lt;&#061;&#061;\u5e95\u4e0b\u4e3a\u8f93\u5165\u6b63\u786e\u540e\u7684\u663e\u793a\u7ed3\u679c&#xff01;<\/span><br \/>\nNT username:<br \/>\nAccount Flags:        [U          ]<br \/>\nUser SID:             S-1-5-21-4073076488-3046109240-798551845-1000<br \/>\nPrimary Group SID:    S-1-5-21-4073076488-3046109240-798551845-513<br \/>\nFull Name:<br \/>\nHome Directory:       \\\\\\\\vbirdserver\\\\smb1<br \/>\nHomeDir Drive:<br \/>\nLogon Script:<br \/>\nProfile Path:         \\\\\\\\vbirdserver\\\\smb1\\\\profile<br \/>\nDomain:               VBIRDSERVER<br \/>\nAccount desc:<br \/>\nWorkstations:<br \/>\nMunged dial:<br \/>\nLogon time:           0<br \/>\nLogoff time:          9223372036854775807 seconds since the Epoch<br \/>\nKickoff time:         9223372036854775807 seconds since the Epoch<br \/>\nPassword last set:    Fri, 29 Jul 2011 13:19:56 CST<br \/>\nPassword can change:  Fri, 29 Jul 2011 13:19:56 CST<br \/>\nPassword must change: never<br \/>\nLast bad password   : 0<br \/>\nBad password count  : 0<br \/>\nLogon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF<br \/>\n<span style=\"color:#ff6666\"># \u4f60\u53ef\u4ee5\u53d1\u73b0\u5176\u5b9e\u8baf\u606f\u975e\u5e38\u7684\u591a&#xff01;\u82e5\u9700\u4fee\u6539\u7ec6\u90e8\u8bbe\u5b9a&#xff0c;\u8bf7 man pdbedit \u5427&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -u smb2<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -u smb3<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -u student<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2.2 \u67e5\u8be2\u76ee\u524d\u5df2\u7ecf\u5b58\u5728\u7684 Samba \u8d26\u53f7<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -L<\/span><br \/>\nsmb1:2004:<br \/>\nsmb3:2006:<br \/>\nsmb2:2005:<br \/>\nstudent:505:<br \/>\n<span style=\"color:#ff6666\"># \u4ec5\u4f1a\u5217\u51fa\u8d26\u53f7\u4e0e UID \u800c\u5df2\u5466&#xff01;<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2.3 \u5c1d\u8bd5\u4fee\u6539\u4e0e\u5220\u9664 smb3 \u8fd9\u4e2a\u8d26\u53f7\u770b\u770b<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd smb3<\/span><br \/>\nNew SMB password:<br \/>\nRetype new SMB password:<br \/>\n<span style=\"color:#ff6666\"># \u4fee\u6539\u5bc6\u7801\u6bd4\u8f83\u7279\u6b8a&#xff0c;\u7ba1\u7406\u5bc6\u7801\u53c2\u6570\u662f\u4f7f\u7528 pdbedit&#xff0c;\u4fee\u6539\u5bc6\u7801\u5f97\u8981\u7528 smbpasswd \u5466&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -x -u smb3<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -Lw<\/span><br \/>\n<span style=\"color:#ff6666\"># \u6b64\u65f6\u4f60\u5c31\u770b\u4e0d\u5230 smb3 \u8fd9\u4e2a\u7528\u6237\u5570&#xff01;\u6240\u4ee5\u6d4b\u8bd5\u5b8c\u8bf7\u7acb\u5373\u5c06\u5b83\u52a0\u56de\u6765&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4ee5\u540e\u5982\u679c\u6709\u9700\u8981\u65b0\u589e\u989d\u5916\u7684\u4f7f\u7528\u8005\u8d26\u53f7&#xff0c;\u82e5\u8be5\u8d26\u53f7\u539f\u672c\u4e0d\u5b58\u5728&#xff0c;\u5219\u4f7f\u7528 useradd \u518d\u4ee5 pdbedit -a \u53bb\u65b0\u589e\u3002 \u82e5\u5df2\u7ecf\u5b58\u5728\u4e8e Linux \u7684\u5b9e\u4f53\u8d26\u53f7&#xff0c;\u76f4\u63a5\u7528 pdbedit -a \u65b0\u589e\u5373\u53ef\u3002\u540c\u65f6\u8981\u6ce8\u610f&#xff0c;\u7ba1\u7406 TDB \u6570\u636e\u5e93\u683c\u5f0f\u5efa\u8bae\u4f7f\u7528 pdbedit \u8fd9\u4e2a\u65b0\u7684\u73a9\u610f\u513f\u6765\u5904\u7406&#xff0c;smbpasswd \u4ec5\u5269\u4e0b\u4fee\u6539\u5bc6\u7801\u7684\u529f\u80fd\u9700\u8bb0\u5fc6\u5373\u53ef&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">3. \u91cd\u65b0\u542f\u52a8 Samba \u5e76\u8fdb\u884c\u81ea\u6211\u6d4b\u8bd5<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u7ecf\u8fc7\u91cd\u65b0\u542f\u52a8\u540e&#xff0c;\u6211\u4eec\u6240\u8fdb\u884c\u7684\u4fee\u8ba2\u624d\u4f1a\u751f\u6548\u3002\u7136\u540e\u4f7f\u7528 smbclient \u6765\u68c0\u67e5\u770b\u770b&#xff0c;\u662f\u5426\u4e0d\u540c\u8eab\u4efd\u4f1a\u6709\u4e0d\u4e00\u6837\u7684\u6d4f\u89c8\u7ed3\u679c\u5462&#xff1f; \u8d76\u7d27\u770b\u770b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/nmb restart<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 1. \u5148\u7528\u533f\u540d\u767b\u5f55\u8bd5\u770b\u770b&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/127.0.0.1<\/span><br \/>\nEnter root&#039;s password:      <span style=\"color:#777777\">&lt;&#061;&#061;\u76f4\u63a5\u6309\u4e0b [Enter] \u5373\u53ef\u3002<\/span><br \/>\nAnonymous login successful  <span style=\"color:#777777\">&lt;&#061;&#061;\u6709\u770b\u5230\u533f\u540d\u7684\u5b57\u6837\u4e86&#xff01;<\/span><br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Sharename       Type      Comment<br \/>\n        &#8212;&#8212;&#8212;       &#8212;-      &#8212;&#8212;-<br \/>\n        <span style=\"color:#FFFF00\">project         Disk      smbuser&#039;s project<\/span><br \/>\n        IPC$            IPC       IPC Service (This is vbird&#039;s samba server)<br \/>\n<span style=\"color:#ff6666\">&#8230;.(\u5e95\u4e0b\u7701\u7565)&#8230;.<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2. \u518d\u4f7f\u7528 smb1 \u8fd9\u4e2a\u8d26\u53f7\u767b\u5165\u8bd5\u770b\u770b&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/127.0.0.1 -U smb1<\/span><br \/>\nEnter smb1&#039;s password:  <span style=\"color:#777777\">&lt;&#061;&#061;\u8f93\u5165 smb1 \u5728 pdbedit \u6240\u5efa\u7acb\u7684\u5bc6\u7801&#xff01;<\/span><br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Sharename       Type      Comment<br \/>\n        &#8212;&#8212;&#8212;       &#8212;-      &#8212;&#8212;-<br \/>\n        project         Disk      smbuser&#039;s project<br \/>\n        IPC$            IPC       IPC Service (This is vbird&#039;s samba server)<br \/>\n        <span style=\"color:#FFFF00\">smb1            Disk      Home Directories<\/span> <span style=\"color:#777777\">&lt;&#061;&#061;\u591a\u4e86\u8fd9\u73a9\u610f\u513f&#xff01;<\/span><br \/>\n<span style=\"color:#ff6666\">&#8230;.(\u5e95\u4e0b\u7701\u7565)&#8230;.<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e0a\u8868\u6211\u4eec\u53ef\u4ee5\u53d1\u73b0&#xff0c;<span style=\"color:#000088\">\u7ecf\u7531\u4e0d\u540c\u7684\u8eab\u4efd\u767b\u5165\u53ef\u4ee5\u53d6\u5f97\u4e0d\u4e00\u6837\u7684\u6d4f\u89c8\u6570\u636e&#xff0c;<\/span>\u00a0\u6240\u4ee5\u5728\u4f7f\u7528\u4e0a\u9762\u9700\u8981\u7279\u522b\u7559\u610f\u5594&#xff01;\u63a5\u4e0b\u6765&#xff0c;\u8ba9\u6211\u4eec\u5f00\u59cb\u6765\u81ea\u6211\u6302\u8f7d\u6d4b\u8bd5\u770b\u770b&#xff01;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">mount -t cifs \/\/127.0.0.1\/smb1 \/mnt -o username&#061;smb1<\/span><br \/>\nPassword: <span style=\"color:#777777\">&lt;&#061;&#061;\u786e\u5b9a\u662f\u8f93\u5165\u6b63\u786e\u7684\u5bc6\u7801\u5594&#xff01;<\/span><br \/>\n<span style=\"color:#ff6666\"># \u6b64\u65f6 \/home\/smb1\/ \u4e0e \/mnt \u5e94\u8be5\u62e5\u6709\u76f8\u540c\u7684\u6863\u540d\u624d\u5bf9&#xff01;\u56e0\u4e3a\u6302\u8f7d\u561b&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">ll \/home\/smb1\/.bashrc<\/span><br \/>\n-rw-r&#8211;r&#8211;. 1 smb1 smb1 124 May 30 23:46 \/home\/smb1\/.bashrc <span style=\"color:#777777\">&lt;&#061;&#061;\u786e\u5b9a\u6709\u6863\u6848<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">ls -a \/mnt<\/span><br \/>\n<span style=\"color:#ff6666\"># \u5374\u770b\u4e0d\u5230\u4efb\u4f55\u4e1c\u897f&#xff01;\u5e94\u8be5\u662f SELinux \u7684\u95ee\u9898\u5427&#xff01;\u6839\u636e \/var\/log\/messages \u7684\u8baf\u606f&#xff0c;<br \/>\n# \u8fdb\u884c\u5982\u4e0b\u7684\u52a8\u4f5c\u5c31\u80fd\u591f\u5904\u7406\u597d\u8fd9\u4e2a\u7a0b\u5e8f&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">setsebool -P samba_enable_home_dirs&#061;1<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">ls -a \/mnt<\/span><br \/>\n.  ..  .bash_logout  .bash_profile  .bashrc  .gnome2  .mozilla<br \/>\n<span style=\"color:#ff6666\"># \u6863\u540d\u51fa\u73b0\u5566&#xff01;OKOK&#xff01;\u8fd9\u4e2a\u4f7f\u7528\u8005\u6302\u8f7d\u5904\u7406\u5b8c\u6bd5&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">umount \/mnt<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u81ea\u6211\u6d4b\u8bd5\u662f\u975e\u5e38\u91cd\u8981\u7684&#xff01;<span style=\"color:#000088\">\u56e0\u4e3a Samba \u662f\u4f1a\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u7684&#xff0c;\u56e0\u6b64 SELinux \u4f1a\u7279\u522b\u300e\u5173\u7167\u300f\u4e00\u4e0b\u8fd9\u4e2a\u670d\u52a1&#xff01;<\/span>\u5305\u62ec\u9ed8\u8ba4\u7528\u6237\u5bb6\u76ee\u5f55\u4e0d\u4f1a\u6709\u5f00\u653e\u7684\u6743\u9650\u3001\u9884\u8bbe\u7684 SELinux type \u4e0d\u5bf9\u5c31\u65e0\u6cd5\u4f7f\u7528 (\u4f60\u53ef\u4ee5\u81ea\u5df1\u5c1d\u8bd5\u6302\u8f7d \/\/127.0.0.1\/project \u5c31\u77e5\u9053\u5565\u539f\u56e0\u5570&#xff01;)&#xff0c;\u6240\u4ee5&#xff0c;\u81ea\u884c\u6d4b\u8bd5\u5b8c\u6bd5\u5c31\u80fd\u591f\u7406\u89e3\u54ea\u4e2a\u5730\u65b9\u7684 SELinux \u6ca1\u6709\u8bbe\u5b9a\u59a5\u5f53&#xff01;\u8be6\u7ec6\u7684\u8bbe\u5b9a\u8bf7\u5230\u00a016.2.6 \u5b89\u5168\u6027\u8bbe\u5b9a\u53bb\u67e5\u9605\u3002<\/span><\/span> \u00a0<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Tips:<span style=\"color:#009000\">\u6839\u636e\u7f51\u53cb\u56de\u62a5&#xff0c;\u56e0\u4e3a\u4e4b\u524d\u6211\u4eec\u8bbe\u5b9a\u7684 security \u662f share&#xff0c;\u800c\u4e14\u5df2\u7ecf\u4f7f\u7528 Windows \u7cfb\u7edf\u6d4b\u8bd5\u8fc7&#xff0c;\u5728\u540c\u4e00\u90e8 Windows \u7cfb\u7edf\u4e0a\u9762\u91cd\u590d\u6d4b\u8bd5\u65f6&#xff0c;\u4f1a\u53d1\u751f\u65e0\u6cd5\u767b\u5165\u7684\u60c5\u51b5\u3002\u5efa\u8bae\u76f4\u63a5\u5c06 windows \u7cfb\u7edf\u91cd\u65b0\u542f\u52a8\u6e05\u9664\u524d\u4e00\u6b21\u767b\u5165\u7684\u4fe1\u606f\u5373\u53ef&#xff01; ^_^<\/span><\/span><\/span><\/td>\n<td>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u9e1f\u54e5\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134928-6802586891705.jpg\" width=\"534\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">4. \u5173\u4e8e\u6743\u9650\u7684\u518d\u8bf4\u660e\u4e0e\u7d2f\u52a0\u5176\u4ed6\u5206\u4eab\u8d44\u6e90\u7684\u65b9\u5f0f&#xff1a;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6709\u7684\u65f6\u5019\u4f60\u4f1a\u53d1\u73b0&#xff0c;\u660e\u660e\u5728 smb.conf \u5f53\u4e2d\u5df2\u7ecf\u8bbe\u5b9a\u4e86 writable \u53ef\u5199\u5165&#xff0c;\u4f7f\u7528\u8005\u767b\u5165\u7684\u8eab\u4efd\u4e5f\u6ca1\u6709\u95ee\u9898&#xff0c; \u4e3a\u5565\u5c31\u662f\u65e0\u6cd5\u6302\u8f7d\u6216\u5199\u5165\u5462&#xff1f;\u662f\u5426\u662f\u670d\u52a1\u5668\u8bbe\u5b9a\u54ea\u91cc\u8fd8\u6709\u95ee\u9898\u554a&#xff1f;\u975e\u4e5f\u975e\u4e5f&#xff01;\u4e3b\u8981\u7684\u95ee\u9898\u5e38\u5e38\u662f\u6765\u81ea\u4e8e Linux \u6587\u4ef6\u7cfb\u7edf\u7684\u6743\u9650\u5566&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3e\u4e0a\u9762\u7684\u4f8b\u5b50\u6765\u8bf4&#xff0c;\u5f53\u4f60\u65e0\u6cd5\u6302\u8f7d\u5374\u53d1\u73b0 Linux \u4f20\u7edf\u6743\u9650\u662f\u5bf9\u7684&#xff0c;\u90a3\u4e48\u80af\u5b9a\u662f SELinux \u51fa\u95ee\u9898&#xff5e;\u8fd9\u90e8\u4efd\u5f97\u8981\u7528 setsebool \u4e0e chcon \u6216 restorecon \u7b49\u6307\u4ee4\u6765\u514b\u670d\u3002\u53e6\u5916\u5c31\u662f&#xff0c;\u6211\u4eec\u5728 smb.conf \u5f53\u4e2d\u8bbe\u5b9a [project] \u4e3a\u53ef\u5199\u5165&#xff0c;\u4ea6\u5373 \/home\/project \u662f\u53ef\u5199\u5165\u7684\u3002\u5047\u8bbe smb1 \u5c5e\u4e8e users \u8fd9\u4e2a\u7fa4\u7ec4&#xff0c;\u56e0\u6b64\u4ee5 smb1 \u767b\u5165 SAMBA \u670d\u52a1\u5668\u540e&#xff0c;\u5bf9\u4e8e \/home\/project \u5e94\u8be5\u662f\u5177\u6709\u53ef\u4ee5\u8bfb\u5199\u7684\u80fd\u529b\u7684&#xff01;\u4f46\u662f&#xff0c;\u5982\u679c\u4f60\u4ee5 root \u7684\u8eab\u4efd\u5efa\u7acb \/home\/project \u5374\u53c8\u5fd8\u8bb0\u4fee\u6539\u6743\u9650\u7684\u8bdd&#xff0c; \u6b64\u65f6 \/home\/project \u662f\u65e0\u6cd5\u8ba9 users \u8fd9\u4e2a\u7fa4\u7ec4\u5199\u5165\u7684&#xff0c;\u56e0\u6b64 smb1 \u8fd9\u4e2a\u4f7f\u7528\u8005\u5f53\u7136\u4e0d\u5177\u6709\u5199\u5165\u7684\u80fd\u529b\u3002 \u8fd9\u6837\u8bf4&#xff0c;\u4e86\u89e3\u9e1f\u54e5\u60f3\u8981\u8bf4\u5565\u4e86\u5417&#xff1f;\u6ce8\u610f\u6ce8\u610f\u5594&#xff01; ^_^<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u5982\u679c\u4f60\u8fd8\u8981\u6269\u5145\u5206\u4eab\u7684\u76ee\u5f55\u4e0e\u80fd\u591f\u767b\u5165\u7684\u4f7f\u7528\u8005\u65f6&#xff0c;\u53ef\u4ee5\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5229\u7528\u7f16\u8f91 smb.conf \u6765\u5f00\u653e\u5176\u4ed6\u7684\u76ee\u5f55\u8d44\u6e90&#xff0c;\u5e76\u4e14\u7279\u522b\u6ce8\u610f Linux \u5728\u8be5\u76ee\u5f55\u4e0b\u7684\u6743\u9650\u5594&#xff01;\u8bf7\u4f7f\u7528 chown \u4e0e chmod \u5427&#xff01;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5229\u7528 pdbedit \u6765\u65b0\u589e\u5176\u4ed6\u53ef\u7528 Samba \u7684\u8d26\u53f7&#xff0c;\u5982\u679c\u8be5\u8d26\u53f7\u5e76\u6ca1\u6709\u51fa\u73b0\u5728 \/etc\/passwd \u91cc\u9762&#xff0c;\u8bf7\u5148\u4ee5 useradd \u65b0\u589e\u8be5\u8d26\u53f7&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0d\u8bba\u8fdb\u884c\u5b8c\u4efb\u4f55\u7684\u8bbe\u5b9a&#xff0c;\u8bf7\u5148\u4ee5 testparm \u8fdb\u884c\u786e\u8ba4&#xff0c;\u4e4b\u540e\u4ee5 \/etc\/init.d\/{smb,nmb} restart \u6765\u91cd\u65b0\u542f\u52a8&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e8b\u5b9e\u4e0a&#xff0c;SAMBA \u7684\u4e00\u822c\u7528\u9014\u5c31\u662f\u5728\u8fd9\u4e2a\u8054\u673a\u7684\u6a21\u5f0f\u4e2d&#xff01;\u591a\u4f7f\u7528 SAMBA \u6765\u5206\u4eab\u4f60\u7684\u8d44\u6e90\u5427&#xff01;\u9e1f\u54e5\u90fd\u662f\u4f7f\u7528 SAMBA \u6765\u505a\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0e\u6211\u7684\u5de5\u4f5c\u673a\u4e92\u901a\u6709\u65e0\u7684\u91cd\u8981\u5a92\u4ecb\u8bf4&#xff5e;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134928-68025868d28f7.jpg\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.5 \u8bbe\u5b9a\u6210\u4e3a\u6253\u5370\u673a\u670d\u52a1\u5668 (CUPS \u7cfb\u7edf)<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65f6\u81f3\u4eca\u65e5&#xff0c;\u6253\u5370\u673a\u7684\u7f51\u7edc\u529f\u80fd\u5df2\u7ecf\u5f88\u5f3a\u608d\u4e86&#xff01;\u751a\u81f3\u4e5f\u6709\u652f\u6301\u65e0\u7ebf\u7f51\u7edc\u7684\u6253\u5370\u673a&#xff0c;\u56e0\u6b64\u6bcf\u53f0\u6253\u5370\u673a\u90fd\u53ef\u4ee5\u72ec\u7acb\u4f5c\u4e3a\u5404\u4e2a PC \u7684\u72ec\u81ea\u7684\u6253\u5370\u673a&#xff0c;\u8001\u5b9e\u8bf4\u4e5f\u6ca1\u6709\u5fc5\u8981\u8fdb\u884c Samba \u7684\u7f51\u7edc\u6253\u5370\u673a\u670d\u52a1\u5668\u5566&#xff01;\u4f46\u6bd5\u7adf\u8fd8\u662f\u6709\u4e9b\u6bd4\u8f83\u65e7\u578b\u7684\u673a\u79cd&#xff0c; \u6216\u8005\u4e70\u4e0d\u8d77\u6709\u5185\u5efa\u7f51\u7edc\u7684\u6253\u5370\u673a\u65f6&#xff0c;\u90a3\u4e48 Samba \u7684\u6253\u5370\u673a\u670d\u52a1\u5668\u8fd8\u662f\u6709\u5b58\u5728\u7684\u4ef7\u503c\u5570\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 Linux \u5e95\u4e0b\u8fdb\u884c\u6253\u5370\u7684\u670d\u52a1\u5f88\u591a&#xff0c;\u4e0d\u8fc7\u6211\u4eec\u8fd9\u91cc\u8981\u4ecb\u7ecd\u7684\u4ec5\u6709\u76ee\u524d\u8f83\u5e7f\u4e3a\u6d41\u884c\u7684 CUPS (Common Unix Printing System) \u8fd9\u4e00\u4e2a\u3002 \u8be6\u7ec6\u7684 CUPS \u5b89\u88c5\u8bbe\u5b9a\u65b9\u6cd5\u6211\u4eec\u5df2\u7ecf\u5728\u57fa\u7840\u7bc7\u7b2c\u4e09\u7248\u7b2c\u4e8c\u5341\u4e00\u7ae0 CUPS\u00a0\u5f53\u4e2d\u63d0\u8fc7&#xff0c;\u6240\u4ee5\u8fd9\u91cc\u6211\u4eec\u4e0d\u518d\u8be6\u7ec6\u8bf4\u660e&#xff0c;\u4ec5\u4ecb\u7ecd\u5927\u81f4\u7684\u5904\u7406\u6d41\u7a0b\u5c31\u662f\u4e86\u3002\u5982\u679c\u4f60\u9700\u8981\u8f83\u65e9\u671f\u7684 LPRng \u6253\u5370\u7cfb\u7edf\u7684\u8bdd&#xff0c; \u5efa\u8bae\u53ef\u4ee5\u53c2\u8003\u5e95\u4e0b\u7684\u6570\u636e\u5594&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f9d\u739b\u732b\u7684\u6253\u5370\u6587\u4ef6&#xff1a;http:\/\/www.imacat.idv.tw\/tech\/lnxprint.html<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9e1f\u54e5\u7684 LPRng \u7b80\u4ecb&#xff1a;http:\/\/linux.vbird.org\/linux_server\/0370samba\/0370samba.php<\/span><\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Tips:<span style=\"color:#009000\">\u5728\u8fd9\u4e2a\u5c0f\u8282\u4e2d&#xff0c;\u9e1f\u54e5\u5047\u8bbe\u4f60\u7684\u6253\u5370\u673a\u5e76\u4e0d\u662f\u7f51\u7edc\u6253\u5370\u673a&#xff0c;\u800c\u662f\u4f7f\u7528 USB \u63a5\u53e3\u8fde\u63a5\u7684\u6253\u5370\u673a\u683c\u5f0f\u3002\u5982\u679c\u4f60\u7684\u6253\u5370\u673a\u771f\u7684\u6709\u652f\u6301\u7f51\u7edc&#xff0c; \u90a3\u5efa\u8bae\u76f4\u63a5\u53c2\u8003\u6253\u5370\u673a\u624b\u518c\u6765\u8bbe\u5b9a\u5373\u53ef&#xff0c;\u4e0d\u9700\u8981\u5b89\u88c5 Samba \u6253\u5370\u673a\u3002\u56e0\u4e3a\u67d0\u4e9b\u5382\u724c\u7684\u6253\u5370\u673a\u7f51\u7edc\u5361\u6709\u7279\u6b8a\u7684\u529f\u80fd&#xff0c; \u4f8b\u5982 HP \u7684\u7f51\u5361\u901a\u5e38\u8fd8\u652f\u6301\u67d0\u4e9b\u7279\u6b8a\u7684\u6253\u5370\u529f\u80fd (\u53cc\u9762\u3001\u591a\u9875\u6253\u5370\u7b49)&#xff0c;\u8fd9\u4e9b\u529f\u80fd\u900f\u8fc7\u4f3a\u670d\u5668\u91cd\u65b0\u5206\u4eab\u65f6&#xff0c;\u53ef\u80fd\u4f1a\u9057\u5931&#xff01;<\/span><\/span><\/span><\/td>\n<td>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u9e1f\u54e5\u7684\u56fe\u793a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134929-680258691f53f.jpg\" width=\"534\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">0. \u5047\u8bbe\u6761\u4ef6<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e2\u7136\u8981\u5206\u4eab\u6253\u5370\u673a&#xff0c;\u5c31\u5f97\u8981\u6709\u6253\u5370\u673a\u554a&#xff01;\u9e1f\u54e5\u4f7f\u7528\u5bf9 Linux \u652f\u6301\u5ea6\u8f83\u9ad8\u7684 HP LaserJet P2015dn \u8fd9\u90e8\u6253\u5370\u673a\u4e3a\u4f8b&#xff0c; \u4e0d\u4f7f\u7528\u7f51\u7edc\u529f\u80fd&#xff0c;\u5355\u7eaf\u4f7f\u7528 USB \u8fde\u63a5\u5230 Samba \u670d\u52a1\u5668\u4e0a\u3002<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">CUPS \u8fde\u63a5\u5230 USB \u6253\u5370\u673a&#xff0c;\u5e76\u4e14\u5f00\u653e\u975e\u672c\u673a\u7684 IP \u6765\u6e90\u4f7f\u7528\u6b64\u6253\u5370\u673a&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f7f\u7528 CUPS \u5185\u5efa\u7684\u6253\u5370\u673a\u9a71\u52a8\u7a0b\u5e8f&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u524d\u5f80 HP \u6253\u5370\u673a\u5b98\u7f51\u53d6\u5f97 Windows \u64cd\u4f5c\u7cfb\u7edf\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff1b;<\/span><\/span> \u00a0<\/li>\n<\/ul>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">1. \u5b89\u88c5\u6253\u5370\u673a\u4e0e\u786e\u5b9a\u6253\u5370\u673a\u7684\u8054\u673a\u6b63\u5e38<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u518d\u6b21\u8bf4\u660e&#xff0c;\u5e76\u4e0d\u662f\u6240\u6709\u7684\u6253\u5370\u673a\u90fd\u88ab Linux \u6240\u652f\u6301\u7684&#xff0c;\u6240\u4ee5\u5f53\u4f60\u60f3\u8981\u94fe\u63a5\u4e00\u90e8\u6253\u5370\u673a\u5230 Linux \u7cfb\u7edf\u4e0a\u5934\u65f6&#xff0c; \u8bf7\u52a1\u5fc5\u5230\u00a0http:\/\/www.openprinting.org\/printers\u00a0\u4e0a\u5934\u53bb\u770b\u770b\u662f\u5426\u6709\u88ab\u652f\u6301\u5594&#xff01; \u5982\u679c\u6ca1\u6709\u88ab\u652f\u6301&#xff0c;\u90a3\u5c31\u6362\u4e00\u90e8\u6253\u5370\u673a\u5427&#xff01;\u4e0d\u8981\u8fdb\u884c\u5782\u6b7b\u7684\u6323\u624e\u4e86&#8230;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u7684\u6253\u5370\u673a\u7aef\u53e3\u4e3a\u4f7f\u7528 USB \u6216\u8005\u662f\u5e73\u884c\u4e32\u884c\u7aef\u53e3\u7684\u8bdd&#xff0c;\u90a3\u4e48\u5f53\u4f60\u8fde\u63a5\u4e0a\u6253\u5370\u673a\u540e&#xff0c; \u53ef\u4ee5\u5229\u7528\u5e95\u4e0b\u7684\u65b9\u5f0f\u6d4b\u8bd5\u770b\u770b\u662f\u5426\u6210\u529f\u7684\u8fde\u63a5\u4e0a\u4e86&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">lsusb<\/span><br \/>\nBus 001 Device 002: ID 03f0:3817 Hewlett-Packard LaserJet P2015 series<br \/>\nBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">ll \/dev\/usb\/lp0<\/span><br \/>\ncrw-rw&#8212;-. 1 root lp 180, 0 Jul 29 13:55 \/dev\/usb\/lp0<br \/>\n<span style=\"color:#ff6666\"># \u770b\u5f97\u51fa\u6765&#xff0c;\u5df2\u7ecf\u6709\u4e2a lp0 \u7684\u6253\u5370\u673a\u5570&#xff01;\u6d4b\u8bd5\u6253\u5370\u4e00\u4e0b\u5427&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">echo &#034;Hello printer&#034; &gt; \/dev\/usb\/lp0<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u6253\u5370\u673a\u6709\u54cd\u5e94&#xff0c;\u8fd9\u8868\u793a OK \u7684\u5566&#xff01;\u4f60\u53ef\u4ee5\u8fdb\u884c\u5e95\u4e0b\u7684\u5de5\u4f5c\u4e86\u3002<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">2. \u8bbe\u5b9a CUPS \u4e0e\u6253\u5370\u673a\u7684\u8054\u673a<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9884\u8bbe CUPS \u90fd\u4f1a\u5f00\u542f&#xff0c;\u4e0d\u8fc7&#xff0c;\u56e0\u4e3a\u6211\u4eec\u5b89\u88c5\u7684\u662f\u300e basic server \u300f\u7684\u6a21\u5f0f&#xff0c;\u6240\u4ee5 CUPS \u9ed8\u8ba4\u5e76\u6ca1\u6709\u88ab\u5b89\u88c5\u8d77\u6765\u3002 \u6240\u4ee5\u8fd9\u91cc\u8981\u5b89\u88c5\u4e14\u91cd\u65b0\u8bbe\u5b9a\u4e0e\u542f\u52a8\u624d\u884c\u3002\u672c\u7ae0\u8282 CUPS \u7684\u8bbe\u5b9a\u539f\u5219\u662f\u8fd9\u6837\u7684&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u9700\u8981\u8ba9 192.168.100.0\/24 \u8fd9\u4e2a\u7f51\u57df\u53ef\u4ee5\u4f7f\u7528\u6253\u5370\u673a<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u9700\u8981\u8ba9 192.168.100.0\/24 \u53ca 127.0.0.0\/8 \u53ef\u4ee5\u7ba1\u7406 CUPS \u7cfb\u7edf<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7136\u540e\u5f00\u59cb\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">yum groupinstall &#034;Print Server&#034;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/cups\/cupsd.conf<\/span><br \/>\n<span style=\"color:#bbbbbb\"># 1. \u8ba9\u76d1\u542c\u7684\u63a5\u53e3\u5f00\u653e\u5728\u6240\u6709\u63a5\u53e3&#xff01;<\/span><br \/>\n# Listen localhost:631  <span style=\"color:#777777\">&lt;&#061;&#061;\u7ea6\u5728\u7b2c 18 \u884c\u5de6\u53f3&#xff0c;\u6539\u6210\u5982\u4e0b&#xff1a;<\/span><br \/>\n<span style=\"color:#FFFF00\">Listen 0.0.0.0:631<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># 2. \u8ba9\u5185\u90e8\u7f51\u57df\u80fd\u591f\u8fdb\u884c CUPS \u7684\u6d4f\u89c8\u4e0e\u7ba1\u63a7<\/span><br \/>\n&lt;Location \/&gt;        <span style=\"color:#777777\">&lt;&#061;&#061;\u7ea6\u5728 32 \u884c\u5de6\u53f3&#xff0c;\u65b0\u589e\u80fd\u591f\u8ba9\u5185\u7f51\u5176\u4ed6 IP \u6d4f\u89c8\u8005<\/span><br \/>\n  Order allow,deny<br \/>\n<span style=\"color:#FFFF00\">  Allow From 127.0.0.0\/8<br \/>\n  Allow From 192.168.100.0\/24<\/span><br \/>\n&lt;\/Location&gt;<\/p>\n<p>&lt;Location \/admin&gt;       <span style=\"color:#777777\">&lt;&#061;&#061;\u7ea6\u5728 39 \u884c\u5de6\u53f3&#xff0c;\u65b0\u589e\u80fd\u591f\u7ba1\u7406 CUPS \u8005<\/span><br \/>\n  Encryption Required   <span style=\"color:#777777\">&lt;&#061;&#061;\u56e0\u4e3a\u8fd9\u91cc\u7684\u5173\u7cfb&#xff0c;\u6240\u4ee5\u53ef\u80fd\u4f1a\u7528 https:\/\/IP \u5594&#xff01;<\/span><br \/>\n  Order allow,deny<br \/>\n<span style=\"color:#FFFF00\">  Allow From 127.0.0.0\/8<br \/>\n  Allow From 192.168.100.0\/24<\/span><br \/>\n&lt;\/Location&gt;<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bbe\u5b9a\u5b8c\u6bd5\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u6765\u542f\u52a8 cups \u7cfb\u7edf&#xff0c;\u53ef\u4ee5\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/cups start<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chkconfig cups on<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">netstat -tunlp | grep &#039;cups&#039;<\/span><br \/>\ntcp     0  0  0.0.0.0:631         0.0.0.0:*      LISTEN      1851\/cupsd<br \/>\nudp     0  0  0.0.0.0:631         0.0.0.0:*                  1851\/cupsd<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u4e2a 631 \u7684\u57e0\u53e3\u5c31\u662f CUPS \u6240\u542f\u52a8\u7684\u5566&#xff01;\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u5f00\u653e\u754c\u9762\u5f97\u8981\u7ed9 0.0.0.0 \u624d\u5bf9\u5466&#xff01;\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u5f00\u59cb\u8bbe\u5b9a\u6253\u5370\u673a\u4e86&#xff01; \u7531\u4e8e CUPS \u652f\u6301\u5f88\u591a\u4e0d\u540c\u7684\u6253\u5370\u673a\u7aef\u53e3&#xff0c;\u6bcf\u79cd\u7aef\u53e3\u90fd\u4e0d\u4e00\u6837&#xff0c;\u5e38\u89c1\u7684\u6709&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">USB \u7aef\u53e3&#xff1a; usb:\/dev\/usb\/lp0<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7f51\u7edc\u6253\u5370\u673a&#xff1a; ipp:\/\/ip\/\u6253\u5370\u673a\u578b\u53f7<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7f51\u7edc\u82b3\u90bb\u6253\u5370\u673a&#xff1a; smb:\/\/user:password&#064;host\/printer<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e4b\u6240\u4ee5\u8981\u52a0\u4e0a 192.168.100.0\/24 \u53ef\u4ee5\u63a7\u5236\u670d\u52a1\u5668 CUPS \u7684\u539f\u56e0\u5728\u4e8e&#8230;\u9e1f\u54e5\u7684\u670d\u52a1\u5668\u6ca1\u6709 X \u7a97\u53e3\u5566&#xff01; \u6240\u4ee5\u9700\u8981\u900f\u8fc7\u5e73\u65f6\u7684\u5de5\u4f5c\u673a\u8fde\u4e0a\u670d\u52a1\u5668\u624d\u884c\u554a&#xff01;\u6b64\u65f6&#xff0c;\u5c06 CUPS \u5f00\u653e\u5728\u533a\u7f51\u5185\u53ef\u4ee5\u63a7\u5236\u7684\u529f\u80fd\u5c31\u5f88\u91cd\u8981\u5566&#xff01; \u6b64\u5916&#xff0c;\u56e0\u4e3a\u9e1f\u54e5\u7684\u4e3b\u673a\u6240\u5728\u73af\u5883\u95ee\u9898&#xff0c;\u8fd9\u90e8 192.168.100.254 \u8fd8\u6709\u4e00\u4e2a\u754c\u9762\u4e3a 192.168.1.100&#xff0c;\u9e1f\u54e5\u5728 cupsd.conf \u91cc\u9762\u4e5f\u52a0\u5165\u8fd9\u4e2a\u7f51\u6bb5\u4e86 (\u4e0a\u9762\u7684\u8303\u4f8b\u4e2d\u5e76\u6ca1\u6709\u7279\u522b\u5f3a\u8c03)&#xff0c;\u6240\u4ee5\u5e95\u4e0b\u7684\u56fe\u793a\u4f60\u4f1a\u770b\u5230\u5f88\u591a 192.168.1.100 \u7684 IP &#xff0c;\u4e0d\u8981\u5bb3\u6015&#xff01;\u90a3\u662f\u6b63\u5e38\u7684&#xff01; ^_^&#xff01;\u597d\u4e86&#xff0c;\u8bf7\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u5728\u7f51\u5740\u5217\u8f93\u5165&#xff1a; https:\/\/192.168.100.254:631 (\u5e95\u4e0b\u5219\u662f 192.168.1.100)<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134929-680258696601b.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-1\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u7531\u4e8e\u6211\u4eec\u4f7f\u7528\u7684\u662f https \u8fd9\u4e2a\u9700\u8981\u51ed\u8bc1\u7684\u8054\u673a\u6a21\u5f0f&#xff0c;\u56e0\u6b64\u5c31\u4f1a\u51fa\u73b0\u8fd9\u4e2a\u4e0d\u53d7\u4fe1\u4efb\u7684\u7f51\u7ad9\u8baf\u606f\u3002 \u6ca1\u5173\u7cfb&#xff0c;\u4f60\u76f4\u63a5\u6309\u4e0b\u300e\u6211\u4e86\u89e3\u5b89\u5168\u98ce\u9669\u300f\u540e&#xff0c;\u518d\u9009\u62e9\u300e\u65b0\u589e\u4f8b\u5916\u7f51\u7ad9\u300f\u5373\u53ef\u51fa\u73b0\u5982\u4e0b\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134929-68025869aad99.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-2\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u8fd9\u90e8\u4e3b\u673a\u771f\u7684\u662f\u4f60\u7684&#xff0c;\u90a3\u4e48\u5c31\u9009\u62e9\u7bad\u5934 2 \u6240\u6307\u7684\u90a3\u4e2a\u300e\u6c38\u4e45\u50a8\u5b58\u300f\u5427&#xff01;\u6700\u540e\u6309\u4e0b\u7bad\u5934 3 \u6240\u6307\u7684\u300e\u786e\u8ba4\u5b89\u5168\u4f8b\u5916\u300f\u5373\u53ef&#xff01;\u5982\u679c\u4e00\u5207\u987a\u5229&#xff0c;\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684 CUPS \u8bbe\u5b9a\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134929-68025869ebe06.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-3\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u4e0a\u5934\u7684\u6b22\u8fce\u56fe\u793a\u5f53\u4e2d&#xff0c;\u7531\u4e8e\u6211\u4eec\u662f\u60f3\u8981\u5efa\u7acb\u6253\u5370\u673a&#xff0c;\u56e0\u6b64\u70b9\u9009\u7bad\u5934(1)\u6240\u6307\u7684\u90a3\u4e2a\u6309\u94ae\u8fdb\u5165\u6253\u5370\u673a\u529f\u80fd&#xff0c;\u7136\u540e\u70b9\u9009 (2)\u6765\u5efa\u7acb\u6253\u5370\u673a\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134930-6802586a387c2.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-4\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u4e00\u7248\u6bd4\u8f83\u6709\u8da3\u7684\u5730\u65b9&#xff0c;\u662f\u4f1a\u5148\u8ba9\u4f60\u8f93\u5165\u8d26\u53f7\u4e0e\u5bc6\u7801\u624d\u8fdb\u884c\u540e\u7eed\u7684\u52a8\u4f5c\u54e9&#xff01;\u6240\u4ee5\u8fd9\u91cc\u8bf7\u8f93\u5165 root \u7684\u5e10\u5bc6\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134930-6802586a79009.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-5\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u4e0a\u9762\u7684\u56fe\u793a\u4e2d&#xff0c;\u4f60\u5e94\u8be5\u8981\u9009\u62e9\u7684\u662f\u6211\u4eec\u8fd9\u90e8\u672c\u673a\u7684 USB \u6253\u5370\u673a\u88c5\u7f6e\u624d\u5bf9\u3002\u8be5\u88c5\u7f6e\u662f\u7531 HAL \u670d\u52a1\u6240\u81ea\u52a8\u4fa6\u6d4b\u5230\u7684&#xff0c; \u5982\u679c\u4f60\u6ca1\u6709\u770b\u5230\u4efb\u4f55 USB \u7684\u6253\u5370\u673a&#xff0c;\u90a3\u53ef\u80fd\u5c31\u5f97\u8981\u67e5\u8be2\u4e00\u4e0b\u6253\u5370\u673a\u7535\u6e90\u662f\u5426\u6b63\u786e\u7684\u5f00\u542f\u4e86&#xff01; \u70b9\u9009\u4ed6\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134930-6802586ab9e41.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-6\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5efa\u7acb\u6253\u5370\u673a\u65f6&#xff0c;\u6700\u91cd\u8981\u7684\u662f\u90a3\u4e2a\u6253\u5370\u961f\u5217 (\u4e0a\u9762\u65b9\u6846\u4e2d\u7684\u7b2c\u4e00\u4e2a&#xff0c;\u540d\u79f0\u7684\u90a3\u4e2a\u73a9\u610f\u513f)&#xff0c;\u5728\u8fd9\u91cc\u9e1f\u54e5\u4f7f\u7528 CUPS \u9884\u8bbe\u5e2e\u6211\u6349\u5230\u7684\u6863\u540d\u3002 \u8fd9\u4e2a\u540d\u79f0\u5f88\u91cd\u8981&#xff0c;\u662f\u672a\u6765\u5206\u4eab\u51fa\u7684\u6253\u5370\u673a\u540d\u5b57\u5570&#xff01;\u81f3\u4e8e\u4f4d\u7f6e\u4e0e\u63cf\u8ff0\u5c31\u968f\u4fbf\u4f60\u586b\u5570\u3002\u7531\u4e8e\u6211\u4eec\u662f\u60f3\u8981\u505a\u6210\u6253\u5370\u670d\u52a1\u5668&#xff0c;\u6240\u4ee5\u300eshare this printer \u300f\u5f53\u7136\u8981\u52fe\u9009&#xff01;\u5f53\u4f60\u6309\u4e0b\u300e\u7ee7\u7eed\u300f\u540e&#xff0c;\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134931-6802586b063fa.jpg\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-7\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765 CUPS \u4f1a\u5e2e\u4f60\u9009\u62e9\u4e00\u4e2a\u76f8\u5bf9\u8f83\u4f73\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u57fa\u672c\u4e0a&#xff0c;\u4f7f\u7528 CUPS \u5e2e\u4f60\u6349\u5230\u7684\u9884\u8bbe\u9a71\u52a8\u7a0b\u5e8f\u5e94\u8be5\u5c31 OK \u4e86&#xff01; \u9009\u5b8c\u540e\u8bf7\u6309\u4e0b\u300e\u52a0\u5165\u6253\u5370\u673a\u300f\u6309\u94ae\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"2025-04-18zje1l2fijs1.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-8\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u770b\u4f60\u8fd8\u6709\u6ca1\u6709\u8981\u4fee\u6539\u5176\u4ed6\u7684\u9884\u8bbe\u53c2\u6570&#xff0c;\u5982\u679c\u6ca1\u6709\u7684\u8bdd&#xff0c;\u5c31\u6309\u4e0b\u56fe 16.2-8 \u7684\u300eSet Default Options\u300f\u6309\u94ae\u5427&#xff01; \u5982\u679c\u4e00\u5207\u6ca1\u6709\u95ee\u9898&#xff0c;\u4f60\u7684\u6253\u5370\u673a\u5c31\u8bbe\u5b9a\u59a5\u5f53\u4e86\u3002\u5982\u679c\u60f3\u8981\u67e5\u9605\u6253\u5370\u673a\u7684\u8be6\u7ec6\u4fe1\u606f&#xff0c;\u90a3\u53ef\u4ee5\u70b9\u9009 Printer \u7684\u9879\u76ee&#xff01;\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a\" height=\"299\" src=\"2025-04-18d41j1hqwufy.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.2-9\u3001\u7528 CUPS \u8bbe\u5b9a USB \u6253\u5370\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u90fd\u6b63\u5e38\u6ca1\u95ee\u9898&#xff0c;\u90a3\u4e48\u4f60\u7684\u7cfb\u7edf\u5df2\u7ecf\u6709\u4e00\u90e8\u6253\u5370\u673a\u88ab CUPS \u6240\u7ba1\u7406&#xff0c;\u4e14\u8fd9\u90e8\u6253\u5370\u673a\u5728\u7f51\u7edc\u7684\u7f51\u5740\u4e3a&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/\u670d\u52a1\u5668IP:631\/printers\/\u6253\u5370\u673a\u961f\u5217\u540d\u79f0<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/192.168.100.254:631\/printers\/HP_LaserJet_P2015_Series<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765\u770b\u770b\u5982\u4f55\u5c06\u5b83\u8fde\u7ed3\u5230\u54b1\u4eec\u7684 Samba \u670d\u52a1\u5668\u4e2d\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">3. \u5728 smb.conf \u5f53\u4e2d\u52a0\u5165\u6253\u5370\u673a\u7684\u652f\u6301 (Optional)<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5f00\u59cb\u544a\u8bc9 Samba \u5c06\u8fd9\u90e8\u6253\u5370\u673a\u7ed9\u4ed6\u5206\u4eab\u51fa\u53bb\u5427&#xff01;\u4f60\u9700\u8981\u8fd9\u6837\u5904\u7406&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n        <span style=\"color:#ff6666\"># \u5f97\u8981\u4fee\u6539 load printers \u7684\u8bbe\u5b9a&#xff0c;\u7136\u540e\u65b0\u589e\u51e0\u4e2a\u6570\u636e<\/span><br \/>\n        <span style=\"color:#FFFF00\">load printers &#061; yes<br \/>\n        cups options  &#061; raw       <span style=\"color:#777777\">&lt;&#061;&#061;\u53ef\u652f\u6301\u6765\u81ea Windows \u7528\u6237\u7684\u6253\u5370\u4f5c\u4e1a<\/span><br \/>\n        printcap name &#061; cups<br \/>\n        printing      &#061; cups      <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0e\u4e0a\u9762\u8fd9\u4e24\u4e2a\u5728\u544a\u77e5\u4f7f\u7528 CUPS \u6253\u5370\u7cfb\u7edf<\/span><\/p>\n<p>[printers]                        <span style=\"color:#777777\">&lt;&#061;&#061;\u6253\u5370\u673a\u4e00\u5b9a\u8981\u5199 printers \u5594&#xff01;<\/span><br \/>\n        comment &#061; All Printers<br \/>\n        path    &#061; \/var\/spool\/samba<span style=\"color:#777777\">&lt;&#061;&#061;\u9884\u8bbe\u628a\u6765\u81ea samba \u7684\u6253\u5370\u4f5c\u4e1a\u6682\u65f6\u653e\u7f6e\u7684\u961f\u5217<\/span><br \/>\n        browseable &#061; no           <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0d\u88ab\u5916\u4eba\u6240\u6d4f\u89c8\u5566&#xff01;\u6709\u6743\u9650\u624d\u53ef\u6d4f\u89c8<\/span><br \/>\n        guest ok   &#061; no           <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0e\u5e95\u4e0b\u4e24\u4e2a\u90fd\u4e0d\u8bb8\u8bbf\u5ba2\u6765\u6e90\u4e0e\u5199\u5165(\u975e\u6587\u4ef6\u7cfb\u7edf)<\/span><br \/>\n        writable   &#061; no<br \/>\n        printable  &#061; yes<\/span>          <span style=\"color:#777777\">&lt;&#061;&#061;\u5141\u8bb8\u6253\u5370\u5f88\u91cd\u8981\u7684\u4e00\u9879\u5de5\u4f5c&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u82e5\u6709\u9519\u8bef&#xff0c;\u8bf7\u81ea\u884c\u5904\u7406\u4e00\u4e0b<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/nmb restart<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u57fa\u672c\u4e0a\u900f\u8fc7\u8fd9\u6837\u7684\u8bbe\u5b9a\u4f60\u7684 Samba \u5c31\u80fd\u591f\u987a\u5229\u7684\u63d0\u4f9b\u6253\u5370\u673a\u7684\u670d\u52a1\u4e86&#xff01;\u4e0d\u8fc7\u53ef\u60dc\u7684\u662f&#xff0c;<span style=\"color:#000088\">Windows \u5ba2\u6237\u7aef\u4f9d\u65e7\u5f97\u8981\u5b89\u88c5\u6253\u5370\u673a\u7684\u9a71\u52a8\u7a0b\u5e8f\u624d\u80fd\u591f\u4f7f\u7528 Samba \u6240\u63d0\u4f9b\u7684\u6253\u5370\u673a<\/span>&#xff0c;\u6b64\u65f6\u771f\u662f\u9ebb\u70e6\u517c\u8ba8\u538c\u554a&#xff5e;\u6709\u6ca1\u6709\u53ef\u80fd\u8ba9 Samba \u4e3b\u52a8\u7684\u63d0\u4f9b\u9a71\u52a8\u7a0b\u5e8f\u7ed9\u4f7f\u7528\u8005&#xff0c;\u8fd9\u6837\u4e00\u6765\u5ba2\u6237\u7aef\u5c31\u4e0d\u9700\u8981\u989d\u5916\u53bb\u627e\u9a71\u52a8\u7a0b\u5e8f\u5570&#xff01;\u662f\u53ef\u4ee5\u7684&#xff0c;\u900f\u8fc7 Samba 3.x \u5373\u53ef\u5904\u7406&#xff01;\u5c31\u8fd9\u4e48\u5de7&#xff0c; CentOS \u7684 Samba \u5c31\u662f 3.x \u5462&#xff01;\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u900f\u8fc7\u5e95\u4e0b\u7684\u65b9\u5f0f\u6765\u5904\u7406\u3002<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">4. \u8ba9 Samba \u4e3b\u52a8\u63d0\u4f9b\u9a71\u52a8\u7a0b\u5e8f\u7ed9 Windows \u7528\u6237\u4f7f\u7528<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u6216\u8bb8\u4f60\u4f1a\u60f3&#xff0c;\u6253\u5370\u673a\u7684\u578b\u53f7\u8fd9\u4e48\u591a&#xff0c;\u90a3\u4e48 Linux \u8be5\u5982\u4f55\u63d0\u4f9b\u8fd9\u4e9b\u6253\u5370\u673a\u7684\u9a71\u52a8\u7a0b\u5e8f\u554a&#xff1f;\u5c82\u4e0d\u9ebb\u70e6&#xff1f; \u8fd8\u597d\u5566&#xff0c;\u00a0<span style=\"color:#000088\">CUPS \u4e3b\u8981\u662f\u900f\u8fc7\u5229\u7528 Postscript \u7684\u6253\u5370\u8bed\u8a00\u4e0e\u6253\u5370\u673a\u6c9f\u901a\u7684&#xff0c;\u56e0\u6b64\u5ba2\u6237\u7aef\u53ea\u8981\u53d6\u5f97 postscript \u7684\u9a71\u52a8\u7a0b\u5e8f\u4ed6\u4eec\u5c31\u80fd\u591f\u4f7f\u7528\u54b1\u4eec\u7684 Samba \u670d\u52a1\u5668\u6240\u63d0\u4f9b\u7684\u6253\u5370\u673a\u4e86<\/span>&#xff01;\u5982\u6b64\u4e00\u6765&#xff0c; \u4e0d\u8bba\u6253\u5370\u673a\u7684\u578b\u53f7\u4e3a\u4f55&#xff0c;\u53ea\u8981\u4ed6\u4eec\u80fd\u591f\u652f\u6301 Postscript \u7684\u6253\u5370\u683c\u5f0f&#xff0c;OK \u641e\u5b9a&#xff01;\u800c\u4e14 CUPS \u5b98\u7f51\u672c\u8eab\u5c31\u6709\u63d0\u4f9b CUPS \u7684 Postscript \u9a71\u52a8\u7a0b\u5e8f\u5570&#xff01;\u53ef\u4ee5\u5230\u5e95\u4e0b\u7684\u8fde\u7ed3\u53bb\u4e0b\u8f7d&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u652f\u6301 CUPS \u7684\u8f6f\u4ef6&#xff1a;http:\/\/www.cups.org\/software.php<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5f88\u68d2\u7684\u662f&#xff0c;\u56e0\u4e3a\u6211\u4eec\u662f CentOS 6.x \u6709\u652f\u6301 rpm \u8f6f\u4ef6\u5c01\u88c5\u7684\u7cfb\u7edf&#xff0c;\u56e0\u6b64\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d cups-windows-6.0-1.i386.rpm \u8fd9\u4e2a\u6863\u6848\u5373\u53ef&#xff0c;\u76f4\u63a5\u5b89\u88c5\u8fd9\u4e2a rpm \u6863\u6848\u5c31\u80fd\u591f\u53d6\u5f97 cups \u5bf9 Windows \u7684\u6253\u5370\u673a\u9a71\u52a8\u7a0b\u5e8f\u4e86\u3002 \u8fd9\u4e2a\u6863\u6848\u5b89\u88c5\u5b8c\u6bd5\u4e4b\u540e&#xff0c;\u4f1a\u5c06\u9a71\u52a8\u7a0b\u5e8f\u653e\u7f6e\u4e8e \/usr\/share\/cups\/drivers\/ \u91cc\u5934\u5466&#xff01; \u4e0d\u8fc7\u4f60\u5f97\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u9664\u4e86\u8fd9\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u5916&#xff0c;\u8981\u652f\u6301 Windows 2000 \u4ee5\u540e\u51fa\u4ea7\u7684 Windows \u7248\u672c&#xff0c; \u4f60\u8fd8\u5f97\u5230 Windows XP \u5e95\u4e0b\u7684\u76ee\u5f55\u53bb\u4e0b\u8f7d\u51e0\u4e2a 32 \u4f4d\u652f\u6301\u7684\u6863\u6848&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Win XP 32 \u4f4d&#xff1a;<span style=\"color:#000088\">C:\\\\WINDOWS\\\\system32\\\\spool\\\\drivers\\\\w32x86\\\\3<\/span><\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5c06\u8be5\u76ee\u5f55\u4e0b\u91cc\u9762\u7684 PS \u5f00\u5934\u7684\u6863\u6848\u901a\u901a\u4e0b\u8f7d\u4e0b\u6765&#xff0c;\u5e94\u8be5\u6709\u56db\u4e2a\u6863\u6848\u7684&#xff0c;\u8bf7\u5c06\u4ed6\u590d\u5236\u6210\u4e3a\u6863\u540d\u5c0f\u5199\u7684\u6863\u6848&#xff0c;\u5e76\u4e14\u653e\u7f6e\u5230\u4f60 Samba \u670d\u52a1\u5668\u4e0a\u7684 \/usr\/share\/cups\/drivers\/ \u76ee\u5f55\u4e0b&#xff0c;\u8be5\u76ee\u5f55\u5185\u653e\u7f6e\u7684\u8fd9\u5c31\u662f\u57fa\u672c\u7684\u9a71\u52a8\u7a0b\u5e8f\u8bf4&#xff01; \u5728\u9e1f\u54e5\u7684\u8fd9\u4e2a\u76ee\u5f55\u5e95\u4e0b\u81f3\u5c11\u542b\u6709\u8fd9\u51e0\u4e2a\u6863\u6848\u5c31\u662f\u4e86&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">ll \/usr\/share\/cups\/drivers<\/span><br \/>\n-rw-r&#8211;r&#8211; 1 root root    803  4\u6708 20  2006 cups6.inf<br \/>\n-rw-r&#8211;r&#8211; 1 root root     72  4\u6708 20  2006 cups6.ini<br \/>\n-rw-r&#8211;r&#8211; 1 root root  12568  4\u6708 20  2006 cupsps6.dll<br \/>\n-rw-r&#8211;r&#8211; 1 root root  13672  4\u6708 20  2006 cupsui6.dll  <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0a\u9762\u4e3a cups \u63d0\u4f9b<\/span><br \/>\n-rw-r&#8211;r&#8211; 1 root root 129024  3\u6708 24 13:29 ps5ui.dll    <span style=\"color:#777777\">&lt;&#061;&#061;\u5e95\u4e0b\u4e3a Win XP \u63d0\u4f9b<\/span><br \/>\n-rw-r&#8211;r&#8211; 1 root root 455168  3\u6708 24 13:29 pscript5.dll<br \/>\n-rw-r&#8211;r&#8211; 1 root root  27568  3\u6708 24 13:29 pscript.hlp<br \/>\n-rw-r&#8211;r&#8211; 1 root root 792644  3\u6708 24 13:29 pscript.ntf<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u8ff0\u7684\u6863\u6848\u9e1f\u54e5\u5c06\u4ed6\u6253\u5305\u6210\u4e3a\u4e00\u4e2a\u6863\u6848\u4e86&#xff0c;\u4f60\u53ef\u4ee5\u5728\u5e95\u4e0b\u7684\u8fde\u7ed3\u4e0b\u8f7d&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/linux.vbird.org\/linux_server\/0370samba\/cups-samba-windowsxp.tgz<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0d\u8fc7\u4f60\u5f97\u6ce8\u610f&#xff0c;\u8fd9\u4e2a\u6863\u6848\u5185\u7684 Windows \u6570\u636e\u662f\u7531 32 \u4f4d\u7684 Windows XP \u4e0a\u9762\u6349\u6765\u7684&#xff0c;\u6240\u4ee5\u5bf9\u4e8e Windows 98\/ME \u662f\u6ca1\u6709\u4f5c\u7528\u7684\u3002\u540c\u65f6&#xff0c;\u5bf9\u4e8e 64 \u4f4d\u7684\u5176\u4ed6\u8f83\u665a\u671f\u7684 Windows 7 \u7b49\u7cfb\u7edf\u53ef\u80fd\u5c31\u5f97\u8981\u91cd\u65b0\u5904\u7406\u4e86&#xff01; \u4f60\u5f97\u81ea\u884c\u4e0a\u7f51\u67e5\u9605\u76f8\u5173\u7684\u6570\u636e\u4e0b\u8f7d\u65b9\u5f0f\u5594\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u5fc5\u987b\u8981\u5728 smb.conf \u91cc\u9762\u589e\u52a0\u4e00\u7b14\u65b0\u7684\u5206\u4eab\u6570\u636e&#xff0c;\u8fd9\u4e2a\u5206\u4eab\u6570\u636e\u5fc5\u987b\u662f [print$] \u540d\u79f0\u624d\u884c&#xff01;\u6709\u70b9\u7c7b\u4f3c\u8fd9\u6837\u5566&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n&#8230;.(\u8bbe\u5b9a\u4fdd\u7559\u539f\u672c\u6570\u636e)&#8230;.<br \/>\n[homes]<br \/>\n&#8230;.(\u8bbe\u5b9a\u4fdd\u7559\u539f\u672c\u6570\u636e)&#8230;.<br \/>\n[printers]<br \/>\n&#8230;.(\u8bbe\u5b9a\u4fdd\u7559\u539f\u672c\u6570\u636e)&#8230;.<br \/>\n<span style=\"color:#FFFF00\">[print$]<br \/>\n        comment    &#061; Printer drivers<br \/>\n        path       &#061; \/etc\/samba\/drivers  <span style=\"color:#777777\">&lt;&#061;&#061;\u5b58\u653e\u6253\u5370\u673a\u9a71\u52a8\u7a0b\u5e8f\u7684\u76ee\u5f55<\/span><br \/>\n        browseable &#061; yes<br \/>\n        guest ok   &#061; no<br \/>\n        read only  &#061; yes<br \/>\n        write list &#061; root<\/span>                <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u4e2a\u9a71\u52a8\u7a0b\u5e8f\u7684\u7ba1\u7406\u5458<\/span><br \/>\n[project]<br \/>\n&#8230;.(\u8bbe\u5b9a\u4fdd\u7559\u539f\u672c\u6570\u636e)&#8230;.<\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">mkdir \/etc\/samba\/drivers<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">chcon -t samba_share_t \/etc\/samba\/drivers<\/span><br \/>\n<span style=\"color:#ff6666\"># \u7531\u4e8e\u9884\u8bbe\u7684 CUPS \u4ec5\u6709 root \u80fd\u7ba1\u7406&#xff0c;\u56e0\u6b64\u6211\u4eec\u4ee5 root \u4f5c\u4e3a\u6253\u5370\u673a\u7ba1\u7406\u5458&#xff1b;<br \/>\n# \u540c\u65f6 SELinux \u7684\u7c7b\u578b\u4e5f\u8981\u4fee\u8ba2\u5982\u4e0a\u7684\u65b9\u5f0f&#xff01;\u90a3 root \u5c31\u5f97\u8981\u52a0\u5165 samba \u7684\u652f\u6301\u624d\u884c&#xff1a;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -a -u root<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm               <\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u6d4b\u8bd5\u8bed\u6cd5<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span>  <span style=\"color:#777777\">&lt;&#061;&#061;\u91cd\u65b0\u542f\u52a8<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/127.0.0.1 -U root<\/span><br \/>\nEnter root&#039;s password:  <span style=\"color:#777777\">&lt;&#061;&#061;\u8f93\u5165 root \u5728 samba \u7684\u5bc6\u7801\u5148<\/span><br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Sharename       Type      Comment<br \/>\n        &#8212;&#8212;&#8212;       &#8212;-      &#8212;&#8212;-<br \/>\n        <span style=\"color:#FFFF00\">print$          Disk      Printer drivers<\/span><br \/>\n        project         Disk      smbuser&#039;s project<br \/>\n        <span style=\"color:#FFFF00\">HP_LaserJet_P2015_Series Printer   HP LaserJet P2015 Series<\/span><br \/>\n        IPC$            IPC       IPC Service (This is vbird&#039;s samba server)<br \/>\n        root            Disk      Home Directories<br \/>\n<span style=\"color:#ff6666\"># \u77a7&#xff01;\u6709\u770b\u5230\u4e00\u90e8\u6253\u5370\u673a\u4ee5\u53ca\u9a71\u52a8\u7a0b\u5e8f\u6240\u5728\u7684\u5206\u4eab\u6570\u636e\u5570&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u6211\u4eec\u8981\u544a\u77e5 Samba \u8bf4&#xff0c;\u6211\u4eec\u7684 CUPS \u53ef\u63d0\u4f9b Windows \u5ba2\u6237\u7aef\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u6240\u4ee5\u7528\u6237\u4e0d\u9700\u8981\u81ea\u884c\u8bbe\u5b9a\u4ed6\u4eec\u7684\u9a71\u52a8\u7a0b\u5e8f\u54e9&#xff01; \u8981\u7531 cups \u544a\u77e5 Samba \u662f\u7531 cupsaddsmb \u8fd9\u4e2a\u6307\u4ee4\u6765\u641e\u5b9a\u7684&#xff0c;\u6574\u4e2a\u6307\u4ee4\u7684\u6267\u884c\u5f88\u7b80\u5355\u7684&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">cupsaddsmb [-H SAMBA \u670d\u52a1\u5668\u540d] [-h CUPS \u670d\u52a1\u5668\u540d] \\\\<\/span><br \/>\n&gt;  <span style=\"color:#FFFF00\"> -a -v [-U \u4f7f\u7528\u8005\u8d26\u53f7]<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-H &#xff1a;\u540e\u7eed\u63a5\u7684\u662f Samba \u670d\u52a1\u5668\u540d&#xff0c;\u672c\u673a\u7684\u8bdd\u53ef\u4ee5\u76f4\u63a5\u7528 localhost \u5373\u53ef&#xff1b;<br \/>\n-h &#xff1a;\u540e\u7eed\u63a5\u7684\u4e3a CUPS \u7684\u670d\u52a1\u5668\u540d&#xff0c;\u540c\u6837\u7684\u53ef\u4f7f\u7528 localhost \u5373\u53ef&#xff1b;<br \/>\n-a &#xff1a;\u81ea\u52a8\u641c\u5bfb\u51fa\u6240\u6709\u53ef\u7528\u7684 CUPS \u6253\u5370\u673a&#xff1b;<br \/>\n-v &#xff1a;\u5217\u51fa\u66f4\u591a\u7684\u4fe1\u606f&#xff1b;<br \/>\n-U &#xff1a;\u6253\u5370\u673a\u7ba1\u7406\u5458<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u5229\u7528\u524d\u9762\u7684\u8bf4\u660e\u5c06\u6253\u5370\u673a\u9a71\u52a8\u7a0b\u5e8f\u6302\u4e0a SAMBA (\u6ce8\u610f CUPS \u7ba1\u7406\u5458\u9884\u8bbe\u662f root)<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">cupsaddsmb -H localhost -U root -a -v<\/span><br \/>\nPassword for root required to access localhost via SAMBA: <span style=\"color:#777777\">&lt;&#061;&#061;root \u5728 SAMBA \u5bc6\u7801<\/span><br \/>\n<span style=\"color:#ff6666\"># \u8fd9\u91cc\u4f1a\u95ea\u8fc7\u5f88\u591a\u7684\u8baf\u606f&#xff0c;\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u4e86\u67d0\u4e9b\u4fe1\u606f&#xff0c;\u5e95\u4e0b\u9e1f\u54e5\u4ec5\u5217\u51fa\u7b80\u5355\u7684\u8baf\u606f\u800c\u5df2\u3002<\/span><br \/>\nRunning command: smbclient \/\/localhost\/print$ -N -A \/tmp\/cupsbrdBaE -c &#039;mkdir<br \/>\nW32X86;put \/tmp\/cupsu13OSU W32X86\/HP_LaserJet_P2015_Series.ppd;&#8230;<\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">ll \/etc\/samba\/drivers<\/span><br \/>\ndrwxr-xr-x. 3 root root 4096 Jul 29 15:15 W32X86  <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u5c31\u662f\u9a71\u52a8\u7a0b\u5e8f\u76ee\u5f55<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6700\u540e\u5728\u9a71\u52a8\u7a0b\u5e8f\u7684\u5b58\u653e\u76ee\u5f55\u4f1a\u591a\u51fa\u4e00\u4e2a W32X86 \u7684\u76ee\u5f55&#xff0c;\u4f60\u53ef\u4ee5\u67e5\u8be2\u4e00\u4e0b\u8be5\u76ee\u5f55\u7684\u5185\u5bb9&#xff0c; \u90a3\u5c31\u662f\u9884\u8ba1\u8981\u7ed9\u5ba2\u6237\u7aef\u4f7f\u7528\u7684\u9a71\u52a8\u7a0b\u5e8f\u5566&#xff01;\u8fd9\u6837\u5c31\u641e\u5b9a\u4e86&#xff01;\u4e0d\u8fc7&#xff0c;\u4e3a\u4e86\u5c06\u6240\u6709\u7684\u6570\u636e\u901a\u901a\u9a71\u52a8&#xff0c; \u5efa\u8bae\u4f60\u5c06 CUPS \u53ca SAMBA \u901a\u901a\u91cd\u65b0\u542f\u52a8\u5427&#xff01;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/cups restart<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/nmb restart<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">5. \u4e00\u4e9b\u95ee\u9898\u7684\u514b\u670d&#xff1a;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4e00\u5207\u987a\u5229\u7684\u8bdd&#xff0c;\u4f60\u5728 Windows \u5ba2\u6237\u7aef\u5e94\u8be5\u53ef\u4ee5\u987a\u5229\u7684\u8fde\u63a5\u5230\u6253\u5370\u673a\u5570&#xff01; \u5f00\u5fc3\u5427&#xff01;\u4e0d\u8fc7&#xff0c;\u5982\u679c\u4f60\u66fe\u7ecf\u5370\u9519\u6570\u636e&#xff0c;\u90a3\u4e48\u8be5\u5982\u4f55\u8fdb\u5165 Linux \u7684 Samba \u4e3b\u673a\u5c06\u8be5\u6570\u636e\u79fb\u9664\u5462&#xff1f; \u4f60\u6700\u597d\u77e5\u9053\u5e95\u4e0b\u7684\u51e0\u4e2a\u6307\u4ee4&#xff0c;\u5173\u4e8e\u8fd9\u4e9b\u6307\u4ee4\u7684\u8fdb\u9636\u7528\u6cd5\u5219\u8bf7\u81ea\u884c\u7ed9\u4ed6 man \u770b\u770b\u4e86&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 1. \u5217\u51fa\u6240\u6709\u53ef\u7528\u7684\u6253\u5370\u673a\u72b6\u6001<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">lpstat -a<\/span><br \/>\nHP_LaserJet_P2015_Series accepting requests since Fri 29 Jul 2011 02:55:28 PM CST<\/p>\n<p><span style=\"color:#bbbbbb\"># 2. \u67e5\u8be2\u76ee\u524d\u9ed8\u8ba4\u6253\u5370\u673a\u7684\u7684\u5de5\u4f5c\u60c5\u51b5<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">lpq<\/span><br \/>\nhpljp2015dn \u5df2\u5c31\u7eea<br \/>\n\u6ca1\u6709\u9879\u76ee<br \/>\n<span style=\"color:#ff6666\"># \u5217\u51fa\u6253\u5370\u673a\u7684\u5de5\u4f5c&#xff0c;\u82e5\u6709\u6253\u5370\u4f5c\u4e1a\u5b58\u5728\u65f6 (\u4f8b\u5982\u5173\u6389\u6253\u5370\u673a\u518d\u5370\u6d4b\u8bd5\u9875)&#xff0c;\u4f1a\u5982\u4e0b\u6240\u793a&#xff1a;<\/span><br \/>\nhpljp2015dn \u5df2\u5c31\u7eea\u5e76\u6b63\u5728\u6253\u5370<br \/>\n\u7b49\u7ea7    \u62e5\u6709\u4eba  \u5de5\u4f5c    \u6863\u6848                            \u603b\u8ba1  \u5927\u5c0f<br \/>\nactive  root    2       Test Page                       17408 byte<\/p>\n<p><span style=\"color:#bbbbbb\"># 3. \u5220\u9664\u6240\u6709\u7684\u5de5\u4f5c\u9879\u76ee\u5594&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">lprm &#8211;<\/span><br \/>\n<span style=\"color:#ff6666\"># \u52a0\u4e0a\u90a3\u4e2a\u51cf\u53f7 (-) \u4ee3\u8868\u79fb\u9664\u6240\u6709\u7b49\u5f85\u4e2d\u7684\u6253\u5370\u4f5c\u4e1a&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6253\u5370\u4f5c\u4e1a\u5c31\u662f\u8fd9\u6837\u8fdb\u884c\u7684\u5566&#xff01;\u8d76\u7d27\u8bd5\u770b\u770b\u5427&#xff01;\u63a5\u4e0b\u6765\u63a2\u8ba8\u4e00\u4e0b\u76f8\u5173\u7684\u9632\u706b\u5899\u4e0e\u5b89\u5168\u6027\u7684\u8ba8\u8bba&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-18goaxmuyc2f4.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.6 \u5b89\u5168\u6027\u7684\u8bae\u9898\u4e0e\u7ba1\u7406<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f7f\u7528 SAMBA \u5176\u5b9e\u662f\u6709\u4e00\u5b9a\u7a0b\u5ea6\u7684\u5371\u9669\u6027\u7684&#xff0c;\u8fd9\u662f\u56e0\u4e3a\u5f88\u591a\u7f51\u7edc\u653b\u51fb\u7684\u8815\u866b\u3001\u75c5\u6bd2\u3001\u6728\u9a6c\u5c31\u662f\u900f\u8fc7\u7f51\u82b3\u6765\u653b\u51fb\u7684&#xff01; \u4e3a\u4e86\u62b5\u6321\u4e0d\u5fc5\u8981\u7684\u8054\u673a&#xff0c;\u6240\u4ee5 CentOS 5.x \u9884\u8bbe\u7684 SELinux \u5df2\u7ecf\u5173\u95ed\u4e86\u5f88\u591a Samba \u8054\u673a\u7684\u529f\u80fd&#xff0c; \u56e0\u6b64\u9884\u8bbe\u60c5\u51b5\u4e0b&#xff0c;\u5f88\u591a\u5ba2\u6237\u7aef\u7684\u6302\u8f7d\u53ef\u80fd\u4f1a\u6709\u95ee\u9898\u3002\u6b64\u5916&#xff0c;\u4ec5\u5f00\u653e\u6709\u6743\u9650\u7684\u7f51\u57df\u6765\u6e90&#xff0c;\u4ee5\u53ca\u900f\u8fc7 smb.conf \u6765\u7ba1\u7406\u7279\u5b9a\u7684\u6743\u9650&#xff0c;\u4e5f\u662f\u5f88\u91cd\u8981\u7684&#xff01;\u540c\u65f6&#xff0c;Linux \u6587\u4ef6\u7cfb\u7edf\u7684 r, w, x \u6743\u9650\u4e5f\u662f\u9700\u8981\u6ce8\u610f\u7684\u5594&#xff01; \u6211\u4eec\u5e95\u4e0b\u5c31\u7b80\u5355\u7684\u4ecb\u7ecd\u4e00\u4e0b\u4e00\u4e9b\u57fa\u672c\u7684\u5b89\u5168\u6027\u7ba1\u7406\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SELinux \u7684\u76f8\u5173\u8bae\u9898&#xff1a;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5176\u5b9e\u5c31\u5982\u540c\u7b2c\u4e03\u7ae0 (7.4.5)\u00a0\u91cc\u9762\u63d0\u5230\u7684&#xff0c;\u6211\u4eec\u900f\u8fc7\u767b\u5f55\u6863\u7684\u5185\u5bb9\u5c31\u80fd\u591f\u77e5\u9053\u5982\u4f55\u89e3\u51b3 SELinux \u5bf9\u5404\u4e2a\u670d\u52a1\u6240\u9020\u6210\u7684\u95ee\u9898\u4e86\u3002\u4e0d\u8fc7&#xff0c;\u65e2\u7136\u6211\u4eec\u77e5\u9053\u670d\u52a1\u662f Samba \u4e86&#xff0c;\u80fd\u4e0d\u80fd\u627e\u51fa\u4e0e Samba \u6709\u5173\u7684 SELinux \u89c4\u5219\u5462&#xff1f;\u5f53\u7136\u53ef\u4ee5&#xff01;\u57fa\u672c\u7684 Samba \u89c4\u5219\u4e3b\u8981\u6709&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">getsebool -a | grep samba<\/span><br \/>\nsamba_domain_controller &#8211;&gt; off  <span style=\"color:#777777\">&lt;&#061;&#061;PDC \u65f6\u53ef\u80fd\u4f1a\u7528\u5230<\/span><br \/>\nsamba_enable_home_dirs &#8211;&gt; off   <span style=\"color:#777777\">&lt;&#061;&#061;\u5f00\u653e\u7528\u6237\u4f7f\u7528\u5bb6\u76ee\u5f55<\/span><br \/>\nsamba_export_all_ro &#8211;&gt; off      <span style=\"color:#777777\">&lt;&#061;&#061;\u5141\u8bb8\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u7684\u529f\u80fd<\/span><br \/>\nsamba_export_all_rw &#8211;&gt; off      <span style=\"color:#777777\">&lt;&#061;&#061;\u5141\u8bb8\u8bfb\u5199\u6587\u4ef6\u7cfb\u7edf\u7684\u529f\u80fd<\/span><br \/>\nsamba_share_fusefs &#8211;&gt; off<br \/>\nsamba_share_nfs &#8211;&gt; off<br \/>\nuse_samba_home_dirs &#8211;&gt; off      <span style=\"color:#777777\">&lt;&#061;&#061;\u7c7b\u4f3c\u7528\u6237\u5bb6\u76ee\u5f55\u7684\u5f00\u653e&#xff01;<\/span><br \/>\nvirt_use_samba &#8211;&gt; off<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u770b\u5427&#xff01;\u51e0\u4e4e\u6240\u6709\u7684\u89c4\u5219\u9ed8\u8ba4\u90fd\u662f\u5173\u95ed\u7684&#xff01;\u6240\u4ee5\u6211\u4eec\u9700\u8981\u6162\u6162\u7684\u6253\u5f00\u554a&#xff01;\u76ee\u524d\u6211\u4eec\u4ec5\u4f1a\u7528\u5230\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u4ee5\u53ca\u5206\u4eab\u6210\u4e3a\u53ef\u64e6\u5199&#xff0c; \u4e0d\u8fc7\u4f3c\u4e4e\u4ec5\u8981 samba_enable_home_dirs \u90a3\u4e2a\u9879\u76ee\u8bbe\u5b9a\u59a5\u5f53\u5373\u53ef\u5594&#xff01;\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">setsebool -P samba_enable_home_dirs&#061;1<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">getsebool -a | grep samba_enable_home<\/span><br \/>\nsamba_enable_home_dirs &#8211;&gt; <span style=\"color:#FFFF00\">on<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u6837\u7528\u6237\u6302\u8f7d\u4ed6\u4eec\u7684\u5bb6\u76ee\u5f55\u65f6 (\u4f8b\u5982 smb1 \u4f7f\u7528 \/\/127.0.0.1\/smb1\/) \u5c31\u4e0d\u4f1a\u51fa\u73b0\u65e0\u6cd5\u6302\u8f7d\u7684\u602a\u95ee\u9898\u4e86&#xff01;\u6b64\u5916&#xff0c; \u7531\u4e8e\u5206\u4eab\u6210\u4e3a Samba \u7684\u76ee\u5f55\u8fd8\u9700\u8981\u6709 samba_share_t \u7684\u7c7b\u578b\u3002\u90a3\u6211\u4eec\u8fd8\u6709\u5206\u4eab \/home\/project \u8fd8\u8bb0\u5f97\u5417&#xff1f;\u90a3\u4e2a\u76ee\u5f55\u4e5f\u9700\u8981\u4fee\u8ba2\u5594&#xff01; \u8fd9\u6837\u505a\u770b\u770b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">ll -Zd \/home\/project<\/span><br \/>\ndrwxrws&#8212;. root users unconfined_u:object_r:<span style=\"color:#FFFF00\">home_root_t<\/span>:s0 \/home\/project<\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">chcon -t samba_share_t \/home\/project<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">ll -Zd \/home\/project<\/span><br \/>\ndrwxrws&#8212;. root users unconfined_u:object_r:<span style=\"color:#FFFF00\">samba_share_t<\/span>:s0 \/home\/project<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u5206\u4eab\u7684\u76ee\u5f55\u4e0d\u53ea\u662f Samba &#xff0c;\u8fd8\u5305\u62ec FTP \u6216\u8005\u662f\u5176\u4ed6\u7684\u670d\u52a1\u65f6&#xff0c;\u90a3\u53ef\u80fd\u5c31\u5f97\u8981\u4f7f\u7528 public_content_t \u8fd9\u4e2a\u5927\u5bb6\u90fd\u80fd\u591f\u8bfb\u53d6\u7684\u7c7b\u578b\u624d\u884c&#xff01;\u82e5\u4f60\u8fd8\u6709\u53d1\u73b0\u4efb\u4f55 SELinux \u7684\u95ee\u9898&#xff0c;\u8bf7\u4f9d\u7167 \/var\/log\/messages \u91cc\u9762\u7684\u4fe1\u606f\u53bb\u4fee\u8ba2\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9632\u706b\u5899\u8bae\u9898&#xff1a;\u5229\u7528 iptables \u6765\u7ba1\u7406<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6700\u7b80\u5355\u7684\u7ba1\u7406\u767b\u5165 SAMBA \u7684\u65b9\u6cd5\u5c31\u662f\u900f\u8fc7 iptables \u5566&#xff01;\u8be6\u7ec6\u7684\u8bf4\u660e\u6211\u4eec\u5df2\u7ecf\u5728\u7b2c\u4e5d\u7ae0\u9632\u706b\u5899\u4e2d\u63d0\u8fc7\u4e86&#xff0c;\u6240\u4ee5\u8fd9\u91cc\u4e0d\u518d\u8be6\u52a0\u8bf4\u660e\u3002 \u8981\u77e5\u9053\u7684\u662f&#xff0c;\u5982\u679c\u4f60\u4ec5\u8981\u9488\u5bf9\u5e95\u4e0b\u7684\u8303\u56f4\u5f00\u653e Samba \u65f6&#xff0c;\u53ef\u4ee5\u8fd9\u6837\u60f3&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4ec5\u9488\u5bf9 192.168.100.0\/24, 192.168.1.0\/24 \u8fd9\u4e24\u4e2a\u7f51\u57df\u5f00\u653e SAMBA \u4f7f\u7528\u6743<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u542f\u7528\u7684 port UDP: 137, 138 \u53ca TCP: 139, 445&#xff1b;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6240\u4ee5 iptables.allow \u89c4\u5219\u5f53\u4e2d\u5e94\u8be5\u8981\u52a0\u5165\u8fd9\u51e0\u9879&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/usr\/local\/virus\/iptables\/iptables.allow<\/span><br \/>\n<span style=\"color:#ff6666\"># \u52a0\u5165\u5e95\u4e0b\u8fd9\u51e0\u884c&#xff01;<\/span><br \/>\niptables -A INPUT -i $EXTIF -p tcp -s 192.168.100.0\/24 -m multiport \\\\<br \/>\n         &#8211;dport 139,445 -j ACCEPT<br \/>\niptables -A INPUT -i $EXTIF -p tcp -s 192.168.1.0\/24 -m multiport \\\\<br \/>\n         &#8211;dport 139,445 -j ACCEPT<br \/>\niptables -A INPUT -i $EXTIF -p udp -s 192.168.100.0\/24 -m multiport \\\\<br \/>\n         &#8211;dport 137,138 -j ACCEPT<br \/>\niptables -A INPUT -i $EXTIF -p udp -s 192.168.1.0\/24 -m multiport \\\\<br \/>\n         &#8211;dport 137,138 -j ACCEPT<br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/usr\/local\/virus\/iptables\/iptables.rule<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u662f\u5f88\u7b80\u5355\u5f88\u7b80\u5355\u7684\u9632\u706b\u5899\u89c4\u5219&#xff0c;\u4f60\u5fc5\u987b\u8981\u4f9d\u636e\u4f60\u7684\u73af\u5883\u81ea\u884c\u4fee\u6539 (\u901a\u5e38\u4fee\u6539\u90a3\u4e2a 192.168.1.0\/24 \u7f51\u6bb5\u5373\u53ef&#xff01;)\u3002 \u7531\u4e8e smbd \u53ca nmbd \u5e76\u4e0d\u652f\u6301 TCP Wrappers &#xff0c;\u6240\u4ee5\u4f60\u4e5f\u53ea\u80fd\u900f\u8fc7 iptables \u6765\u63a7\u5236\u4e86&#xff5e;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9632\u706b\u5899\u8bae\u9898&#xff1a; \u900f\u8fc7\u5185\u5efa\u7684 Samba \u8bbe\u5b9a (smb.conf)<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e8b\u5b9e\u4e0a Samba \u5df2\u7ecf\u6709\u8bb8\u591a\u9632\u706b\u5899\u673a\u5236\u5566&#xff01;\u90a3\u5c31\u662f\u5728 smb.conf \u5185\u7684 hosts allow \u53ca hosts deny \u8fd9\u4e24\u4e2a\u53c2\u6570\u3002 \u901a\u5e38\u6211\u4eec\u53ea\u8981\u4f7f\u7528 hosts allow \u5373\u53ef&#xff0c;\u90a3\u4e48\u6ca1\u6709\u5199\u5165\u8fd9\u4e2a\u8bbe\u5b9a\u9879\u76ee\u7684\u5176\u4ed6\u6765\u6e90\u5c31\u4f1a\u88ab\u62d2\u7edd\u8054\u673a\u7684&#xff01;\u8fd9\u662f\u6bd4\u8f83\u4e25\u683c\u7684\u8bbe\u5b9a\u3002 \u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u5982\u679c\u4f60\u53ea\u60f3\u8981\u8ba9\u672c\u673a\u3001192.168.100.254, 192.168.100.10, 192.168.1.0\/24 \u4f7f\u7528 SAMBA \u800c\u5df2&#xff0c;\u90a3\u4e48\u53ef\u4ee5\u8fd9\u6837\u5199&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n        <span style=\"color:#ff6666\"># \u8ddf\u9632\u706b\u5899\u7684\u8bae\u9898\u6709\u5173\u7684\u8bbe\u5b9a<\/span><br \/>\n        <span style=\"color:#FFFF00\">hosts allow &#061; 127. 192.168.100.254 192.168.100.10 192.168.1.<\/span><br \/>\n[homes]<br \/>\n&#8230;.\u4fdd\u7559\u539f\u59cb\u8bbe\u5b9a&#8230;.<br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u4e2a\u8bbe\u5b9a\u503c\u7684\u5185\u5bb9\u652f\u6301\u90e8\u5206\u6bd4\u5bf9&#xff0c;\u56e0\u6b64 192.168.1.0\/24 \u53ea\u8981\u5199\u51fa\u524d\u9762\u4e09\u4e2a IP \u6bb5\u5373\u53ef (192.168.1.)\u3002 \u5982\u6b64\u4e00\u6765\u4e0d\u4f46\u53ea\u6709\u6570\u90e8\u4e3b\u673a\u53ef\u4ee5\u767b\u5165\u6211\u4eec\u7684 SAMBA \u670d\u52a1\u5668&#xff0c;\u800c\u4e14\u8bbe\u5b9a\u503c\u53c8\u7b80\u5355&#xff01;\u4e0d\u50cf iptables \u5199\u7684\u843d\u843d\u957f&#xff5e; \u9e1f\u54e5\u5efa\u8bae\u5728\u9632\u706b\u5899\u8bae\u9898\u65b9\u9762&#xff0c;\u53ea\u8981\u4f7f\u7528 iptables \u6216 hosts allow \u5176\u4e2d\u4e00\u9879\u5373\u53ef&#xff0c;\u5f53\u4e2d\u53c8\u4ee5 hosts allow \u8f83\u4e3a\u5efa\u8bae\u5537&#xff01; \u5f53\u7136\u5566&#xff0c;\u5982\u679c\u4f60\u662f\u9488\u5bf9\u533a\u7f51\u5f00\u653e\u7684&#xff0c;\u90a3\u4e48\u8bbe\u5b9a iptables \u9632\u706b\u5899\u53cd\u800c\u662f\u6bd4\u8f83\u597d\u7684\u5466&#xff01;\u56e0\u4e3a\u4e0d\u9700\u8981\u66f4\u52a8\u5230 smb.conf \u914d\u7f6e\u6587\u4ef6\u561b&#xff01;\u8ba9\u670d\u52a1\u7684\u8bbe\u5b9a\u53d8\u7684\u6bd4\u8f83\u5355\u7eaf\u4e9b&#xff5e;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6587\u4ef6\u7cfb\u7edf\u8bae\u9898&#xff1a;\u5229\u7528 Quota \u9650\u5236\u7528\u6237\u78c1\u76d8\u4f7f\u7528<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e2\u7136\u7f51\u82b3\u662f\u8981\u5206\u4eab\u6587\u4ef6\u7cfb\u7edf\u7ed9\u7528\u6237\u7684&#xff0c;\u90a3\u4e48\u60f3\u5f53\u7136\u5c14&#xff0c;\u5404\u4e2a Samba \u7528\u6237\u4eec\u786e\u5b9e\u4f1a\u5c06\u6570\u636e\u653e\u7f6e\u5230\u4f60\u7684 Samba \u670d\u52a1\u5668\u4e0a\u561b&#xff01; \u90a3\u4e07\u4e00\u5355\u4e2a\u7528\u6237\u968f\u4fbf\u4e0a\u4f20\u4e2a\u6570\u767e GB \u7684\u5bb9\u91cf\u5230\u4f60\u7684 Samba \u670d\u52a1\u5668&#xff0c;\u800c\u4e14\u5e38\u5e38\u7ed9\u4f60\u968f\u610f\u5b58\u53d6\u4e00\u756a&#xff0c; \u4f1a\u4e0d\u4f1a\u9020\u6210\u6587\u4ef6\u7cfb\u7edf\u5206\u914d\u4e0d\u516c\u6216\u8005\u662f\u5e26\u5bbd\u65b9\u9762\u7684\u95ee\u9898\u5462&#xff1f;\u60f3\u60f3\u5c31\u89c9\u5f97\u662f\u300e\u4f1a\u561b&#xff01;\u300f\u90a3\u600e\u529e&#xff1f;\u5c31\u900f\u8fc7 Quota \u78c1\u76d8\u914d\u989d\u554a&#xff01; \u78c1\u76d8\u914d\u989d\u6211\u4eec\u5728\u57fa\u7840\u7bc7\u7b2c\u4e09\u7248\u7b2c\u5341\u4e94\u7ae0\u5df2\u7ecf\u8c08\u8fc7&#xff0c;\u5728\u672c\u4e66\u7b2c\u4e00\u7ae0 (1.2.2-3)\u00a0\u91cc\u9762\u4e5f\u5df2\u7ecf\u6709\u5b9e\u4f5c\u8fc7&#xff0c; \u5728\u5e95\u4e0b\u8bf7\u4f60\u4f9d\u636e\u7b2c\u4e00\u7ae0\u7684\u540e\u7eed\u52a8\u4f5c\u6765\u5904\u7406\u5427&#xff01;<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f8b\u9898&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eec\u9884\u8ba1\u5206\u914d smb1, smb2, smb3 \u5728\u4ed6\u4eec\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55\u4e0b&#xff0c;\u5404\u62e5\u6709 300MB\/400MB (soft\/hard) \u7684\u78c1\u76d8\u914d\u989d\u9650\u91cf&#xff0c;\u90a3\u8be5\u5982\u4f55\u505a&#xff1f;<\/span><\/span><br \/>\n       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7b54&#xff1a;<\/span><\/span> <\/p>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bf7\u5148\u4f9d\u636e\u7b2c\u4e00\u7ae0\u7684 Quota (1.2.2-3) \u76f8\u5173\u6570\u636e\u5904\u7406\u5b8c&#xff1a;<\/span><\/span> <\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\/etc\/fstab \u52a0\u5165 \/home \u6302\u8f7d\u70b9\u7684 usrquota,grpquota \u7b49\u8bbe\u5b9a\u503c&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u91cd\u65b0\u6302\u8f7d \/home &#xff0c;\u8ba9 Quota \u5b9e\u9645\u88ab\u652f\u6301&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4ee5 quotacheck -avug \u5efa\u7acb Quota \u7684\u6570\u636e\u5e93\u6863\u6848&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u542f\u52a8 Quota &#xff1b;<\/span><\/span><\/li>\n<\/ul>\n<p>       <span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5047\u82e5\u4f60\u5df2\u7ecf\u4e8e\u7b2c\u4e00\u7ae0\u5c31\u5904\u7406\u5b8c\u6bd5\u4e86&#xff0c;\u90a3\u4e48\u8fd9\u4e00\u9898\u5c31\u975e\u5e38\u7b80\u5355\u5594&#xff01;\u900f\u8fc7 edquota -u smb1 \u6765\u5904\u7406\u5373\u53ef&#xff01;<\/span><\/span> <\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">edquota -u smb1<\/span><br \/>\nDisk quotas for user smb1 (uid 2004):<br \/>\n  Filesystem                blocks    soft    hard inodes  soft  hard<br \/>\n  \/dev\/mapper\/server-myhome       0 <span style=\"color:#FFFF00\">300000  400000<\/span>      0     0     0<\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">edquota -p smb1 smb2<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">edquota -p smb1 smb3<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">repquota -ua<\/span><br \/>\n*** Report for user quotas on device \/dev\/mapper\/server-myhome<br \/>\nBlock grace time: 7days; Inode grace time: 7days<br \/>\n                        Block limits                File limits<br \/>\nUser            used    soft    hard  grace    used  soft  hard  grace<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nsmb1      &#8212;      32  300000  400000              9     0     0<br \/>\nsmb2      &#8212;      32  300000  400000              8     0     0<br \/>\nsmb3      &#8212;      32  300000  400000              8     0     0<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.2.7 \u4e3b\u673a\u5b89\u88c5\u65f6\u7684\u89c4\u5212\u4e0e\u4e2d\u6587\u6247\u533a\u6302\u8f7d<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u4f60\u77e5\u9053 Samba \u670d\u52a1\u5668\u7684\u529f\u80fd\u662f\u7528\u6765\u4f5c\u4e3a\u6587\u4ef6\u670d\u52a1\u5668\u7684&#xff0c;\u6bcf\u4e2a\u4f7f\u7528\u8005\u90fd\u53ef\u4ee5\u62e5\u6709\u5bb6\u76ee\u5f55&#xff0c;\u5e76\u900f\u8fc7\u7f51\u82b3\u7684\u529f\u80fd\u6765\u94fe\u63a5\u5230 Samba \u670d\u52a1\u5668\u4e2d\u3002\u8fd9\u5c31\u6709\u4e2a\u95ee\u9898\u5566&#xff0c;\u90a3\u5c31\u662f\u4f60\u7684\u4f7f\u7528\u8005\u5982\u679c\u592a\u591a&#xff0c;\u5e76\u4e14\u5c06\u4ed6\u4eec\u7684\u91cd\u8981\u6570\u636e\u90fd\u653e\u5230\u8fd9\u90e8 Samba \u670d\u52a1\u5668\u4e0a\u5934\u7684\u8bdd&#xff0c;\u90a3\u80af\u5b9a \/home \u672a\u6765\u4f1a\u6709\u70b9\u4e0d\u8db3\u554a&#xff01;\u6240\u4ee5 \/home \u6240\u5728\u7684\u78c1\u76d8\u6216\u8bb8\u53ef\u4ee5\u4f7f\u7528\u5927\u4e00\u70b9\u7684\u786c\u76d8&#xff0c; \u6216\u8005\u4f7f\u7528\u78c1\u76d8\u9635\u5217&#xff0c;\u4f7f\u7528\u00a0LVM (\u57fa\u7840\u5b66\u4e60\u7bc7\u7b2c\u4e09\u7248\u5341\u4e94\u7ae0)\u00a0\u4e5f\u662f\u4e2a\u4e0d\u9519\u7684\u65b9\u6848\u3002 \u5e95\u4e0b\u4e3a\u7b80\u5355\u7684\u601d\u8003\u65b9\u5411&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u5b89\u88c5 Linux \u7684\u65f6\u5019&#xff0c;\u5efa\u8bae\u4e0d\u9700\u8981\u5b89\u88c5 X Window &#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u89c4\u5212 Linux \u65f6&#xff0c;\/home \u6700\u597d\u72ec\u7acb\u51fa\u4e00\u4e2a partition &#xff0c;\u800c\u4e14\u786c\u76d8\u7a7a\u95f4\u6700\u597d\u80fd\u591f\u5927\u4e00\u4e9b&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\/home \u72ec\u7acb\u51fa\u6765\u7684 partition \u53ef\u4ee5\u5355\u72ec\u8fdb\u884c quota \u7684\u4f5c\u4e1a&#xff0c;\u4ee5\u89c4\u8303\u7528\u6237\u7684\u6700\u5927\u786c\u76d8\u7528\u91cf&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e0\u7f51\u5361\u7684\u6253\u5370\u673a (USB) \u53ef\u76f4\u63a5\u94fe\u63a5\u5230 Linux \u4e3b\u673a\u518d\u900f\u8fc7 Samba \u5206\u4eab&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e SAMBA \u4e00\u822c\u6765\u8bf4\u90fd\u4ec5\u9488\u5bf9\u5185\u90e8 (LAN) \u4e3b\u673a\u8fdb\u884c\u5f00\u653e&#xff0c;\u6240\u4ee5&#xff0c;\u53ef\u80fd\u7684\u8bdd SAMBA \u4e3b\u673a\u76f4\u63a5\u4f7f\u7528 private IP \u6765\u8bbe\u5b9a\u5373\u53ef&#xff0c;\u5f53\u7136\u5566&#xff0c; SAMBA \u662f\u5426\u4f7f\u7528 private IP \u8fd8\u5f97\u89c6\u4f60\u7684\u6574\u4e2a\u7f51\u57df\u7684 IP \u7f51\u6bb5\u7684\u7279\u6027\u6765\u89c4\u5212\u3002 \u4ee5\u9e1f\u54e5\u7814\u7a76\u5ba4\u6765\u8bf4&#xff0c;\u56e0\u4e3a\u5b9e\u9a8c\u5ba4\u6240\u6709\u8ba1\u7b97\u673a\u7684 IP \u90fd\u662f Public IP&#xff0c;\u90a3\u4e48 SAMBA \u5982\u679c\u4f7f\u7528 Private IP \u53cd\u800c\u4f1a\u8ba9\u5927\u5bb6\u90fd\u65e0\u6cd5\u8fde\u63a5\u4e0a\u554a&#xff01; ^_^<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u7684 SAMBA \u4e3b\u673a\u4f7f\u7528 Public IP \u65f6&#xff0c;\u8bf7\u7279\u522b\u7559\u610f\u89c4\u8303\u597d\u9632\u706b\u5899\u7684\u8bbe\u5b9a&#xff0c;\u5c3d\u91cf\u4ec5\u8ba9 LAN \u5185\u7684\u8ba1\u7b97\u673a\u53ef\u4ee5\u8054\u673a\u8fdb\u6765\u5373\u53ef&#xff0c;\u4e0d\u8981\u5bf9 Internet \u5f00\u653e\u5594&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u5982\u679c\u4f60\u7684 Samba \u670d\u52a1\u5668\u9700\u8981\u6302\u8f7d\u542b\u6709\u4e2d\u6587\u7684 partition \u65f6&#xff0c;\u8b6c\u5982\u8bf4\u4f60\u5c06\u539f\u672c Windows XP \u7684 FAT32 \u6587\u4ef6\u7cfb\u7edf\u632a\u5230 Linux \u7cfb\u7edf\u4e0b&#xff0c;\u6b64\u65f6\u5982\u679c\u7528\u4e00\u822c\u6a21\u5f0f\u6765\u6302\u8f7d\u8be5\u5206\u5272\u69fd\u65f6&#xff0c;\u4e00\u4e9b\u4e2d\u6587\u6863\u540d\u53ef\u80fd\u4f1a\u65e0\u6cd5\u88ab\u987a\u5229\u7684\u663e\u793a\u51fa\u6765\u3002 \u8fd9\u4e2a\u65f6\u5019\u4f60\u5c31\u5f97\u9700\u8981\u8fd9\u6837\u505a\u4e86&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">mount -t vfat -o iocharset&#061;big5,codepage&#061;950 \/dev\/sd[a-p][1-15] \/mount\/point<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5176\u4e2d iocharset \u6307\u7684\u662f\u672c\u673a\u7684\u8bed\u7cfb\u7f16\u7801\u65b9\u5f0f&#xff0c; codepage \u5219\u4e0e\u8fdc\u7a0b\u8f6f\u4ef6\u6709\u5173\u3002\u56e0\u4e3a\u6211\u4eec\u662f\u5728\u672c\u673a\u8fdb\u884c\u6302\u8f7d&#xff0c; \u6240\u4ee5\u5b9e\u9645\u4e0a\u4f7f\u7528 iocharset \u8fd9\u4e2a\u53c2\u6570\u5373\u53ef\u5566&#xff01;\u66f4\u591a\u8bf4\u660e\u5219\u8bf7\u770b\u4e0b\u8282\u7684\u5ba2\u6237\u7aef\u8bbe\u5b9a\u90e8\u5206\u5570&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.3 Samba \u5ba2\u6237\u7aef\u8f6f\u4ef6\u529f\u80fd<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u4f60\u5df2\u7ecf\u67b6\u8bbe\u597d\u4e86 Samba \u670d\u52a1\u5668\u5566&#xff01;\u6709\u670d\u52a1\u5668\u5f53\u7136\u8981\u6709\u5ba2\u6237\u7aef\u6765\u4f7f\u7528\u624d\u662f\u597d\u7684\u670d\u52a1\u5668\u561b&#xff01;\u4e0d\u7136\u8981\u8fd9\u4e2a\u670d\u52a1\u5668\u5e72\u561b&#xff1f; \u800c\u6211\u4eec\u5047\u8bbe\u5c40\u57df\u7f51\u7edc\u5185\u6709 Windows\/Linux \u7cfb\u7edf&#xff0c;\u8fd9\u4e24\u79cd\u7cfb\u7edf\u90fd\u662f\u900f\u8fc7 NetBIOS over TCP\/IP \u6765\u8fde\u4e0a Samba \u670d\u52a1\u5668\u7684&#xff0c; \u5728\u8bbe\u5b9a\u4e4b\u524d\u4f60\u5fc5\u987b\u8981\u77e5\u9053\u7684\u6709\u51e0\u4ef6\u4e8b&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u533a\u7f51\u5185\u7684\u4e3b\u673a\u6700\u597d\u5177\u6709\u76f8\u540c\u7684\u5de5\u4f5c\u7ec4&#xff0c;\u4e14\u5177\u6709\u4e0d\u540c\u7684\u4e3b\u673a\u540d&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Windows XP pro. \u6700\u591a\u4ec5\u80fd\u5141\u8bb8\u5341\u4e2a\u7528\u6237\u540c\u65f6\u8fde\u63a5\u5230\u81ea\u5df1\u7684\u7f51\u82b3&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f60\u53ef\u4ee5\u5728\u7f51\u82b3\u5f53\u4e2d\u770b\u5230\u7684\u901a\u5e38\u662f\u76f8\u540c\u7fa4\u7ec4\u7684\u4e3b\u673a&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53ef\u4ee5\u4f7f\u7528\u300e\u641c\u5bfb\u300f&#8211;&gt;\u300e\u8ba1\u7b97\u673a\u300f&#8211;&gt;\u300e\u8f93\u5165 IP\u300f\u6765\u67e5\u5230 Samba \u4e3b\u673a&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Windows \u7684\u7f51\u82b3\u9884\u8bbe\u4ec5\u6709\u540c\u4e00 IP \u7f51\u6bb5\u7684\u4e3b\u673a\u624d\u80fd\u767b\u5165 (Windows \u9632\u706b\u5899\u8bbe\u5b9a)&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765\u54b1\u4eec\u5c31\u5206\u522b\u4f9d\u7167 Windows \u53ca Linux \u7cfb\u7edf\u6765\u505a\u8bf4\u660e\u5427&#xff01;<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.3.1 Windows \u7cfb\u7edf\u7684\u4f7f\u7528<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 Windows \u4e0a\u9762\u7684\u641c\u5bfb\u7f51\u7edc\u4e0a\u7684\u7f51\u82b3\u4e3b\u673a\u5b9e\u5728\u633a\u7b80\u5355\u7684&#xff0c;\u4f60\u6709\u597d\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5904\u7406&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6253\u5f00\u300e\u6863\u6848\u603b\u7ba1\u300f&#xff0c;\u300e\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u300f\u3001\u300e\u6574\u4e2a\u7f51\u7edc\u300f\u3001\u300eMicrosoft Windows Network\u300f \u5c31\u80fd\u770b\u5230\u5c5e\u4e8e\u4f60\u7fa4\u7ec4\u7684\u6240\u6709\u8ba1\u7b97\u673a\u4e3b\u673a\u4e86&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u300e\u5f00\u59cb\u300f\u3001\u300e\u641c\u5bfb\u300f\u3001\u300e\u6863\u6848\u6216\u6587\u4ef6\u5939\u300f\u3001\u300e\u8ba1\u7b97\u673a\u6216\u4eba\u5458\u300f\u3001\u300e\u7f51\u7edc\u4e0a\u7684\u8ba1\u7b97\u673a\u300f&#xff0c;\u7136\u540e\u5728\u51fa\u73b0\u7684\u65b9\u6846\u5f53\u4e2d\u586b\u5199\u6b63\u786e\u7684 IP &#xff0c;\u6309\u4e0b\u300e\u641c\u5bfb\u300f\u5373\u53ef&#xff01;\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u9002\u7528\u4e8e\u4e0d\u5728\u540c\u4e00\u4e2a\u7fa4\u7ec4\u5f53\u4e2d\u7684\u7f51\u7edc\u4e3b\u673a\u5594&#xff01;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u662f Windows 7 \u7684\u8bdd&#xff0c;\u53ea\u8981\u70b9\u9009\u6587\u4ef6\u5939\u5373\u53ef\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u5982\u679c\u60f3\u8981\u8fde\u63a5\u5230\u6211\u4eec\u7684 Samba \u4e3b\u673a\u7684\u8bdd&#xff0c;\u800c\u53c8\u4e0d\u77e5\u5230\u8fd9\u90e8 Samba \u4e3b\u673a\u7684 NetBIOS name &#xff0c; \u90a3\u5229\u7528\u641c\u5bfb\u7684\u7ed3\u679c\u4f1a\u6709\u70b9\u7c7b\u4f3c\u5982\u4e0b\u7684\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u5ba2\u6237\u7aef\u641c\u5bfb\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18y35dzjll14d.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-1\u3001Windows 7 \u5ba2\u6237\u7aef\u641c\u5bfb\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u56fe\u5de6\u4fa7\u5148\u70b9\u9009\u300e\u7f51\u7edc\u300f&#xff0c;\u7136\u540e\u5230\u53f3\u4e0a\u65b9\u7684\u6846\u6846\u4e2d&#xff0c;\u8f93\u5165 NetBIOS name&#xff0c;\u82e5\u4e0d\u77e5\u9053\u7684\u8bdd&#xff0c;\u5c31\u7559\u767d\u8ba9 Windows 7 \u81ea\u5df1\u627e\u3002 \u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u5c31\u6709\u627e\u5230\u4e09\u90e8\u7f51\u7edc\u4e3b\u673a\u554a&#xff01;\u6211\u4eec\u6765\u70b9\u9009\u4e00\u4e0b VBIRDSERVER \u5427&#xff01; \u56e0\u4e3a\u8981\u767b\u5165\u4eba\u5bb6\u670d\u52a1\u5668&#xff0c;\u6240\u4ee5\u5c31\u88ab\u8981\u6c42\u8981\u8f93\u5165\u5bc6\u7801\u3002 \u5982\u4e0b\u56fe\u6240\u793a&#xff0c;\u8bf7\u586b\u5199\u597d\u4f60\u6240\u62e5\u6709\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u5ba2\u6237\u7aef\u767b\u5165 SAMBA \u670d\u52a1\u5668\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18qrvdam2ebes.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-2\u3001Windows 7 \u5ba2\u6237\u7aef\u767b\u5165 SAMBA \u670d\u52a1\u5668\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u82e5\u987a\u5229\u767b\u5165\u7cfb\u7edf\u4e86&#xff0c;\u90a3\u4e48\u5c31\u80fd\u591f\u770b\u5230\u5982\u4e0b\u7684\u56fe\u793a&#xff0c;\u5c31\u662f\u53d6\u5f97\u8be5\u670d\u52a1\u5668\u7684\u53ef\u7528\u8d44\u6e90\u5566&#xff01;\u56e0\u4e3a\u6211\u4eec\u5e76\u6ca1\u6709\u9488\u5bf9 Windows 7 \u63d0\u4f9b\u6253\u5370\u673a\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u90a3\u90e8\u4efd\u5148\u7565\u8fc7\u3002\u6211\u4eec\u73b0\u5728\u6765\u5c06 project \u6302\u8f7d\u6210\u672c\u673a\u78c1\u76d8\u8bd5\u770b\u770b&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u5ba2\u6237\u7aef\u767b\u5165 SAMBA \u670d\u52a1\u5668\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-181yd5eujjqta.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-3\u3001Windows 7 \u5ba2\u6237\u7aef\u767b\u5165 SAMBA \u670d\u52a1\u5668\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u5728 project \u4e0a\u9762\u53f3\u952e\u5355\u51fb&#xff0c;\u9009\u62e9\u300e\u8054\u673a\u7f51\u7edc\u9a71\u52a8\u5668\u673a\u300f&#xff0c;\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u753b\u9762\u8ba9\u4f60\u53bb\u9009\u62e9\u6302\u8f7d\u78c1\u76d8\u9a71\u52a8\u5668\u7684\u53c2\u6570\u5594&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u5ba2\u6237\u7aef\u6302\u8f7d\u7f51\u7edc\u9a71\u52a8\u5668\u673a\u7684\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18l1wxwqralj1.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-4\u3001Windows 7 \u5ba2\u6237\u7aef\u6302\u8f7d\u7f51\u7edc\u9a71\u52a8\u5668\u673a\u7684\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f60\u53ef\u4ee5\u81ea\u5df1\u8c03\u6574\u60f3\u8981\u7684\u9a71\u52a8\u5668\u53f7&#xff0c;\u4f8b\u5982\u9884\u8bbe\u7684 Z \u69fd&#xff0c; \u90a3\u4e48\u4ee5\u540e\u4f60\u7684\u6863\u6848\u603b\u7ba1\u4e2d\u5c31\u4f1a\u751f\u51fa\u4e00\u4e2a Z \u69fd&#xff0c;\u8be5\u78c1\u76d8\u69fd\u5c31\u4ee3\u8868 \\\\\\\\192.168.100.254\\\\project \u90a3\u4e2a\u5206\u4eab\u7684\u76ee\u5f55\u5570&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8ba9 Windows \u7cfb\u7edf\u7684\u7f51\u82b3\u652f\u6301\u4e0d\u540c\u7f51\u57df\u7684 IP \u8054\u673a<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u7f51\u82b3\u7684\u8d44\u5b89\u95ee\u9898\u8d8a\u6765\u8d8a\u4e25\u91cd&#xff0c;\u56e0\u6b64 Windows XP \u4e4b\u540e\u7684\u7248\u672c\u90fd\u9884\u8bbe\u4ec5\u5f00\u653e\u672c\u673a IP \u7f51\u57df\u7684\u7f51\u82b3\u8054\u673a\u800c\u5df2\u3002 \u5982\u679c\u4f60\u7684 Windows \u60f3\u8981\u8ba9\u522b\u4eba\u53ef\u4ee5\u5728 Internet \u6216\u4e0d\u540c\u7684 IP \u7f51\u6bb5\u5bf9\u4f60\u8054\u673a\u65f6&#xff0c;\u4f60\u5c31\u5f97\u4fee\u6539\u4e00\u4e0b\u9632\u706b\u5899\u7684\u8bbe\u5b9a\u554a&#xff01; \u8bf7\u53eb\u51fa\u63a7\u5236\u53f0&#xff0c;\u7136\u540e\u70b9\u9009\u300eWindows \u9632\u706b\u5899\u300f\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u56fe\u793a\u4e86&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18kr3xdavtfuc.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-5\u3001Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56e0\u4e3a\u6211\u4eec\u5f97\u8981\u7ec6\u90e8\u8bbe\u5b9a\u9632\u706b\u5899&#xff0c;\u56e0\u6b64\u70b9\u9009\u4e0a\u56fe\u4e2d\u5de6\u4fa7\u7684\u300e\u8fdb\u9636\u8bbe\u5b9a\u300f\u6765\u53d6\u5f97\u5982\u4e0b\u56fe\u793a\u5427&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-1854lvsxogrc4.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-6\u3001Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd8\u8bb0\u5f97\u7f51\u7edc\u662f\u53cc\u5411\u7684\u5427&#xff1f;\u6240\u4ee5&#xff0c;\u6211\u4eec\u5f97\u5148\u8981\u9488\u5bf9\u8f93\u5165 (\u4ece\u5916\u90e8\u8fde\u5230\u672c\u673a) \u7684\u89c4\u5219\u6765\u5904\u7f6e\u3002\u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u6309\u4e0b (1)\u8f93\u5165\u89c4\u5219&#xff0c;\u7136\u540e\u70b9\u9009 (2)\u6863\u6848\u53ca\u6253\u5370\u673a\u5171\u4eab&#xff0c;\u4e4b\u540e\u5230 (3)\u9009\u62e9\u8be6\u7ec6\u7684\u89c4\u5219\u5185\u5bb9&#xff0c;\u4f1a\u51fa\u73b0\u53e6\u5916\u4e00\u4e2a\u7a97\u53e3&#xff0c;\u5728 (4)\u70b9\u9009\u300e\u9886\u57df\u300f\u7684\u90e8\u5206\u6765\u8bbe\u5b9a\u4e0d\u540c\u7f51\u6bb5&#xff0c; \u6700\u7ec8\u5728 (5)\u7684\u5730\u65b9\u300e\u65b0\u589e\u300f\u53ef\u8fdb\u5165\u672c\u673a\u7684\u8fdc\u7a0b IP \u7f51\u6bb5\u5594&#xff01;\u6309\u4e0b\u65b0\u589e\u4f1a\u51fa\u73b0\u5982\u4e0b\u56fe\u793a\u5594&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18he3dh5c14lx.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-7\u3001Windows 7 \u670d\u52a1\u5668\u9632\u706b\u5899\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u5728 (1)\u586b\u5199\u6b63\u786e\u7684 IP \u6216\u7f51\u6bb5&#xff0c;\u7136\u540e\u6309\u4e0b (2)\u786e\u5b9a\u540e&#xff0c;\u5c31\u80fd\u591f\u5728 (3)\u7684\u6846\u6846\u5f53\u4e2d\u51fa\u73b0\u53ef\u8054\u673a\u7684\u8fdc\u7a0b\u670d\u52a1\u5668\u5570&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u900f\u8fc7 port 445 \u7684\u7279\u6b8a\u767b\u5165\u65b9\u5f0f<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u77e5\u9053 Samba \u670d\u52a1\u5668\u6709\u542f\u7528 port 445 &#xff0c;\u5e76\u4e14\u4ed6\u5df2\u7ecf\u5206\u4eab\u4e86\u67d0\u4e2a\u76ee\u5f55\u65f6&#xff0c;\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u6211\u4eec\u7684 192.168.100.254 \u6709\u5206\u4eab\u51fa project \u8fd9\u4e2a\u5206\u4eab\u8d44\u6e90\u540d\u79f0\u65f6&#xff0c;\u90a3\u4e48\u8fd9\u4e2a\u76ee\u5f55\u7684\u5b8c\u6574\u5199\u6cd5\u4e3a&#xff1a;\u300e \\\\\\\\192.168.100.254\\\\project \u300f&#xff0c; \u6211\u4eec\u53ef\u4ee5\u900f\u8fc7\u300e\u5f00\u59cb\u300f\u51fa\u73b0\u7684\u90a3\u4e2a\u65b9\u6846\u6765\u5904\u7406\u8fd9\u4e2a\u73a9\u610f\u513f&#xff01;\u5982\u4e0b\u6240\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u900f\u8fc7 port 445 \u8054\u673a\" height=\"299\" src=\"2025-04-18iufgunsebda.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.3-8\u3001Windows 7 \u900f\u8fc7 port 445 \u8054\u673a<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u53ef\u4ee5\u767b\u5165\u7684\u8bdd\u5c31\u4f1a\u987a\u5229\u767b\u5165&#xff0c;\u5426\u5219\u5c31\u4f1a\u5f39\u51fa\u4e00\u4e2a\u8981\u4f60\u8f93\u5165\u8d26\u53f7\u5bc6\u7801\u7684\u7a97\u53e3&#xff0c;\u8f93\u5165\u6b63\u786e\u7684\u6570\u636e\u5373\u53ef&#xff01; \u547c\u547c&#xff01;\u771f\u8fc7\u763e&#xff5e;\u9664\u6b64\u4e4b\u5916&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u767b\u5165\u522b\u4eba Windows \u4e3b\u673a\u7684 C \u6216 D \u69fd\u5594&#xff01;\u5199\u6cd5\u5219\u53d8\u6210\u8fd9\u6837&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\\\\\\\\192.168.100.20\\\\c$<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6240\u4ee5\u8bf4&#xff0c;\u6015\u4e86\u5427&#xff01;\u4ffa\u8fd8\u771f\u5bb3\u6015&#xff5e;\u6240\u4ee5\u554a&#xff0c;Samba \u6ca1\u5fc5\u8981\u65f6&#xff0c;\u90a3\u4e2a port 445 \u5e94\u8be5\u662f\u53ef\u4ee5\u5173\u95ed\u7684\u5427&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-18gaxyjc0xqmw.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.3.2 Linux \u7cfb\u7edf\u7684\u4f7f\u7528<\/span><\/span><\/span> <\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smbclient&#xff1a;\u67e5\u8be2\u7f51\u82b3\u5206\u4eab\u7684\u8d44\u6e90&#xff0c;\u4ee5\u53ca\u4f7f\u7528\u7c7b\u4f3c FTP \u7684\u65b9\u5f0f\u4e0a\u4f20\/\u4e0b\u8f7d\u7f51\u82b3<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u54b1\u4eec\u7684 Samba \u6709\u63d0\u4f9b Linux \u7f51\u82b3\u7684\u5ba2\u6237\u7aef\u529f\u80fd\u5594&#xff01;\u4e5f\u5c31\u662f\u8bf4 Linux \u53ef\u4ee5\u6302\u8f7d Samba \u670d\u52a1\u5668\u4e5f\u80fd\u6302\u8f7d Windows \u63d0\u4f9b\u7684\u7f51\u82b3\u5566&#xff01;\u4e3b\u8981\u662f\u900f\u8fc7 smbclient \u6765\u89c2\u5bdf&#xff0c;\u518d\u4ee5 mount \u6765\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u54e9\u3002\u5148\u6765\u4ecb\u7ecd\u4e00\u4e0b smbclient \u8fd9\u4e2a\u6307\u4ee4\u5427&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 1. \u5173\u4e8e\u67e5\u8be2\u7684\u529f\u80fd&#xff0c;\u4f8b\u5982\u67e5\u51fa 192.168.100.254 \u7684\u7f51\u82b3\u6570\u636e<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/[IP|hostname] [-U username]<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbclient -L \/\/192.168.100.254 -U smb1<\/span><br \/>\nEnter smb1&#039;s password:<br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Sharename       Type      Comment<br \/>\n        &#8212;&#8212;&#8212;       &#8212;-      &#8212;&#8212;-<br \/>\n        project         Disk      smbuser&#039;s project<br \/>\n        print$          Disk      Printer drivers<br \/>\n        IPC$            IPC       IPC Service (This is vbird&#039;s samba server)<br \/>\n        HP_LaserJet_P2015_Series Printer   HP LaserJet P2015 Series<br \/>\n        <span style=\"color:#FFFF00\">smb1            Disk      Home Directories<\/span> <span style=\"color:#777777\">&lt;&#061;&#061;\u7b49\u4e00\u4e0b\u7528\u8fd9\u4e2a\u5f53\u8303\u4f8b<\/span><br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<\/p>\n<p>        Server               Comment<br \/>\n        &#8212;&#8212;&#8212;            &#8212;&#8212;-<br \/>\n        VBIRDSERVER          This is vbird&#039;s samba server<\/p>\n<p>        Workgroup            Master<br \/>\n        &#8212;&#8212;&#8212;            &#8212;&#8212;-<br \/>\n        VBIRDHOUSE           VBIRDSERVER<br \/>\n<span style=\"color:#ff6666\"># \u4ece\u8fd9\u91cc\u53ef\u4ee5\u77e5\u9053\u5728\u76ee\u524d\u7f51\u57df\u5f53\u4e2d\u6709\u591a\u5c11\u4e2a\u5de5\u4f5c\u7ec4\u4e0e\u4e3b\u8981\u7684\u540d\u79f0\u89e3\u6790\u4e3b\u673a<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9664\u4e86\u8fd9\u4e2a\u5148\u524d\u7528\u8fc7\u7684\u67e5\u8be2\u529f\u80fd\u4e4b\u5916&#xff0c;\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u7b80\u6613\u4f7f\u7528\u7f51\u82b3\u7684&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 2. \u5229\u7528\u7c7b\u4f3c FTP \u7684\u65b9\u5f0f\u767b\u5165\u8fdc\u7a0b\u4e3b\u673a<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbclient &#039;\/\/[IP|hostname]\/\u8d44\u6e90\u540d\u79f0&#039; [-U username]<\/span><br \/>\n<span style=\"color:#ff6666\"># \u610f\u601d\u662f\u4f7f\u7528\u67d0\u4e2a\u8d26\u53f7\u6765\u76f4\u63a5\u767b\u5165\u67d0\u90e8\u4e3b\u673a\u7684\u67d0\u4e2a\u5206\u4eab\u8d44\u6e90&#xff0c;\u4e3e\u4f8b\u5982\u4e0b&#xff1a;<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbclient &#039;\/\/192.168.100.254\/smb1&#039; -U smb1<\/span><br \/>\nEnter smb1&#039;s password:<br \/>\nDomain&#061;[VBIRDHOUSE] OS&#061;[Unix] Server&#061;[Samba 3.5.4-68.el6_0.2]<br \/>\nsmb: \\\\&gt; <span style=\"color:#FFFF00\">dir<\/span><br \/>\n<span style=\"color:#ff6666\"># \u5728 smb: \\\\&gt; \u5e95\u4e0b\u5176\u5b9e\u5c31\u662f\u5728 \/\/192.168.100.254\/dmtsai \u8fd9\u4e2a\u76ee\u5f55\u5e95\u4e0b\u5566&#xff01;\u6240\u4ee5&#xff0c;<br \/>\n# \u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 dir, get, put \u7b49\u5e38\u7528\u7684 ftp \u6307\u4ee4\u6765\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u4e86&#xff01;<br \/>\n?   :\u5217\u51fa\u6240\u6709\u53ef\u4ee5\u7528\u7684\u6307\u4ee4&#xff0c;\u5e38\u7528&#xff01;<br \/>\ncd  :\u53d8\u6362\u5230\u8fdc\u7a0b\u4e3b\u673a\u7684\u76ee\u5f55<br \/>\ndel :\u6740\u6389\u67d0\u4e2a\u6863\u6848<br \/>\nlcd :\u53d8\u6362\u672c\u673a\u7aef\u7684\u76ee\u5f55<br \/>\nls  :\u5bdf\u770b\u76ee\u524d\u6240\u5728\u76ee\u5f55\u7684\u6863\u6848<br \/>\ndir :\u4e0e ls \u76f8\u540c<br \/>\nget :\u4e0b\u8f7d\u5355\u4e00\u6863\u6848<br \/>\nmget:\u4e0b\u8f7d\u5927\u91cf\u6863\u6848<br \/>\nmput:\u4e0a\u4f20\u5927\u91cf\u6863\u6848<br \/>\nput :\u4e0a\u4f20\u5355\u4e00\u6863\u6848<br \/>\nrm  :\u5220\u9664\u6863\u6848<br \/>\nexit:\u79bb\u5f00 smbclient \u7684\u8f6f\u4ef6\u529f\u80fd<br \/>\n# \u5176\u4ed6\u7684\u6307\u4ee4\u7528\u6cd5\u8bf7\u53c2\u8003 man smbclient \u5594&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">mount.cifs&#xff1a;\u76f4\u63a5\u6302\u8f7d\u7f51\u82b3\u6210\u4e3a\u7f51\u7edc\u9a71\u52a8\u5668\u673a<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e8b\u5b9e\u4e0a&#xff0c;\u4f7f\u7528 smbclient \u4e00\u70b9\u4e5f\u4e0d\u65b9\u4fbf&#xff0c;\u56e0\u4e3a\u4f7f\u7528\u7684\u662f ftp \u7684\u529f\u80fd\u8bed\u6cd5&#xff0c;\u6709\u70b9\u602a\u602a\u7684&#xff5e;\u80fd\u4e0d\u80fd\u50cf Windows \u90a3\u6837&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u8054\u673a\u7f51\u7edc\u9a71\u52a8\u5668\u673a\u554a&#xff1f;\u8fd9\u5f53\u7136\u6ca1\u6709\u95ee\u9898&#xff01;\u4e0d\u8fc7\u5c31\u9700\u8981\u85c9\u7531 mount.cifs \u6765\u534f\u52a9\u4e86&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65e9\u671f\u7684 Samba \u4e3b\u8981\u662f\u63d0\u4f9b smbmount \u6216 mount.smbfs \u8fd9\u4e2a\u6307\u4ee4\u6765\u6302\u8f7d (smbfs \u662f SMB filesystem \u7684\u7f29\u5199)&#xff0c; \u4e0d\u8fc7\u8fd9\u4e2a\u6307\u4ee4\u5df2\u7ecf\u88ab\u53ef\u4ee5\u8fdb\u884c\u6bd4\u8f83\u597d\u7684\u7f16\u7801\u5224\u65ad\u7684 mount.cifs \u6240\u53d6\u4ee3\u5566&#xff01;mount.cifs \u53ef\u4ee5\u5c06\u8fdc\u7a0b\u670d\u52a1\u5668\u5206\u4eab\u51fa\u6765\u7684\u76ee\u5f55\u6574\u4e2a\u7ed9\u4ed6\u6302\u8f7d\u5230\u672c\u673a\u7684\u6302\u8f7d\u70b9&#xff0c;\u5982\u6b64\u4e00\u6765&#xff0c; \u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76ee\u5f55\u5c31\u597d\u50cf\u5728\u6211\u4eec\u672c\u673a\u7684\u4e00\u4e2a\u5206\u5272\u69fd\u4e00\u6837\u5594&#xff01;\u53ef\u4ee5\u76f4\u63a5\u6267\u884c\u590d\u5236\u3001\u7f16\u8f91\u7b49\u52a8\u4f5c&#xff01;\u8fd9\u53ef\u5c31\u597d\u7528\u7684\u591a\u4e86&#xff01; \u5e95\u4e0b\u6211\u4eec\u6765\u8c08\u4e00\u8c08\u600e\u4e48\u7528\u8fd9\u4e2a mount.cifs \u5427&#xff01;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">mount -t cifs \/\/IP\/\u5206\u4eab\u8d44\u6e90 \/\u6302\u8f7d\u70b9 [-o options]<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-o \u540e\u9762\u63a5\u7684\u53c2\u6570 (options) \u5e38\u7528\u7684\u6709\u5e95\u4e0b\u8fd9\u4e9b&#xff1a;<br \/>\n   username&#061;\u4f60\u7684\u767b\u5165\u8d26\u53f7&#xff1a;\u4f8b\u5982 username&#061;smb1<br \/>\n   password&#061;\u4f60\u7684\u767b\u5165\u5bc6\u7801&#xff1a;\u9700\u8981\u4e0e\u4e0a\u9762 username \u76f8\u5bf9\u5e94\u554a&#xff01;<br \/>\n   iocharset&#061;\u672c\u673a\u7684\u8bed\u7cfb\u7f16\u7801\u65b9\u5f0f&#xff0c;\u5982 big5 \u6216 utf8 \u7b49\u7b49&#xff1b;<br \/>\n   codepage&#061;\u8fdc\u7a0b\u4e3b\u673a\u7684\u8bed\u7cfb\u7f16\u7801\u65b9\u5f0f&#xff0c;\u4f8b\u5982\u7e41\u4f53\u4e2d\u6587\u4e3acp950<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u8303\u4f8b\u4e00&#xff1a;\u4ee5 smb1 \u7684\u8eab\u4efd\u5c06\u5176\u5bb6\u76ee\u5f55\u6302\u8f7d\u81f3 \/mnt\/samba \u4e2d<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">mkdir \/mnt\/samba<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">mount -t cifs \/\/192.168.100.254\/smb1 \/mnt\/samba \\\\<\/span><br \/>\n&gt; <span style=\"color:#FFFF00\">-o username&#061;smb1,password&#061;4321,codepage&#061;cp950<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">df<\/span><br \/>\n\u6587\u4ef6\u7cfb\u7edf               1K-\u533a\u6bb5      \u5df2\u7528     \u53ef\u7528 \u5df2\u7528% \u6302\u8f7d\u70b9<br \/>\n\/\/192.168.100.254\/smb1\/<br \/>\n                       7104632    143368   6606784   3% \/mnt\/samba<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7ecf\u7531 mount \u7684\u52a8\u4f5c&#xff0c;\u6211\u4eec\u5c31\u53ef\u4ee5\u8f7b\u6613\u7684\u5c06\u8fdc\u7a0b\u5206\u4eab\u51fa\u6765\u7684\u549a\u549a\u7ed9\u4ed6\u6302\u8f7d\u5230\u81ea\u5df1 Linux \u672c\u673a\u4e0a\u9762&#xff01;\u597d\u7528\u7684\u5f88&#xff5e;\u66f4\u8be6\u7ec6\u7684 mount \u7528\u6cd5&#xff0c;\u8bf7 man mount&#xff01;<\/span><\/span> \u00a0<\/p>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">nmblookup&#xff1a;\u67e5\u8be2 NetBIOS name \u4e0e IP \u53ca\u5176\u4ed6\u76f8\u5173\u4fe1\u606f&#xff1a;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u6211\u4eec\u53ef\u4ee5\u900f\u8fc7\u4e00\u4e9b NetBIOS \u76f8\u5173\u7684\u529f\u80fd\u6765\u53d6\u5f97 NetBIOS name &#xff0c;\u4e0d\u8fc7&#xff0c;\u5982\u679c\u4f60\u8fd8\u60f3\u8981\u77e5\u9053\u8fd9\u4e2a NetBIOS name \u7684\u5176\u4ed6\u4fe1\u606f\u65f6&#xff0c; \u4f8b\u5982 IP\u3001\u5206\u4eab\u7684\u8d44\u6e90\u7b49\u7b49&#xff0c;\u90a3\u53ef\u4ee5\u4f7f\u7528 nmblookup \u8fd9\u4e2a\u6307\u4ee4\u6765\u641e\u5b9a\u5373\u53ef\u3002\u4ed6\u662f\u8fd9\u4e48\u4f7f\u7528\u7684&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">nmblookup [-S] [-U wins IP] [-A IP] name<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-S &#xff1a;\u9664\u4e86\u67e5\u8be2 name \u7684 IP \u4e4b\u5916&#xff0c;\u4ea6\u4f1a\u627e\u51fa\u8be5\u4e3b\u673a\u7684\u5206\u4eab\u8d44\u6e90\u4e0e MAC \u7b49&#xff1b;<br \/>\n-U &#xff1a;\u540e\u9762\u4e00\u822c\u53ef\u63a5 Windows \u7684\u4e3b\u8981\u540d\u79f0\u7ba1\u7406\u670d\u52a1\u5668\u7684 IP &#xff0c;\u53ef\u4e0e -R \u4e92\u7528&#xff1b;<br \/>\n-R &#xff1a;\u4e0e -U \u4e92\u7528&#xff0c;\u4ee5 Wins \u670d\u52a1\u5668\u6765\u67e5\u8be2\u67d0\u4e2a Netbios name&#xff1b;<br \/>\n-A &#xff1a;\u76f8\u5bf9\u4e8e\u5176\u4ed6\u7684\u53c2\u6570&#xff0c; -A \u540e\u9762\u53ef\u63a5 IP &#xff0c;\u85c9 IP \u6765\u627e\u51fa\u76f8\u5bf9\u7684 NetBIOS \u6570\u636e&#xff1b;<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u8303\u4f8b\u4e00&#xff1a;\u85c9\u7531 192.168.100.254 \u627e\u51fa vbirdserver \u8fd9\u90e8\u4e3b\u673a\u7684 IP \u5730\u5740<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">nmblookup -U 192.168.100.254 vbirdserver<\/span><br \/>\nquerying vbirdserver on 192.168.100.254<br \/>\n192.168.100.254 vbirdserver&lt;00&gt;<br \/>\n192.168.1.100 vbirdserver&lt;00&gt;    <span style=\"color:#777777\">&lt;&#061;&#061;\u4e4b\u524d\u9e1f\u54e5\u5c31\u8bf4\u6709\u4e24\u4e2a IP \u561b&#xff01;\u4ffa\u7684\u4e3b\u673a&#xff01;<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u8303\u4f8b\u4e8c&#xff1a;\u627e\u51fa vbirdserver \u7684 MAC \u4e0e IP \u7b49\u4fe1\u606f&#xff1a;<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">nmblookup -S vbirdserver<\/span><br \/>\nquerying vbirdserver on 192.168.100.255  <span style=\"color:#777777\">&lt;&#061;&#061;\u5728\u533a\u7f51\u5185\u5e7f\u64ad\u5f00\u59cb\u627e&#xff01;<\/span><br \/>\n192.168.100.254 vbirdserver&lt;00&gt;          <span style=\"color:#777777\">&lt;&#061;&#061;\u627e\u5230 IP \u5570&#xff01;<\/span><br \/>\nLooking up status of 192.168.100.254<br \/>\n        VBIRDSERVER     &lt;00&gt; &#8211;         B &lt;ACTIVE&gt;<br \/>\n        ..__MSBROWSE__. &lt;01&gt; &#8211; &lt;GROUP&gt; B &lt;ACTIVE&gt;<br \/>\n        VBIRDHOUSE      &lt;00&gt; &#8211; &lt;GROUP&gt; B &lt;ACTIVE&gt;<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smbtree&#xff1a;\u7f51\u7edc\u4e0a\u7684\u82b3\u90bb\u6d4f\u89c8\u5668\u663e\u793a\u6a21\u5f0f&#xff01;<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u60f3\u8981\u4f7f\u7528\u7c7b\u4f3c Windows \u4e0a\u9762&#xff0c;\u53ef\u4ee5\u4e00\u770b\u5c31\u660e\u4e86\u5404\u4e2a\u7f51\u82b3\u6240\u5206\u4eab\u7684\u8d44\u6e90\u65f6&#xff0c;\u4f60\u80fd\u4f7f\u7528 smbtree \u6765\u76f4\u63a5\u67e5\u8be2\u5594&#xff01; \u8fd9\u4e2a\u6307\u4ee4\u66f4\u7b80\u5355&#xff01;\u76f4\u63a5\u8f93\u5165\u5c31\u80fd\u7528&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbtree [-bDS]<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-b &#xff1a;\u4ee5\u5e7f\u64ad\u7684\u65b9\u5f0f\u53d6\u4ee3\u4e3b\u8981\u6d4f\u89c8\u5668\u7684\u67e5\u8be2<br \/>\n-D &#xff1a;\u4ec5\u5217\u51fa\u5de5\u4f5c\u7ec4&#xff0c;\u4e0d\u5305\u62ec\u5206\u4eab\u7684\u8d44\u6e90<br \/>\n-S &#xff1a;\u5217\u51fa\u5de5\u4f5c\u7ec4\u4e0e\u8be5\u5de5\u4f5c\u7ec4\u4e0b\u7684\u8ba1\u7b97\u673a\u540d\u79f0 (NetBIOS) \u4e0d\u5305\u62ec\u5404\u9879\u8d44\u6e90\u76ee\u5f55<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u8303\u4f8b\u4e00&#xff1a;\u5217\u51fa\u76ee\u524d\u7684\u7f51\u82b3\u6811\u72b6\u76f8\u5173\u56fe<\/span><br \/>\n[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbtree<\/span><br \/>\nEnter root&#039;s password:  <span style=\"color:#777777\">&lt;&#061;&#061;\u76f4\u63a5\u6309 [Enter] \u5373\u53ef&#xff01;<\/span><br \/>\nWORKGROUP<br \/>\n        \\\\\\\\WIN7-PC<br \/>\nVBIRDHOUSE<br \/>\n        \\\\\\\\WINXP<br \/>\ncli_start_connection: failed to connect to WINXP&lt;20&gt; (0.0.0.0).<br \/>\n        \\\\\\\\VBIRDSERVER                   This is vbird&#039;s samba server<br \/>\n             \\\\\\\\VBIRDSERVER\\\\HP_LaserJet_P2015_Series  HP LaserJet P2015 Series<br \/>\n             \\\\\\\\VBIRDSERVER\\\\IPC$     IPC Service (This is vbird&#039;s samba server)<br \/>\n             \\\\\\\\VBIRDSERVER\\\\print$   Printer drivers<br \/>\n             \\\\\\\\VBIRDSERVER\\\\project  smbuser&#039;s project<\/p>\n<p>[root&#064;clientlinux ~]# <span style=\"color:#FFFF00\">smbtree -S<\/span><br \/>\nEnter root&#039;s password:<br \/>\nWORKGROUP<br \/>\n        \\\\\\\\WIN7-PC<br \/>\nVBIRDHOUSE<br \/>\n        \\\\\\\\WINXP<br \/>\n        \\\\\\\\VBIRDSERVER                   This is vbird&#039;s samba server<br \/>\n<span style=\"color:#ff6666\"># \u6b64\u65f6\u4ec5\u6709\u5de5\u4f5c\u7ec4\u4e0e\u8ba1\u7b97\u673a\u540d\u79f0\u800c\u5df2\u5462&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>  <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smbstatus&#xff1a;\u89c2\u5bdf SAMBA \u7684\u72b6\u6001<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5176\u5b9e\u8fd9\u4e2a\u6307\u4ee4\u7b97\u662f\u670d\u52a1\u5668\u7684\u76f8\u5173\u529f\u80fd\u5566&#xff01;\u56e0\u4e3a\u5b83\u4e3b\u8981\u7684\u76ee\u7684\u662f\u67e5\u9605\u76ee\u524d SAMBA \u6709\u591a\u5c11\u4eba\u6765\u8054\u673a&#xff0c; \u4e14\u54ea\u4e9b\u8d44\u6e90\u5171\u4eab\u5df2\u7ecf\u88ab\u4f7f\u7528\u7b49\u7b49\u7684\u4fe1\u606f\u3002\u6240\u4ee5\u5982\u679c\u4f60\u60f3\u8981\u4f7f\u7528\u8fd9\u4e2a\u8f6f\u4ef6&#xff0c;\u8bf7\u5148\u5b89\u88c5 samba \u5594&#xff01;\u7b80\u5355\u7528\u6cd5\u5982\u4e0b&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">smbstatus [-pS] [-u username]<\/span><br \/>\n<span style=\"color:#ff6666\">\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<br \/>\n-p &#xff1a;\u5217\u51fa\u5df2\u7ecf\u4f7f\u7528 SAMBA \u8054\u673a\u7684\u7a0b\u5e8f PID &#xff1b;<br \/>\n-S &#xff1a;\u5217\u51fa\u5df2\u7ecf\u88ab\u4f7f\u7528\u7684\u8d44\u6e90\u5171\u4eab\u72b6\u6001&#xff1b;<br \/>\n-u &#xff1a;\u53ea\u5217\u51fa\u67d0\u4e2a\u7528\u6237\u76f8\u5173\u7684\u5206\u4eab\u6570\u636e<\/span><\/p>\n<p><span style=\"color:#bbbbbb\"># \u8303\u4f8b\u4e00&#xff1a;\u5217\u51fa\u76ee\u524d\u4e3b\u673a\u5b8c\u6574\u7684 Samba \u72b6\u6001<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbstatus<\/span><br \/>\nSamba version 3.5.4-68.el6_0.2<br \/>\nPID     Username      Group         Machine<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n5993      smb1          smb1          __ffff_192.168.100.10 (::ffff:192.168.100.10)<br \/>\n5930      smb1          smb1          win7-pc      (::ffff:192.168.100.30)<br \/>\n<span style=\"color:#ff6666\"># \u4e0a\u534a\u90e8\u4e3b\u8981\u5728\u5217\u51fa\u76ee\u524d\u8054\u673a\u7684\u72b6\u6001\u4e2d&#xff0c;\u4e3b\u8981\u6765\u81ea\u90a3\u4e2a\u5ba2\u6237\u7aef\u673a\u5668\u4e0e\u767b\u5165\u7684\u7528\u6237\u540d<\/span><\/p>\n<p>Service      pid     machine       Connected at<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nIPC$         5930   win7-pc       Fri Jul 29 15:56:03 2011<br \/>\nproject      5930   win7-pc       Fri Jul 29 15:59:25 2011<br \/>\nsmb1         5993   __ffff_192.168.100.10  Fri Jul 29 16:32:45 2011<br \/>\n<span style=\"color:#ff6666\"># \u8fd9\u90e8\u5206\u5219\u663e\u793a\u51fa&#xff0c;\u76ee\u524d\u6709\u51e0\u4e2a\u76ee\u5f55\u88ab\u4f7f\u7528\u4e86&#xff1f;\u90a3\u4e2a smb1 \u4ee3\u8868 \/\/IP\/smb1\/ \u5594&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f60\u53ef\u4ee5\u900f\u8fc7\u8fd9\u4e2a\u5c0f\u7a0b\u5e8f\u6765\u4e86\u89e3\u5230\u76ee\u524d\u6709\u591a\u5c11\u4eba\u4f7f\u7528\u4f60\u7684 SAMBA \u7684\u5566&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.4 \u4ee5 PDC \u670d\u52a1\u5668\u63d0\u4f9b\u8d26\u53f7\u7ba1\u7406<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eec\u5728 16.1.5 \u7ea6\u7565\u8c08\u8fc7 PDC \u8fd9\u4e2a\u73a9\u610f\u513f&#xff0c;\u4ed6\u53ef\u4ee5\u8ba9\u7528\u6237\u5728\u8ba1\u7b97\u673a\u6559\u5ba4\u7684\u4efb\u4f55\u4e00\u4e2a\u5730\u65b9&#xff0c;\u90fd\u7528\u540c\u4e00\u7ec4\u8d26\u53f7\u5bc6\u7801\u767b\u5165&#xff0c; \u5e76\u53ef\u53d6\u5f97\u76f8\u540c\u7684\u5bb6\u76ee\u5f55\u7b49\u6570\u636e&#xff0c;\u8fd9\u4e0e\u6211\u4eec\u4e4b\u524d\u8c08\u5230\u7684&#xff0c;\u5728 Linux \u5e95\u4e0b\u4f7f\u7528 NIS \u642d\u914d NFS \u662f\u5f88\u7c7b\u4f3c\u7684\u4f5c\u6cd5&#xff01; \u53ea\u662f\u5b83\u662f\u7528\u5728 Windows \u4e0a\u5934\u5c31\u662f\u4e86\u3002\u90a3\u5982\u4f55\u5b8c\u6210\u5462&#xff1f;\u6211\u4eec\u5e95\u4e0b\u5c31\u6765\u8c08\u8c08\u8fd9\u4e2a\u73a9\u610f\u513f&#xff01;^_^<\/span><\/span> \u00a0<\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.4.1 \u8ba9 Samba \u7ba1\u7406\u7f51\u57df\u4f7f\u7528\u8005\u7684\u4e00\u4e2a\u5b9e\u4f5c\u6848\u4f8b<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u524d\u9762\u4ecb\u7ecd\u7684\u5185\u5bb9\u90fd\u662f\u5c5e\u4e8e Peer\/Peer \u7684\u8054\u673a\u72b6\u51b5&#xff0c;\u4e5f\u5c31\u662f Samba \u670d\u52a1\u5668\u4e0e Windows \u5ba2\u6237\u7aef\u5176\u5b9e\u662f\u5e73\u7b49\u5730\u4f4d\u7684\u5566&#xff01; \u6240\u4ee5 Windows \u5ba2\u6237\u7aef\u9700\u8981\u77e5\u9053 Samba \u670d\u52a1\u5668\u5185\u7684\u8d26\u53f7\u5bc6\u7801\u6570\u636e\u540e&#xff0c;\u624d\u80fd\u591f\u987a\u5229\u7684\u4f7f\u7528 Samba \u7684\u8d44\u6e90\u3002 \u4e0d\u8fc7&#xff0c;\u8fd9\u6837\u7684\u65b9\u5f0f\u5728\u8f83\u5927\u578b\u4e00\u4e9b\u7684\u5c40\u57df\u7f51\u7edc\u73af\u5883\u53ef\u80fd\u5c31\u4f1a\u6709\u70b9\u56f0\u6270&#xff0c;\u4f8b\u5982\u5b66\u6821\u7684\u73af\u5883\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3e\u4f8b\u6765\u8bf4&#xff0c;\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u8ba1\u7b97\u673a\u6559\u5ba4\u91cc\u9762\u6709 50 \u90e8 Windows XP Pro. \u7684\u4e2a\u4eba\u8ba1\u7b97\u673a&#xff0c;\u7531\u4e8e\u8ba1\u7b97\u673a\u6559\u5ba4\u5927\u5bb6\u90fd\u4f1a\u4f7f\u7528&#xff0c; \u56e0\u6b64\u91cc\u9762\u8fd9 50 \u90e8\u4e2a\u4eba\u8ba1\u7b97\u673a\u6709\u4f7f\u7528\u8fd8\u539f\u7cbe\u7075&#xff0c;\u4e5f\u5c31\u662f\u6bcf\u6b21\u8ba1\u7b97\u673a\u91cd\u65b0\u542f\u52a8\u540e\u6574\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u5c31\u4f1a\u8fd8\u539f\u6210\u539f\u672c\u7684\u6837\u5b50\u3002 \u4f46\u6211\u4eec\u77e5\u9053\u4f7f\u7528\u8005\u603b\u662f\u9700\u8981\u6709\u4e2a\u4eba\u5bb6\u76ee\u5f55\u5427&#xff1f;\u4ed6\u4eec\u603b\u4e0d\u5e0c\u671b\u8fd9\u6b21\u7684\u5de5\u4f5c\u5728\u91cd\u65b0\u542f\u52a8\u540e\u5c31\u5931\u53bb\u4e86&#xff5e; \u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u5229\u7528\u4e00\u90e8\u4e3b\u673a\u6765\u8ba9\u4ed6\u4eec\u50a8\u5b58\u6570\u636e\u554a&#xff01;\u90a3\u5c31\u662f Primary Domain Controller (PDC) \u670d\u52a1\u5668\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5176\u5b9e Samba PDC \u7684\u4f5c\u7528\u5f88\u7b80\u5355&#xff0c;\u5c31\u662f\u8ba9 Samba PDC \u6210\u4e3a\u6574\u4e2a\u5c40\u57df\u7f51\u7edc\u7684\u9886\u57df\u7ba1\u7406\u5458 (domain controller)&#xff0c; \u7136\u540e\u8ba9 Windows \u4e3b\u673a\u52a0\u5165\u8fd9\u4e2a\u9886\u57df&#xff0c;\u672a\u6765\u4f7f\u7528\u8005\u5229\u7528 Windows \u767b\u5165\u65f6&#xff0c;(1)Windows \u4f1a\u524d\u5f80 PDC \u670d\u52a1\u5668\u53d6\u5f97\u7528\u6237\u7684\u8d26\u53f7\u5bc6\u7801&#xff0c; \u540c\u65f6 (2)PDC \u8fd8\u4f1a\u4f20\u9001\u7528\u6237\u7684\u91cd\u8981\u6570\u636e\u5230\u90a3\u90e8 Windows \u4e2a\u4eba\u8ba1\u7b97\u673a\u4e0a&#xff0c;\u800c Windows \u8ba1\u7b97\u673a\u4e0a\u7684\u7528\u6237\u6ce8\u9500\u65f6&#xff0c; (3)\u8be5\u7528\u6237\u4fee\u6539\u8fc7\u7684\u6570\u636e\u4e5f\u4f1a\u56de\u4f20\u7ed9 PDC \u3002\u5982\u6b64\u4e00\u6765\u4e0d\u7ba1\u8fd9\u4e2a\u4f7f\u7528\u8005\u5728\u54ea\u4e00\u90e8\u4e2a\u4eba\u8ba1\u7b97\u673a\u4e0a\u9762\u767b\u5165&#xff0c; \u4ed6\u90fd\u80fd\u591f\u53d6\u5f97\u6b63\u786e\u7684\u4e2a\u4eba\u8d44\u6599&#xff01;\u5f88\u68d2\u7684\u4f5c\u7528\u5427&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">PDC \u662f\u4e2a\u5f88\u590d\u6742\u7684\u73af\u5883&#xff0c;\u4ed6\u53ef\u4ee5\u8fbe\u5230\u7684\u529f\u80fd\u76f8\u5f53\u7684\u591a&#xff0c;\u800c\u4e14\u5bc6\u7801\u7684\u9a8c\u8bc1\u4e5f\u4e0d\u5fc5\u5728\u540c\u4e00\u90e8 PDC \u4e3b\u673a\u4e0a\u9762&#xff0c; \u4e0d\u8fc7\u8fd9\u91cc\u6211\u4eec\u4e0d\u8c08\u90a3\u4e48\u590d\u6742\u7684\u4e1c\u897f&#xff0c;\u53ea\u662f\u505a\u4e00\u4e2a\u7b80\u5355\u7684\u7ec3\u4e60&#xff0c;\u56e0\u6b64\u5e95\u4e0b\u7684\u8fd9\u90e8 PDC \u4f7f\u7528 Linux \u81ea\u5df1\u7684\u5bc6\u7801\u6765\u8fdb\u884c\u9a8c\u8bc1&#xff0c; \u5e76\u4e14\u4e5f\u53ea\u7ba1\u7406\u81ea\u5df1\u6240\u5206\u4eab\u51fa\u53bb\u7684\u8d44\u6e90\u5570&#xff01;\u81f3\u4e8e\u5047\u8bbe\u7f51\u7edc\u73af\u5883\u4e0e\u76f8\u5173\u5de5\u4f5c\u7ec4\u53c2\u6570\u5982\u4e0b&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u4e00\u4e2a\u7b80\u6613\u7684 PDC \u5b9e\u4f5c\u6848\u4f8b\u76f8\u5173\u53c2\u6570\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18foncgkswhh5.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-1\u3001\u4e00\u4e2a\u7b80\u6613\u7684 PDC \u5b9e\u4f5c\u6848\u4f8b\u76f8\u5173\u53c2\u6570\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6574\u4e2a\u57fa\u672c\u7684\u8bbe\u5b9a\u6d41\u7a0b\u5e94\u8be5\u662f\u8fd9\u6837\u7684&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u533a\u7f51\u8ba1\u7b97\u673a\u73af\u5883\u8bbe\u5b9a&#xff1a;\u6574\u4f53\u7f51\u57df\u8bbe\u5b9a\u597d&#xff0c;\u5c24\u5176 Windows \u7684\u5de5\u4f5c\u7ec4\u4e0e\u8ba1\u7b97\u673a\u540d\u79f0\u53ca IP \u7b49\u53c2\u6570&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">PDC \u8bbe\u5b9a&#xff1a;\u56e0\u4e3a PDC \u7ba1\u7406\u81ea\u5df1\u7684\u5bc6\u7801&#xff0c;\u6240\u4ee5 security &#061; user&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">PDC \u6700\u597d\u62e5\u6709\u6574\u4e2a\u7f51\u57df\u7684\u540d\u79f0\u89e3\u6790\u6743\u529b&#xff0c;\u4ea6\u5373\u6210\u4e3a\u4e3b\u8981\u7684\u540d\u79f0\u89e3\u6790\u5668&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9700\u6709 netlogon \u8d44\u6e90\u5171\u4eab&#xff0c;\u63d0\u4f9b windows 2000\/XP pro. \u5ba2\u6237\u7aef\u7684\u767b\u5165\u4e4b\u7528&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e Windows \u9700\u8bfb\u5165\u4e2a\u4eba\u914d\u7f6e\u6587\u4ef6&#xff0c;\u9ed8\u8ba4\u76ee\u5f55\u4e3a profile&#xff0c;Linux \u7cfb\u7edf\u9700\u9884\u5148\u8bbe\u5b9a\u6b64\u76ee\u5f55&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u589e\u52a0 PDC \u4e0a\u7684\u4f7f\u7528\u8005\u8d26\u53f7\u4ee5\u53ca\u673a\u5668\u4ee3\u7801 (machine account) \u7b49\u7b49<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 Windows 2000\/XP pro. \u4e2a\u4eba\u8ba1\u7b97\u673a\u4e0a\u8bbe\u5b9a\u6210\u4e3a PDC \u7684\u5ba2\u6237\u7aef\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5e95\u4e0b\u54b1\u4eec\u5c31\u6765\u4f9d\u5e8f\u5904\u7406\u5904\u7406\u5148&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-18rgxsjr0yb3p.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.4.2 PDC \u670d\u52a1\u5668\u7684\u5efa\u7f6e<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">PDC \u670d\u52a1\u5668\u7684\u5efa\u7acb\u975e\u5e38\u7684\u9ebb\u70e6&#xff0c;\u9700\u8981\u4e00\u6b65\u4e00\u6b65\u7684\u5b9e\u4f5c\u8fdb\u884c&#xff0c;\u633a\u8ba8\u538c\u7684\u3002\u800c\u4e14&#xff0c;\u7531\u4e8e\u5efa\u7f6e PDC \u7684\u73af\u5883\u4e3b\u8981\u5728\u7ba1\u7406\u6574\u4e2a\u533a\u7f51\u5185\u7684 Windows \u8ba1\u7b97\u673a&#xff0c;\u56e0\u6b64\u6bcf\u90e8 Windows \u8ba1\u7b97\u673a\u7684\u4e3b\u673a\u540d\u4e0e\u76f8\u5173\u53c2\u6570\u8981\u5148\u786e\u5b9a\u4e0b\u6765&#xff0c;\u5982\u540c\u4e0a\u4e00\u5c0f\u8282\u7684\u56fe\u793a\u5185&#xff0c; \u6bcf\u90e8\u8ba1\u7b97\u673a\u7684\u89d2\u8272\u5b9a\u4f4d\u90fd\u9700\u8981\u6e05\u695a\u624d\u884c\u3002\u6e05\u695a\u4e86\u5404\u4e2a\u8ba1\u7b97\u673a\u7684\u89d2\u8272\u540e&#xff0c;\u63a5\u4e0b\u6765\u5c31\u80fd\u591f\u6162\u6162\u7684\u5b9e\u4f5c\u8fdb\u884c\u5570&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">1. \u5efa\u7f6e NetBIOS \u4e0e IP \u5bf9\u5e94\u7684\u6570\u636e&#xff1a;\u8bbe\u5b9a lmhosts \u4e0e \/etc\/hosts<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u6211\u4eec\u7684 Samba \u5373\u5c06\u6210\u4e3a\u6574\u4e2a\u7f51\u57df\u7684\u540d\u79f0\u89e3\u6790\u8005&#xff0c;\u56e0\u6b64\u4f60\u6700\u597d\u5c06\u6574\u4e2a\u7f51\u57df\u7684 NetBIOS name \u4e0e IP \u7684\u5bf9\u5e94\u5199\u5165 lmhosts \u6863\u6848\u5f53\u4e2d\u3002\u5982\u679c\u4f60\u7684\u533a\u7f51\u662f\u4ee5 DHCP \u53d1\u653e IP \u7684&#xff0c;\u90a3\u4e48\u4f60\u6700\u597d\u642d\u914d DNS \u7cfb\u7edf\u53bb\u5efa\u7f6e\u4f60\u7684\u4e3b\u673a\u540d\u5bf9\u5e94\u4fe1\u606f&#xff0c; \u5426\u5219\u4e3b\u673a\u540d\u5bf9\u5e94\u4e0d\u8d77\u6765&#xff0c;\u603b\u662f\u6709\u70b9\u56f0\u6270\u3002\u5728\u8fd9\u4e2a\u6848\u4f8b\u4e2d&#xff0c;\u7531\u4e8e\u9e1f\u54e5\u4f7f\u7528\u7684 NetBIOS name (\u5982 vbirdserver) \u4e0e\u4e3b\u673a\u540d (\u5982 www.centos.vbird) \u5e76\u4e0d\u76f8\u540c&#xff0c;\u56e0\u6b64\u8fd9\u91cc\u5efa\u8bae\u9700\u8981\u4fee\u6539 lmhosts \u624d\u597d\u3002<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/lmhosts<\/span><br \/>\n127.0.0.1       localhost      <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u884c\u662f\u9884\u8bbe\u5b58\u5728\u7684&#xff0c;\u4e0d\u8981\u52a8\u4ed6&#xff0c;\u5e95\u4e0b\u7684\u8bf7\u81ea\u884c\u65b0\u589e<\/span><br \/>\n<span style=\"color:#FFFF00\">192.168.100.254  vbirdserver<br \/>\n192.168.100.10   vbirdlinux<br \/>\n192.168.100.20   vbirdwinxp<br \/>\n192.168.100.30   vbirdwin7<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/hosts<\/span><br \/>\n192.168.100.254 www.centos.vbird        <span style=\"color:#FFFF00\">vbirdserver<\/span><br \/>\n192.168.100.10  clientlinux.centos.vbird     <span style=\"color:#FFFF00\">vbirdlinux<\/span><br \/>\n<span style=\"color:#FFFF00\">192.168.100.20  vbirdwinxp<br \/>\n192.168.100.30  vbirdwin7<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e Linux \u4e0a\u7684 Samba \u5f88\u591a\u6570\u636e\u8fd8\u662f\u4e0e TCP\/IP \u7684\u4e3b\u673a\u540d\u6709\u5173&#xff0c;\u6240\u4ee5\u9664\u4e86 lmhosts \u4e4b\u5916&#xff0c;\u5efa\u8bae\u8fd8\u662f\u5904\u7406\u4e00\u4e0b \/etc\/hosts \u6bd4\u8f83\u59a5\u5f53&#xff01;\u8fd9\u6837\u5c31\u884c\u5566&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">2. \u5efa\u7f6e PDC \u4e3b\u8bbe\u5b9a&#xff1a;\u5904\u7406 smb.conf<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5047\u8bbe\u6211\u4eec\u8981\u8ba9 PDC \u5ba2\u6237\u7aef\u767b\u5165\u65f6\u53ef\u4ee5\u53d6\u5f97\u4ed6\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55&#xff0c;\u90a3\u4e48\u9700\u8981\u8fd9\u6837\u5904\u7406&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n        <span style=\"color:#FFFF00\">workgroup       &#061; vbirdhouse   <span style=\"color:#777777\">&lt;&#061;&#061;\u8bf7\u52a1\u5fc5\u786e\u8ba4\u4e00\u4e0b\u5de5\u4f5c\u7ec4\u4e0e\u4e3b\u673a\u540d<\/span><br \/>\n        netbios name    &#061; vbirdserver<\/span><br \/>\n        server string   &#061; This is vbird&#039;s samba server<br \/>\n        unix charset    &#061; utf8<br \/>\n        display charset &#061; utf8<br \/>\n        dos charset     &#061; cp950<br \/>\n        log file        &#061; \/var\/log\/samba\/log.%m<br \/>\n        max log size    &#061; 50<br \/>\n        security        &#061; user<br \/>\n        passdb backend  &#061; tdbsam<br \/>\n        load printers   &#061; yes<br \/>\n        cups options    &#061; raw<br \/>\n        printcap name   &#061; cups<br \/>\n        printing        &#061; cups<\/p>\n<p>        <span style=\"color:#ff6666\"># \u4e0e PDC \u6709\u5173\u7684\u4e00\u4e9b\u8bbe\u5b9a\u503c&#xff1a;<br \/>\n        # \u5e95\u4e0b\u51e0\u4e2a\u8bbe\u5b9a\u503c\u5904\u7406\u6210\u4e3a\u672c\u5c40\u57df\u7f51\u7edc\u5185\u7684\u4e3b\u8981\u540d\u79f0\u89e3\u6790\u5668<\/span><br \/>\n        <span style=\"color:#FFFF00\">preferred master &#061; yes<br \/>\n        domain master    &#061; yes<br \/>\n        local master     &#061; yes<br \/>\n        wins support     &#061; yes<br \/>\n        <span style=\"color:#ff6666\"># \u64cd\u4f5c\u7cfb\u7edf (OS) \u7b49\u7ea7\u8d8a\u9ad8\u624d\u80fd\u6210\u4e3a\u4e3b\u7f51\u57df\u7684\u63a7\u5236\u8005&#xff0c;\u4e00\u822c NT \u4e3a 32,<br \/>\n        # Windows 2000 \u4e3a 64 &#xff0c;\u6240\u4ee5\u8fd9\u91cc\u6211\u4eec\u8bbe\u5b9a\u9ad8\u4e00\u70b9&#xff0c;\u4f46\u4e0d\u53ef\u8d85\u8fc7 255<\/span><br \/>\n        os level      &#061; 100<br \/>\n        <span style=\"color:#ff6666\"># \u5e95\u4e0b\u5219\u662f\u8bbe\u5b9a\u80fd\u5426\u5229\u7528 PDC \u767b\u5165&#xff0c;\u4e14\u767b\u5165\u9700\u8981\u8fdb\u884c\u54ea\u4e9b\u52a8\u4f5c&#xff1a;<\/span><br \/>\n        domain logons &#061; yes<br \/>\n        logon drive   &#061; K:              <span style=\"color:#777777\">&lt;&#061;&#061;\u767b\u5165\u540e\u5bb6\u76ee\u5f55\u6302\u8f7d\u6210 Windows \u54ea\u4e00\u69fd<\/span><br \/>\n        logon script  &#061; startup.bat     <span style=\"color:#777777\">&lt;&#061;&#061;\u6bcf\u4e2a\u4f7f\u7528\u8005\u767b\u5165\u540e\u4f1a\u81ea\u52a8\u6267\u884c\u7684\u7a0b\u5e8f<\/span><br \/>\n        time server   &#061; yes             <span style=\"color:#777777\">&lt;&#061;&#061;\u81ea\u52a8\u8c03\u6574 Windows \u65f6\u95f4\u4e0e Samba \u540c\u6b65<\/span><br \/>\n        admin users   &#061; root            <span style=\"color:#777777\">&lt;&#061;&#061;\u9884\u8bbe\u7684\u7ba1\u7406\u5458\u8d26\u53f7&#xff01;\u9884\u8bbe\u4e3a root <\/span><br \/>\n        logon path    &#061; \\\\\\\\%N\\\\%U\\\\profile <span style=\"color:#777777\">&lt;&#061;&#061;\u4f7f\u7528\u8005\u7684\u4e2a\u4eba\u5316\u8bbe\u5b9a<\/span><br \/>\n        logon home    &#061; \\\\\\\\%N\\\\%U         <span style=\"color:#777777\">&lt;&#061;&#061;\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u4f4d\u7f6e&#xff01;<\/span><\/p>\n<p><span style=\"color:#ff6666\"># \u8fd9\u4e2a\u5728\u6307\u5b9a\u767b\u5165\u8005\u80fd\u591f\u8fdb\u884c\u7684\u5de5\u4f5c&#xff0c;\u91cc\u9762\u4e3b\u8981\u662f\u5177\u6709\u8bb8\u591a\u6267\u884c\u7a0b\u5e8f&#xff1a;<\/span><br \/>\n[netlogon]  <span style=\"color:#777777\">&lt;&#061;&#061;\u4e0e\u524d\u9762\u7684 logon script \u6709\u5173&#xff0c;\u8be5\u7a0b\u5e8f\u653e\u7f6e\u5728\u8fd9\u91cc<\/span><br \/>\n   comment         &#061; Network Logon Service<br \/>\n   path            &#061; \/winhome\/netlogon  <span style=\"color:#777777\">&lt;&#061;&#061;\u91cd\u8981\u7684\u76ee\u5f55&#xff0c;\u8981\u81ea\u5df1\u5efa\u7acb\u624d\u884c&#xff01;<\/span><br \/>\n   writable        &#061; no<br \/>\n   write list      &#061; root<br \/>\n   follow symlinks &#061; yes<br \/>\n   guest ok        &#061; yes<\/span><\/p>\n<p>[homes]<br \/>\n<span style=\"color:#ff6666\">&#8230;.(\u5e95\u4e0b\u4fdd\u7559\u539f\u672c\u8bbe\u5b9a)&#8230;.<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/nmb restart<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u9762\u7684\u8bbe\u5b9a\u6709\u51e0\u4e2a\u5730\u65b9\u6bd4\u8f83\u6709\u8da3\u4e00\u70b9&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">time server<\/span>&#xff1a;\u8981\u4f7f Samba \u4e0e Windows \u4e3b\u673a\u7684\u65f6\u95f4\u540c\u6b65&#xff0c;\u4f7f\u7528\u8fd9\u4e2a\u9879\u76ee&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">logon script<\/span>&#xff1a;\u5f53\u4f7f\u7528\u8005\u4ee5 Windows \u5ba2\u6237\u7aef\u767b\u5165\u540e&#xff0c;Samba \u53ef\u4ee5\u63d0\u4f9b\u4e00\u652f\u6279\u5904\u7406\u6587\u4ef6&#xff0c;\u8ba9\u4f7f\u7528\u8005\u53bb\u8bbe\u5b9a\u597d\u4ed6\u4eec\u81ea\u5df1\u7684\u76ee\u5f55\u914d\u7f6e\u3002\u6574\u4e2a\u914d\u7f6e\u7684\u5185\u5bb9\u8bb0\u5f55\u5728 startup.bat \u5f53\u4e2d\u3002 \u4f60\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u8fd9\u4e2a startup.bat \u6863\u540d\u53ef\u4ee5\u968f\u610f\u66f4\u6539&#xff0c;\u4e0d\u8fc7\u4ed6\u5fc5\u987b\u8981\u653e\u7f6e\u5230 [netlogon] \u6240\u6307\u5b9a\u7684\u76ee\u5f55\u5185&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">logon drive<\/span>&#xff1a;\u90a3\u4e48\u8fd9\u4e2a\u5bb6\u76ee\u5f55\u8981\u6302\u8f7d\u5230\u90a3\u4e2a\u5206\u5272\u69fd&#xff1f; \u5728 Windows \u5e95\u4e0b\u5927\u591a\u4ee5 C, D, E&#8230; \u505a\u4e3a\u78c1\u76d8\u7684\u4ee3\u53f7&#xff0c;\u4f60\u8fd9\u91cc\u53ef\u4ee5\u6307\u5b9a\u4e00\u4e0b\u5bb6\u76ee\u5f55\u8981\u653e\u7f6e\u6210\u4e3a\u90a3\u4e2a\u78c1\u76d8\u4ee3\u53f7&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">admin users<\/span>&#xff1a;\u6307\u5b9a\u8fd9\u4e2a Samba PDC \u7684\u7ba1\u7406\u5458\u8eab\u4efd\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">[netlogon]<\/span>&#xff1a;\u6307\u5b9a\u5229\u7528\u7f51\u7edc\u767b\u5f55\u65f6\u9996\u5148\u53bb\u67e5\u8be2\u7684\u76ee\u5f55\u8d44\u6e90\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">logon path<\/span>&#xff1a;\u7528\u6237\u767b\u5165\u540e&#xff0c;\u4f1a\u53d6\u5f97\u7684\u73af\u5883\u8bbe\u5b9a\u6570\u636e\u5728\u54ea&#xff1f; \u6211\u4eec\u77e5\u9053\u7528\u6237\u4f1a\u6709\u4e00\u5806\u73af\u5883\u6570\u636e&#xff0c;\u4f8b\u5982\u684c\u9762\u7b49&#xff0c;\u8fd9\u4e9b\u4e1c\u897f\u90fd\u653e\u7f6e\u5230\u8fd9\u91cc\u6765\u3002\u4f7f\u7528\u7684\u53d8\u91cf\u4e2d&#xff0c;\u00a0<span style=\"color:#000088\">%N \u4ee3\u8868 PDC \u670d\u52a1\u5668\u7684\u4f4d\u7f6e&#xff0c; %U \u5219\u4ee3\u8868\u7528\u6237\u7684 Linux \u5bb6\u76ee\u5f55\u3002\u56e0\u6b64\u6700\u7ec8\u4f60\u5f97\u8981\u6709 ~someone\/profile \u7684\u76ee\u5f55\u624d\u53ef\u4ee5<\/span>\u3002<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#000088\">logon home<\/span>&#xff1a;\u7528\u6237\u7684\u5bb6\u76ee\u5f55&#xff0c;\u9ed8\u8ba4\u4e0e Linux \u7684\u5bb6\u76ee\u5f55\u76f8\u540c\u4f4d\u7f6e\u3002<\/span><\/span> \u00a0<\/li>\n<\/ul>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">3. \u5efa\u7acb Windows \u5ba2\u6237\u7aef\u767b\u5165\u65f6\u6240\u9700\u7684\u8bbe\u5b9a\u6570\u636e netlogon \u76ee\u5f55<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5148\u6765\u5efa\u7acb [netlogon] \u5185\u6240\u9700\u8981\u7684\u6570\u636e\u597d\u4e86&#xff0c;\u90a3\u5c31\u662f\u4e00\u4e2a\u76ee\u5f55\u3002\u7531\u4e8e\u9e1f\u54e5\u9884\u8ba1\u5c06\u6240\u6709\u7684 PDC \u6570\u636e\u901a\u901a\u653e\u7f6e\u5230 \/winhome \u5f53\u4e2d&#xff0c;\u5305\u62ec\u7528\u6237\u5bb6\u76ee\u5f55&#xff0c;\u56e0\u6b64\u5f88\u591a\u4e1c\u897f\u90fd\u9700\u8981\u4fee\u8ba2\u5594&#xff01;\u5305\u62ec\u540e\u6765\u7684 SELinux \u80af\u5b9a\u4f1a\u51fa\u95ee\u9898\u7684&#xff5e;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">mkdir -p \/winhome\/netlogon<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765\u6211\u4eec\u8fd8\u5f97\u8981\u5efa\u7acb\u5141\u8bb8\u4f7f\u7528\u8005\u6267\u884c\u7684\u6863\u6848&#xff0c;\u5c31\u662f\u90a3\u4e2a startup.bat \u624d\u884c&#xff01; \u6ce8\u610f\u4e00\u4e0b&#xff0c;\u6211\u4eec\u8fd9\u91cc\u5047\u8bbe\u7528\u6237\u5bb6\u76ee\u5f55\u4e3a K \u69fd&#xff0c;\u90a3\u4f60\u53ef\u4ee5\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/winhome\/netlogon\/startup.bat<\/span><br \/>\n<span style=\"color:#FFFF00\">net time \\\\\\\\vbirdserver \/set \/yes<br \/>\nnet use K: \/home<\/span><br \/>\n<span style=\"color:#ff6666\"># \u8fd9\u4e2a\u6863\u6848\u7684\u683c\u5f0f\u4e3a&#xff1a;net use [device:] [directory]<\/span><\/p>\n<p><span style=\"color:#ff6666\"># \u518d\u5c06\u8be5\u6863\u6848\u8f6c\u6210 DOS \u7684\u65ad\u884c\u683c\u5f0f\u624d\u884c&#xff01;\u56e0\u4e3a\u662f\u63d0\u4f9b\u7ed9 Windows  \u7cfb\u7edf\u561b&#xff01;<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">yum install unix2dos<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">unix2dos \/winhome\/netlogon\/startup.bat<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">cat -A \/winhome\/netlogon\/startup.bat<\/span><br \/>\nnet time \\\\\\\\vbirdserver \/set \/yes<span style=\"color:#FFFF00\">^M$<\/span><br \/>\nnet use K: \/home<span style=\"color:#FFFF00\">^M$<\/span><br \/>\n<span style=\"color:#ff6666\"># \u77a7\u89c1\u5417&#xff1f;\u4f1a\u591a\u51fa\u4e2a\u5947\u602a\u7684 ^M \u7b26\u53f7&#xff0c;\u90a3\u5c31\u662f Windows \u65ad\u884c\u5b57\u7b26\u3002<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p> \u00a0 <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">4. \u5efa\u7acb Windows \u4e13\u7528\u7684\u4f7f\u7528\u8005<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56e0\u4e3a\u9e1f\u54e5\u9884\u8ba1\u5c06\u4f7f\u7528\u8005\u5168\u90e8\u632a\u5230 \/winhome \u5e95\u4e0b&#xff0c;\u800c\u4e14\u6bcf\u4e2a\u7528\u6237\u5bb6\u76ee\u5f55\u5e94\u8be5\u8fd8\u8981\u6709 profile \u76ee\u5f55\u5b58\u5728\u624d\u884c&#xff0c; \u4e3a\u4e86\u907f\u514d\u9ebb\u70e6&#xff0c;\u6240\u4ee5\u6211\u4eec\u5148\u5230 \/etc\/skel \u53bb\u5904\u7406\u4e00\u4e0b&#xff0c;\u7136\u540e\u624d\u5efa\u7acb\u8d26\u53f7&#xff0c;\u6700\u540e\u624d\u4ea7\u751f samba \u7528\u6237\u5427&#xff01; \u4ea7\u751f samba \u7528\u6237\u53ef\u4ee5\u4f7f\u7528 pdbedit \u4e5f\u80fd\u591f\u76f4\u63a5\u4f7f\u7528 smbpasswd -a &#xff0c;\u56e0\u4e3a\u6ca1\u6709\u8981\u7528\u7279\u6b8a\u7684\u53c2\u6570&#xff0c; \u6240\u4ee5&#xff0c;Samba \u7528\u6237\u5c31\u7528\u65e7\u7684 smbpasswd \u6765\u5904\u7406\u5373\u53ef\u3002<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">mkdir \/etc\/skel\/profile<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -d \/winhome\/dmtsai dmtsai<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -d \/winhome\/nikky  nikky<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd -a root<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd -a dmtsai<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd -a nikky<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">pdbedit -L<\/span><br \/>\nsmb1:2004:<br \/>\nsmb3:2006:<br \/>\nsmb2:2005:<br \/>\nstudent:505:<br \/>\nroot:0:root<br \/>\ndmtsai:2007:<br \/>\nnikky:2008:<br \/>\n<span style=\"color:#ff6666\"># \u91cd\u70b9\u662f\u9700\u8981\u6709\u753b\u5e95\u7ebf\u7684\u90a3\u51e0\u4e2a\u4eba\u7269\u51fa\u73b0\u624d\u884c\u5466&#xff01;<\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">ll \/winhome<\/span><br \/>\ndrwx&#8212;&#8212;. 5 dmtsai dmtsai 4096 Jul 29 16:49 dmtsai<br \/>\ndrwxr-xr-x. 2 root   root   4096 Jul 29 16:48 netlogon<br \/>\ndrwx&#8212;&#8212;. 5 nikky  nikky  4096 Jul 29 16:49 nikky<br \/>\n<span style=\"color:#ff6666\"># \u7528\u6237\u7684\u5bb6\u76ee\u5f55\u4e0d\u662f\u5728 \/home \u800c\u662f\u5728 \/winhome \u91cc\u5934\u624d\u662f\u5bf9\u7684\u5466&#xff01;<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u4ee5\u540e\u65b0\u589e\u7684\u4f7f\u7528\u8005\u90fd\u6709\u53ef\u4ee5\u5b58\u653e\u6765\u81ea Windows \u7684\u7279\u6b8a\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55\u5594&#xff01;\u6bd4\u8f83\u597d\u7ba1\u7406\u5570&#xff5e; \u5f53\u7136\u5566&#xff0c;\u4f7f\u7528 useradd \u65b0\u589e\u4f7f\u7528\u8005\u540e&#xff0c;\u8bb0\u5f97\u4e5f\u8981\u4f7f\u7528 smbpasswd -a username \u6765\u8ba9\u8be5\u4f7f\u7528\u8005\u53ef\u4ee5\u4f7f\u7528 Samba \u5594&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">5. \u5efa\u7acb\u673a\u5668\u7801\u8d26\u53f7<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e PDC \u4f1a\u9488\u5bf9 Windows \u5ba2\u6237\u7aef\u7684\u4e3b\u673a\u540d (NetBIOS name) \u8fdb\u884c\u4e3b\u673a\u8d26\u53f7\u68c0\u67e5&#xff0c; \u6240\u4ee5\u6211\u4eec\u4e5f\u8981\u4e3a\u5ba2\u6237\u7aef\u7684\u4e3b\u673a\u540d\u8fdb\u884c\u8d26\u53f7\u7684\u8bbe\u5b9a\u3002\u54a6&#xff01;\u5565\u662f\u4e3b\u673a\u8d26\u53f7&#xff1f; \u4e00\u822c\u7528\u6237\u8d26\u53f7\u662f\u82f1\u6587\u6216\u6570\u5b57&#xff0c;<span style=\"color:#000088\">\u4e3b\u673a\u8d26\u53f7\u5219\u5728\u8be5\u8d26\u53f7\u6700\u540e\u9762\u52a0\u4e0a\u4e00\u4e2a\u94b1\u5b57\u53f7\u300e$\u300f\u5373\u53ef<\/span>&#xff01; \u4e3e\u4f8b\u6765\u8bf4&#xff0c; vbirdwinxp \u8fd9\u90e8\u4e3b\u673a\u53ef\u8bbe\u5b9a\u7684\u8d26\u53f7\u540d\u79f0\u4e3a vbirdwinxp$\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u800c\u6211\u4eec\u77e5\u9053\u8981\u4f7f\u7528 smbpasswd \u589e\u52a0\u7684\u4f7f\u7528\u8005\u5fc5\u987b\u8981\u5728 \/etc\/passwd \u5f53\u4e2d&#xff0c;\u56e0\u6b64\u8981\u5efa\u7acb\u8fd9\u4e2a\u8d26\u53f7\u4f60\u5c31\u5f97\u8981\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -M -s \/sbin\/nologin -d \/dev\/null vbirdwinxp$<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">useradd -M -s \/sbin\/nologin -d \/dev\/null vbirdwin7$<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4f1a\u589e\u52a0 -M -s -d \u7b49\u53c2\u6570\u7684\u539f\u56e0\u662f\u56e0\u4e3a\u4e0d\u60f3\u8981\u8ba9\u8fd9\u4e2a\u8d26\u53f7\u5177\u6709\u53ef\u4ee5\u767b\u5165\u7684\u6743\u9650&#xff0c; \u56e0\u6b64\u5c06\u8fd9\u4e2a\u4e3b\u673a\u8d26\u53f7\u8bbe\u5b9a\u7684\u6bd4\u8f83\u602a\u4e00\u70b9&#xff5e; ^_^&#xff5e;\u63a5\u4e0b\u6765\u8ba9 Samba \u77e5\u9053\u8fd9\u4e2a\u8d26\u53f7\u662f\u4e3b\u673a\u8d26\u53f7&#xff0c;\u6240\u4ee5\u4f60\u5e94\u8be5\u8981\u8fd9\u6837\u505a&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd -a -m vbirdwinxp$<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">smbpasswd -a -m vbirdwin7$<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u6837\u4fbf\u52a0\u5165\u4e3b\u673a\u8d26\u53f7\u5570&#xff01;\u800c\u6211\u4eec\u7684 Samba PDC \u4e5f\u5c31\u53ef\u4ee5\u900f\u8fc7\u300e\u4e3b\u673a\u8d26\u53f7\u300f\u6765\u5224\u65ad Windows \u5ba2\u6237\u7aef\u80fd\u5426\u8fde\u4e0a\u6765&#xff0c; \u82e5\u8fde\u63a5\u4e0a PDC \u4e0e Windows \u5ba2\u6237\u7aef\u540e&#xff0c;\u63a5\u4e0b\u6765\u4e00\u822c\u4f7f\u7528\u8005\u8d26\u53f7\u5c31\u53ef\u4ee5\u5728 windows \u5ba2\u6237\u7aef\u767b\u5165\u4e86&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">6. \u4fee\u6539\u5b89\u5168\u6027\u76f8\u5173\u6570\u636e<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e\u6211\u4eec\u5efa\u7acb\u7684\u8d26\u53f7\u76ee\u5f55\u5728 \/winhome \u5e95\u4e0b&#xff0c;\u5e76\u975e\u6b63\u89c4\u7684 CentOS \u76ee\u5f55&#xff0c;\u6240\u4ee5\u6700\u91cd\u8981\u7684 SELinux \u53ef\u80fd\u4f1a\u8dd1\u6389&#xff5e; \u6240\u4ee5&#xff0c;\u6211\u4eec\u8fd8\u5f97\u8981\u4fee\u8ba2 SELinux \u624d\u884c&#xff01;\u65b9\u6cd5\u5f88\u7b80\u5355&#xff0c;\u5c06 SELinux type \u8f6c\u4e3a samba_share_t \u5373\u53ef&#xff01;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">chcon -R -t samba_share_t \/winhome<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531\u4e8e SELinux \u7684\u6570\u636e\u662f\u4f1a\u7ee7\u627f\u4e0a\u5c42\u76ee\u5f55\u7684&#xff0c;\u56e0\u6b64\u672a\u6765\u65b0\u589e\u7684\u7528\u6237&#xff0c;\u7406\u8bba\u4e0a&#xff0c;\u5c31\u4e0d\u9700\u8981\u91cd\u65b0\u4fee\u8ba2 SELinux \u7684\u6587\u4ef6\u7c7b\u578b\u4e86\u3002 \u4f46\u662f&#xff0c;\u5982\u679c\u4f60\u8001\u662f\u53d1\u73b0\u767b\u5165 PDC \u7684\u8d26\u53f7\u5374\u65e0\u6cd5\u53d6\u5f97\u5bb6\u76ee\u5f55&#xff0c;\u90a3\u4e48\u5c31\u89c2\u5bdf \/var\/log\/messages \u5185\u7684\u8d44\u6599\u6765\u4fee\u8ba2\u5427&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-182i4plp4cyep.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.4.3 Wimdows XP pro. \u7684\u5ba2\u6237\u7aef<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bf7\u6ce8\u610f&#xff0c;\u5e95\u4e0b\u7684\u65b9\u6cd5\u4ec5\u9002\u7528\u4e8e Windows 2000, Windows XP \u4e13\u4e1a\u7248 (Pro.)&#xff0c;\u4e00\u822c\u7684 Windows XP home \u7248\u672c\u662f\u4e0d\u652f\u6301\u7684&#xff01; \u5982\u679c\u4f60\u5ba2\u6237\u7aef\u7684\u4e3b\u673a\u662f\u968f\u673a\u7248\u7684 Windows XP &#xff0c;\u901a\u5e38\u662f Windows XP home &#xff0c;\u90a3\u5e95\u4e0b\u7684\u65b9\u6cd5\u53ef\u80fd\u5c31\u65e0\u6cd5\u9002\u7528\u5570&#xff01; \u8981\u8fde\u63a5\u4e0a Samba PDC \u7684\u8fc7\u7a0b\u4e5f\u662f\u633a\u7b80\u5355\u7684&#xff0c;\u4f60\u53ef\u4ee5\u8fd9\u6837\u505a&#xff1a; (\u81f3\u4e8e Windows 7 \u5bf9\u4e8e Samba \u7684\u7248\u672c\u8981\u6c42\u8f83\u9ad8&#xff0c;\u5b98\u65b9\u7f51\u7ad9\u662f\u8bf4\u5f97\u9ad8\u4e8e 3.3.x \u4ee5\u4e0a\u7248\u672c\u624d\u6709\u652f\u6301)<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">1. \u786e\u8ba4 windows \u5ba2\u6237\u7aef\u7684\u7f51\u57df\u4e0e\u4e3b\u673a\u540d<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9996\u5148\u6211\u4eec\u5fc5\u987b\u8981\u786e\u8ba4 Windows \u5ba2\u6237\u7aef\u7684\u5de5\u4f5c\u7ec4\u4e0e\u4e3b\u673a\u540d\u8ddf\u54b1\u4eec\u7684 Samba PDC \u76f8\u540c&#xff0c; \u786e\u8ba4\u7684\u65b9\u5f0f\u5728\u5c40\u57df\u7f51\u7edc\u91cc\u9762\u5df2\u7ecf\u63d0\u8fc7\u4e86&#xff0c;\u8fd9\u91cc\u5728\u5f3a\u8c03\u4e00\u6b21\u3002\u5c06\u9f20\u6807\u79fb\u52a8\u5230\u300e\u6211\u7684\u8ba1\u7b97\u673a\u300f\u4e0a\u9762&#xff0c;\u6309\u4e0b\u53f3\u952e&#xff0c; \u9009\u62e9\u300e\u5185\u5bb9\u300f&#xff0c;\u7136\u540e\u70b9\u9009\u300e\u8ba1\u7b97\u673a\u540d\u79f0\u300f&#xff0c;\u4f1a\u51fa\u73b0\u5982\u4e0b\u56fe\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18mocwtyw3gia.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-2\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u4f60\u8981\u5148\u786e\u8ba4\u7bad\u5934 1 \u5904\u6307\u7684\u4e3b\u673a\u540d\u4e0e\u5de5\u4f5c\u7ec4&#xff0c;\u5728\u6211\u4eec\u8fd9\u4e2a\u6848\u4f8b\u5f53\u4e2d\u7684\u5de5\u4f5c\u7ec4\u4e3a vbirdhouse&#xff0c; \u8fd9\u90e8 Windows \u4e3b\u673a\u7684 NetBIOS \u540d\u79f0\u5219\u4e3a vbirdwinxp \u5594&#xff01;\u5982\u679c\u4e0d\u5bf9\u7684\u8bdd&#xff0c;\u8bf7\u6309\u4e0b\u300e\u53d8\u66f4\u300f\u6765\u8bbe\u5b9a&#xff0c; \u5e76\u4e14\u91cd\u65b0\u542f\u52a8\u3002\u91cd\u65b0\u542f\u52a8\u5b8c\u6bd5\u540e\u518d\u5230\u4e0a\u56fe\u7684\u753b\u9762\u5f53\u4e2d&#xff0c;\u6309\u4e0b\u7bad\u5934 2 \u6240\u6307\u7684\u7f51\u7edc\u8bc6\u522b\u5904\u3002<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">2. \u8bbe\u5b9a\u4e3b\u673a\u540d\u4e0e\u57df\u540d<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765\u6211\u4eec\u8981\u8bbe\u5b9a\u8fd9\u90e8 Windows XP pro. \u8981\u94fe\u63a5\u5230\u5c40\u57df\u7f51\u7edc\u4e0a\u7684\u54ea\u90e8 PDC \u4e0a\u9762&#xff0c;\u4ea6\u5373\u662f\u5904\u7406\u4e3b\u673a\u8d26\u53f7\u4ee5\u53ca Samba PDC \u8d1f\u8d23\u7684\u7f51\u57df (domain) \u5566&#xff01;\u5728\u56fe 16.4-2 \u6309\u4e0b\u300e\u7f51\u7edc\u8bc6\u522b\u300f\u540e&#xff0c;\u5206\u522b\u5728\u51fa\u73b0\u7684\u7a97\u53e3\u5f53\u4e2d\u9009\u62e9&#xff1a;<\/span><\/span><\/p>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0b\u4e00\u6b65&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u53f0\u8ba1\u7b97\u673a\u662f\u516c\u53f8\u7f51\u7edc\u7684\u4e00\u90e8\u4efd&#xff0c;\u800c\u4e14\u6211\u5728\u5de5\u4f5c\u65f6\u7528\u6765\u8054\u673a\u5230\u5176\u4ed6\u8ba1\u7b97\u673a(T)<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u7684\u516c\u53f8\u4f7f\u7528\u4e00\u6216\u591a\u4e2a\u7f51\u57df\u7684\u7f51\u7edc(C)<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0b\u4e00\u6b65<\/span><\/span><\/li>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7136\u540e\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u7a97\u53e3&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18mshb0l2dwxx.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-3\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8bf7\u4f9d\u5e8f\u586b\u5199 Samba \u4e3b\u673a\u4e0a\u9762\u7684\u7ba1\u7406\u5458\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u8981\u6ce8\u610f\u8fd9\u4e2a\u5bc6\u7801\u662f\u8bb0\u5f55\u4e8e Samba \u4e2d\u7684\u90a3\u4e2a&#xff0c;\u53ef\u4e0d\u662f \/etc\/shadow \u5594&#xff01;\u522b\u641e\u6df7\u4e86&#xff5e;\u8fd9\u662f Samba \u670d\u52a1\u5668\u7684\u8bbe\u5b9a\u5462\u3002\u8f93\u5165\u4e4b\u540e\u6309\u4e0b\u4e00\u6b65\u5427&#xff0c;\u901a\u5e38\u90fd\u4f1a\u51fa\u73b0\u627e\u4e0d\u5230\u6b63\u786e\u4e3b\u673a\u7684\u753b\u9762&#xff0c;\u5982\u4e0b\u6240\u793a&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-183a54lgpj3gi.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-4\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9e1f\u54e5\u4e5f\u89c9\u5f97\u5f88\u5947\u602a&#xff0c;\u8001\u662f\u544a\u8bc9\u6211\u627e\u4e0d\u5230&#xff01;\u4e0d\u8fc7\u6ca1\u6709\u5173\u7cfb&#xff0c;\u8fd9\u91cc\u6211\u4eec\u4f9d\u65e7\u518d\u586b\u4e00\u6b21\u4e3b\u673a\u7684 NetBIOS name \u4ee5\u53ca\u7ec4\u540d&#xff0c; \u5982\u4e0a\u56fe\u6240\u793a&#xff0c;\u7136\u540e\u7ee7\u7eed\u6309\u4e0b\u4e00\u6b65&#xff0c;\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u753b\u9762\u5566&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18jwqqlw3kqal.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-5\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd9\u6b21\u5c31\u7ed9\u4ed6\u8f93\u5165\u6b63\u786e\u7684\u7ba1\u7406\u5458\u8d26\u53f7\u4e0e\u5bc6\u7801&#xff0c;\u8bb0\u5f97\u6700\u540e\u9762\u7684\u7f51\u57df\u5c31\u662f\u5de5\u4f5c\u7ec4\u540d\u79f0&#xff0c;\u522b\u5199\u9519\u4e86\u3002 \u5904\u7406\u5b8c\u6bd5\u540e\u7ed9\u4ed6\u6309\u4e0b\u786e\u5b9a\u5427&#xff01;\u7136\u540e\u5c31\u4f1a\u51fa\u73b0\u5982\u4e0b\u753b\u9762&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18c1n4f2mbyg0.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-6\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u606d\u559c\u4f60&#xff0c;\u8fd9\u5c31\u8868\u793a\u5df2\u7ecf\u8fde\u63a5\u4e0a Samba PDC \u5570&#xff01;\u6211\u4eec\u5e0c\u671b\u6240\u6709\u7684\u4f7f\u7528\u8005\u90fd\u76f4\u63a5\u7531 Samba PDC \u63a7\u7ba1&#xff0c;\u6240\u4ee5\u8fd9\u91cc\u8bf7\u586b\u5199 \u300e\u6b64\u65f6\u4e0d\u65b0\u589e\u4f7f\u7528\u8005\u300f\u5427&#xff01;\u6309\u4e0b\u4e00\u6b65\u53bb\u3002<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">3. \u91cd\u65b0\u542f\u52a8\u5e76\u4ee5\u65b0\u7684\u57df\u540d\u767b\u5165<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u56fe 16.4-6 \u4e4b\u540e\u8bf7\u91cd\u65b0\u542f\u52a8&#xff0c;\u5f00\u673a\u540e\u6574\u4e2a\u753b\u9762\u4f1a\u6709\u70b9\u7c7b\u4f3c\u8fd9\u6837&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18kaygssivplk.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-7\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e3a\u4e86\u4fdd\u62a4\u6211\u4eec\u7684\u7cfb\u7edf&#xff0c;\u56e0\u6b64\u5f97\u8981\u6309\u4e0b [ctrl]&#043;[alt]&#043;[del] \u4e09\u4e2a\u7ec4\u5408\u6309\u952e\u540e&#xff0c;\u624d\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u767b\u5165\u753b\u9762&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe\" height=\"299\" src=\"2025-04-18r0c0kme1fi4.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-8\u3001Windows \u5ba2\u6237\u7aef\u8fde\u4e0a PDC \u7684\u65b9\u5f0f\u6d41\u7a0b\u793a\u610f\u56fe<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u76ee\u524d\u7cfb\u7edf\u4e0a\u9762\u5c31\u4f1a\u6709\u4e24\u4e2a\u53ef\u9009\u62e9\u7684\u8d26\u53f7\u7ba1\u7406\u6a21\u5f0f&#xff0c;\u4e00\u4e2a\u662f\u672c\u673a\u8d26\u53f7\u4e00\u4e2a\u662f PDC \u63d0\u4f9b\u7684\u8d26\u53f7&#xff0c;\u90a3\u6211\u600e\u77e5\u767b\u5165\u8005\u662f\u54ea\u4e2a\u7ba1\u7406\u6a21\u5f0f&#xff1f; \u6240\u4ee5\u4f60\u5c31\u5f97\u8981\u6309\u4e0b\u4e0a\u8ff0\u753b\u9762\u7684\u300e\u9009\u9879\u300f&#xff0c;\u624d\u4f1a\u51fa\u73b0\u300e\u767b\u5165\u5230\u300f\u7684\u90a3\u4e00\u884c\u6570\u636e\u3002\u51fa\u73b0\u7684\u4e24\u4e2a\u6570\u636e\u5206\u522b\u662f&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">VBIRDWINXP(\u6b64\u8ba1\u7b97\u673a)&#xff1a;\u8fd9\u5c31\u662f\u4f60\u7684\u8ba1\u7b97\u673a\u540d\u79f0&#xff0c;\u4ea6\u5373\u662f\u4ee5\u672c\u673a\u8d26\u53f7\u767b\u5165&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">VBIRDHOUSE&#xff1a;\u5c31\u662f PDC \u7684 workgroup \u9879\u76ee&#xff0c;\u900f\u8fc7 PDC \u7684\u8d26\u53f7\u6765\u5c1d\u8bd5\u767b\u5165\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u73b0\u5728\u8bf7\u8f93\u5165\u4f60\u5728 Samba PDC \u4e0a\u9762\u62e5\u6709\u7684\u8d26\u53f7\u4e0e\u5bc6\u7801\u6765\u5c1d\u8bd5\u767b\u5165\u5427&#xff01;\u90a3\u5982\u679c\u4f60\u8f93\u5165\u7684\u8d26\u53f7\u5bc6\u7801\u662f\u5bf9\u7684&#xff0c;\u5374\u53d1\u73b0\u5982\u4e0b\u7684\u753b\u9762\u65f6&#xff0c; \u80af\u5b9a\u662f\u67d0\u4e9b\u6863\u6848\u6743\u9650\u6216\u8005\u662f SELinux \u8bbe\u5b9a\u9519\u8bef&#xff01;\u8bf7\u53c2\u8003 \/var\/log\/messages \u6216 \/var\/log\/samba\/* \u91cc\u9762\u7684\u767b\u5f55\u6863\u6765\u4fee\u6539&#xff01;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u4f7f\u7528 PDC \u8d26\u53f7\u767b\u5165\u5374\u53d1\u73b0\u6743\u9650\u9519\u8bef\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-18vaftyjcvaii.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-9\u3001\u4f7f\u7528 PDC \u8d26\u53f7\u767b\u5165\u5374\u53d1\u73b0\u6743\u9650\u9519\u8bef\u7684\u56fe\u793a<\/span><\/span><\/p>\n<p> \u00a0 <\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">4. \u89c2\u5bdf\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u4e0e\u914d\u7f6e\u6587\u4ef6<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u4f60\u53ef\u4ee5\u987a\u5229\u767b\u5165\u7684\u8bdd&#xff0c;\u6253\u5f00\u6863\u6848\u603b\u7ba1\u540e\u5e94\u8be5\u53ef\u4ee5\u770b\u5230\u7c7b\u4f3c\u4e0b\u65b9\u7684\u753b\u9762&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u767b\u5165 PDC \u540e&#xff0c;\u53d6\u5f97\u7684\u5bb6\u76ee\u5f55\u72b6\u6001\" height=\"299\" src=\"2025-04-18vqz4p2kaehm.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-10\u3001\u767b\u5165 PDC \u540e&#xff0c;\u53d6\u5f97\u7684\u5bb6\u76ee\u5f55\u72b6\u6001<\/span><\/span><\/p>\n<p> \u00a0 <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5475\u5475&#xff01;\u8be5\u8fde\u4e0a\u7684\u901a\u901a\u8fde\u7ed3\u4e0a\u6765\u5570&#xff01;\u4f60\u4e5f\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55 (K \u69fd) \u65b0\u589e\u79fb\u9664\u6570\u636e\u7684&#xff01;\u662f\u5426\u5f88\u4e0d\u9519\u554a&#xff01; ^_^&#xff01; \u800c\u5f53\u4f60\u6ce8\u9500\u4e4b\u540e&#xff0c;\u4f60\u5728 Windows \u684c\u9762\u4e0a\u5934\u6240\u8fdb\u884c\u7684\u5404\u9879\u4e2a\u4eba\u5316\u8bbe\u5b9a\u901a\u901a\u4f1a\u88ab\u79fb\u52a8\u5230 \/winhome\/dmtsai\/profile \u5f53\u4e2d\u5594&#xff01; \u5982\u679c\u4e0d\u76f8\u4fe1\u7684\u8bdd&#xff0c;\u8bf7\u81ea\u884c\u524d\u5f80 Samba \u670d\u52a1\u5668\u4e0a\u5934\u77a7\u4e00\u77a7\u5c31\u77e5\u9053\u4e86\u3002<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-182val21ldqpx.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.4.4 Wimdows 7 \u7684\u5ba2\u6237\u7aef<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6839\u636e SAMBA \u5b98\u7f51\u7684\u8bf4\u660e&#xff0c;\u652f\u6301 Windows 7 \u7684 Samba \u7248\u672c\u5fc5\u987b\u8981\u9ad8\u4e8e 3.3.x \u624d\u884c&#xff0c;\u8fd8\u597d&#xff0c;\u6211\u4eec\u7684 CentOS 6.x Samba \u7248\u672c\u771f\u7684\u662f\u9ad8\u4e8e 3.3.x \u7684 3.5.x&#xff0c;\u56e0\u6b64\u7406\u8bba\u4e0a\u662f\u652f\u6301 Windows 7 \u7684&#xff01;\u53ea\u4e0d\u8fc7 Windows 7 \u8981\u52a0\u5165 Samba PDC \u8fd8\u5f97\u8981\u4fee\u6539\u6ce8\u518c\u7801\u624d\u884c&#xff01;\u8fd9\u90e8\u4efd\u771f\u7684\u662f\u7ed9\u5b83\u5f88\u56f0\u6270&#xff01;\u5728 Windows 7 \u673a\u7801\u7684\u4fee\u6539\u65b9\u9762&#xff0c;\u4e3b\u8981\u662f\u4fee\u6539\u5e95\u4e0b\u7684\u673a\u7801&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\"><span style=\"color:#bbbbbb\"># 1. \u8fd9\u4e2a\u90e8\u5206\u662f\u8fdb\u884c\u300e\u65b0\u589e\u300f\u673a\u7801&#xff01;<\/span><br \/>\n[HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\services\\\\LanmanWorkstation\\\\Parameters]<br \/>\n\u201cDomainCompatibilityMode\u201d&#061;dword:00000001<br \/>\n\u201cDNSNameResolutionRequired\u201d&#061;dword:00000000<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4fee\u6539\u7684\u65b9\u5f0f\u4e3a&#xff0c;\u5728 Windows7 \u7684\u6267\u884c\u91cc\u9762\u8f93\u5165\u300e regedit \u300f&#xff0c;\u4f1a\u51fa\u73b0\u5982\u4e0b\u7684\u753b\u9762&#xff1a;<\/span><\/span><\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows 7 \u6ce8\u518c\u673a\u7801\u7684\u52a8\u4f5c\" height=\"299\" src=\"2025-04-18tdom2qn5xus.png\" width=\"534\" \/><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u56fe 16.4-11\u3001Windows 7 \u6ce8\u518c\u673a\u7801\u7684\u52a8\u4f5c<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5148\u7531 (1)\u5de6\u4fa7\u7a97\u53e3\u4e00\u5c42\u4e00\u5c42\u70b9\u9009\u5230\u6211\u4eec\u6240\u9700\u8981\u7684\u76ee\u6807\u53bb&#xff0c;\u7136\u540e (2)\u89c2\u5bdf\u6700\u5e95\u4e0b\u7684\u673a\u7801\u987a\u5e8f\u770b\u5bf9\u4e0d\u5bf9\u3002\u4e4b\u540e (3)\u5728\u53f3\u4fa7\u7a97\u53e3\u70b9\u9009\u6211\u4eec\u6240\u9700\u8981\u7684\u673a\u7801&#xff0c;\u5982\u679c\u662f\u8981\u65b0\u589e&#xff0c;\u90a3\u5c31\u662f\u5728\u53f3\u4fa7\u7a7a\u767d\u5904\u53f3\u952e\u5355\u51fb\u9009\u65b0\u589e\u5373\u53ef\u589e\u52a0\u4e00\u7ec4\u673a\u7801\u540d\u79f0\u3002\u6700\u540e (4)\u53cc\u51fb\u673a\u7801\u4f1a\u51fa\u73b0\u53ef\u4f9b\u4fee\u6539\u7684\u7a97\u53e3&#xff0c;\u90a3\u5c31\u6539\u6210\u4e0a\u9762\u8868\u683c\u4e2d\u7684\u8981\u6c42\u5373\u53ef\u3002\u66f4\u591a\u5173\u4e8e Windows 7 \u52a0\u5165 PDC \u7684\u76f8\u5173\u8d44\u6599&#xff0c; \u8bf7\u67e5\u9605\u6587\u672b\u7684\u53c2\u8003\u6570\u636e\u90e8\u5206\u5594\u3002<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7b49\u5230\u5c06\u673a\u7801\u4fee\u8ba2\u5b8c\u6bd5&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e0e Windows XP \u76f8\u540c\u7684\u65b9\u5f0f\u6765\u52a0\u5165 PDC \u5570&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-183q1ly53gqyo.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.4.5 PDC \u4e4b\u95ee\u9898\u514b\u670d<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u8001\u662f\u53d1\u751f\u9519\u8bef\u8baf\u606f\u4e3a\u300e\u4f7f\u7528\u7684\u5e10\u6237\u662f\u8ba1\u7b97\u673a\u5e10\u6237\u3002\u8bf7\u4f7f\u7528\u4f60\u7684\u901a\u7528\u7528\u6237\u5e10\u6237\u6216\u672c\u673a\u7528\u6237\u5e10\u6237\u6765\u5b58\u53d6\u8fd9\u53f0\u670d\u52a1\u5668\u300f\u65f6&#xff0c; \u4f60\u53ef\u4ee5\u8fd9\u6837\u505a\u7684&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5148\u5bdf\u770b\u4e00\u4e0b \/var\/log\/samba \u91cc\u9762\u7684\u767b\u5f55\u6587\u4ef6\u4fe1\u606f&#xff0c;\u5c24\u5176\u662f log.vbirdwinxp \u5173\u4e8e\u8fd9\u90e8\u4e3b\u673a\u7684\u4fe1\u606f\u5436&#xff1b;<\/span><\/span> \u00a0<\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5982\u679c\u8fd8\u662f\u65e0\u6cd5\u89e3\u51b3&#xff0c;\u53ef\u4ee5\u5728 lmhosts \u91cc\u9762\u589e\u52a0 vbirdwinxp \u7684 IP \u4e0e\u4e3b\u673a\u540d\u7684\u5bf9\u5e94&#xff0c;\u7136\u540e\u5c06 samba \u6574\u4e2a\u5173\u6389\u300e\/etc\/init.d\/smb stop\u300f&#xff0c;\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u8ba9 NetBIOS \u7684\u540d\u79f0\u89e3\u6790\u65f6\u95f4\u903e\u65f6&#xff0c;\u518d\u91cd\u65b0\u542f\u52a8 samba \u300e\/etc\/init.d\/smb start\u300f&#xff0c;\u7136\u540e\u518d\u91cd\u65b0\u505a\u4e00\u6b21\u8f93\u5165 root \u7684\u5bc6\u7801\u90a3\u4e2a\u52a8\u4f5c<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u9e1f\u54e5\u5c1d\u8bd5\u8fc7\u7684\u6848\u4f8b\u4e2d&#xff0c;\u4e0a\u9762\u7b2c\u4e8c\u4e2a\u6b65\u9aa4\u633a\u6709\u6548\u7684&#xff01;\u4e0d\u8fc7&#xff0c;\u8fd8\u662f\u5f97\u8981\u5bdf\u770b \/var\/log\/samba \u91cc\u9762\u7684\u767b\u5f55\u4fe1\u606f\u624d\u884c\u5594&#xff01;<\/span><\/span> \u00a0<\/p>\n<ul>\n<li>\n<hr \/>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e00\u4e9b Windows \u8d26\u53f7\u5728 Windows \u7cfb\u7edf\u4e0a\u9762\u7684\u4f7f\u7528\u6280\u5de7<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u867d\u7136 PDC \u5f88\u597d\u7528&#xff0c;\u4e0d\u8fc7\u4f60\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u6bcf\u6b21\u4f60\u4f7f\u7528 PDC \u4e0a\u5934\u7684\u8d26\u53f7\u767b\u5165 Windows \u5ba2\u6237\u7aef\u4e3b\u673a\u65f6&#xff0c;\u00a0<span style=\"color:#000088\">Windows \u4e3b\u673a\u4f1a\u7531 \/winhome\/username\/profile\/ \u5f53\u4e2d\u52a0\u8f7d\u6240\u9700\u8981\u7684\u6570\u636e&#xff0c; \u5e76\u6682\u65f6\u542f\u52a8\u4e00\u4e2a\u6587\u4ef6\u5939\u5728 Windows \u7cfb\u7edf\u7684 C:\\\\Documents and Settings\\\\username \u5f53\u4e2d&#xff0c;\u5982\u679c\u4f60\u7684\u5bb6\u76ee\u5f55\u4e0b\u7684 profile \u6570\u636e\u592a\u591a\u65f6&#xff0c; \u5149\u662f\u4f20\u8f93\u5c31\u4f1a\u82b1\u53bb\u5f88\u591a\u65f6\u95f4\u7684&#xff01;<\/span><\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6240\u4ee5&#xff0c;\u4f60\u5e94\u8be5\u5c06\u4e00\u4e9b\u6863\u6848\u6570\u636e\u653e\u7f6e\u5230\u4f60\u7684\u5bb6\u76ee\u5f55\u4e0b&#xff0c;\u4ea6\u5373 K \u69fd\u5f53\u4e2d&#xff0c;\u5c3d\u91cf\u4e0d\u8981\u4f7f\u7528 Windows \u9884\u8bbe\u7684\u300e\u6211\u7684\u6587\u6863\u5939\u300f&#xff0c; \u56e0\u4e3a\u300e\u6211\u7684\u6587\u6863\u5939\u300f\u4f1a\u5c06\u6570\u636e\u79fb\u52a8\u5230\u300e \/winhome\/username\/profile\/My Documents\/ \u300f\u76ee\u5f55\u4e0b&#xff0c;\u540c\u6837\u7684&#xff0c; \u50a8\u5b58\u5230\u684c\u9762\u7684\u6570\u636e\u4f1a\u88ab\u653e\u7f6e\u5230\u300e \/winhome\/username\/profile\/\u684c\u9762\/ \u300f\u76ee\u5f55\u4e2d&#xff0c;\u90a3\u6837\u5728\u767b\u5165\u4e0e\u6ce8\u9500\u65f6\u4f1a\u82b1\u53bb\u5f88\u591a\u65f6\u95f4\u5594&#xff01; \u8fd9\u4e2a\u5c0f\u5730\u65b9\u4e5f\u8981\u6ce8\u610f\u7684\u5462&#xff01; ^_^<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u597d\u4e86&#xff0c;\u5173\u4e8e SAMBA \u7684 PDC \u4f5c\u6cd5\u6211\u4eec\u5c31\u8c08\u5230\u8fd9\u91cc&#xff0c;\u8fd8\u6709\u66f4\u591a\u7684\u4fe1\u606f\u4f60\u53ef\u4ee5\u524d\u5f80\u8fd9\u4e2a\u7ae0\u8282\u6700\u540e\u9762\u7684\u53c2\u8003\u6570\u636e\u6240\u5217\u51fa\u7684\u7f51\u5740\u53bb\u67e5\u9605&#xff0c; \u56e0\u4e3a\u8fd8\u6709\u5f88\u591a\u7684\u4f5c\u6cd5\u5436&#xff01;\u4e8b\u5b9e\u4e0a&#xff0c;\u9e1f\u54e5\u89c9\u5f97\u5728\u4e00\u4e2a\u7f51\u57df\u5f53\u4e2d&#xff0c;\u5982\u679c\u6709\u591a\u90e8\u7684 Windows NT \u4e3b\u673a&#xff0c;\u4f8b\u5982 Windows 2000\/XP pro. \u8fd9\u4e00\u7c7b\u7684\u6bd4\u8f83\u7a33\u5b9a\u7684\u4e2a\u4eba\u4f7f\u7528\u684c\u9762\u7248\u672c\u65f6&#xff0c;\u4f7f\u7528 PDC \u5c31\u5f88\u6709\u7528\u4e86&#xff01;\u56e0\u4e3a Windows 2000\/XP pro. \u4e5f\u662f\u4e00\u4e2a\u591a\u4eba\u7684\u64cd\u4f5c\u7cfb\u7edf&#xff0c;\u4e0d\u50cf Windows 98 \u662f\u5355\u4eba\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002\u6240\u4ee5&#xff0c;\u5f53\u4f7f\u7528 Windows 2000\/XP pro. \u800c\u65e0\u6cd5\u767b\u5165 PDC \u65f6&#xff0c;\u4f60\u662f\u65e0\u6cd5\u4f7f\u7528 Windows 2000\/XP pro. \u4e0a\u9762\u7684\u4efb\u4f55\u7684\u4fe1\u606f\u7684\u3002 \u4f46\u662f\u5728 Windows 98 \u4e0a\u9762\u82e5\u65e0\u6cd5\u6b63\u786e\u7684\u767b\u5165&#xff0c;\u4f60\u4ecd\u7136\u5177\u6709\u8be5\u8ba1\u7b97\u673a\u7684\u4e3b\u63a7\u6743\u5594&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u8bbe\u5b9a Windows \u5ba2\u6237\u7aef\u4e4b\u524d&#xff0c;\u8bf7\u5148\u786e\u8ba4\u4f60\u7684 Windows \u662f\u4ec0\u4e48\u7248\u672c&#xff1f; \u4e0a\u8ff0\u7684\u52a8\u4f5c\u5bf9\u4e8e Windows XP \u5bb6\u7528\u7248 (Home), Windows 7 \u662f\u6ca1\u6709\u4f5c\u7528\u7684&#xff01;\u8bf7\u5148\u786e\u8ba4\u624d\u884c\u5594&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.5 \u670d\u52a1\u5668\u7b80\u5355\u7ef4\u62a4\u4e0e\u7ba1\u7406<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9664\u4e86\u4e0a\u8ff0\u7684\u6b63\u89c4\u4f5c\u6cd5\u4e4b\u5916&#xff0c;\u5176\u5b9e\u8fd8\u6709\u4e00\u4e9b\u7a0d\u5fae\u91cd\u8981\u7684\u4e8b\u60c5\u8981\u8ddf\u5927\u5bb6\u5206\u4eab\u7684&#xff01;<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.5.1 \u670d\u52a1\u5668\u76f8\u5173\u95ee\u9898\u514b\u670d<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u901a\u5e38\u6211\u4eec\u5728\u8bbe\u5b9a SAMBA \u7684\u65f6\u5019&#xff0c;\u5982\u679c\u662f\u4ee5\u5355\u4e00\u4e3b\u673a\u7684\u5de5\u4f5c\u7ec4 (Workgroup) \u7684\u65b9\u5f0f\u6765\u8fdb\u884c smb.conf \u7684\u8bbe\u5b9a\u65f6&#xff0c;\u51e0\u4e4e\u5f88\u5bb9\u6613\u5c31\u53ef\u4ee5\u8bbe\u5b9a\u6210\u529f\u4e86&#xff01;\u5e76\u6ca1\u6709\u4ec0\u4e48\u5f88\u56f0\u96be\u7684\u6b65\u9aa4\u3002\u4e0d\u8fc7&#xff0c;\u4e07\u4e00\u8fd8\u662f\u65e0\u6cd5\u6210\u529f\u7684\u8bbe\u5b9a\u8d77\u6765&#xff0c; \u8bf7\u52a1\u5fc5\u5bdf\u770b\u767b\u5f55\u6863&#xff0c;\u4e5f\u5c31\u662f\u5728 \/var\/log\/samba\/ \u91cc\u9762\u7684\u6570\u636e&#xff01;\u5728\u8fd9\u91cc\u9762\u7684\u8d44\u6599\u5f53\u4e2d&#xff0c;\u4f60\u4f1a\u53d1\u73b0&#xff1a;\u54a6&#xff01; \u600e\u4e48\u8fd9\u4e48\u591a\u6863\u6848\u554a&#xff01;\u56e0\u4e3a\u6211\u4eec\u5728 smb.conf \u91cc\u9762\u8bbe\u5b9a\u4e86&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">log file &#061; \/var\/log\/samba\/log.%m<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u4e2a %m \u662f\u6307\u5ba2\u6237\u7aef\u8ba1\u7b97\u673a\u7684 NetBIOS Name \u7684\u610f\u601d&#xff0c;\u6240\u4ee5&#xff0c;\u5f53\u6709\u4e2a vbirdwinxp \u7684\u4e3b\u673a\u6765\u767b\u5165\u6211\u4eec\u7684 vbirdserver \u4e3b\u673a\u65f6&#xff0c;\u90a3\u4e48\u767b\u5165\u7684\u4fe1\u606f\u5c31\u4f1a\u88ab\u7eaa\u5f55\u5728 \/var\/log\/samba\/log.vbirdwinxp \u6863\u6848\u5594&#xff01;\u800c\u5982\u679c\u4e07\u4e00\u6765\u6e90 IP \u5e76\u6ca1\u6709 Netbios name \u7684\u65f6\u5019&#xff0c;\u90a3\u4e48\u5f88\u53ef\u80fd\u662f\u4e00\u4e9b\u9519\u8bef\u8baf\u606f&#xff0c;\u8fd9\u4e9b\u9519\u8bef\u8baf\u606f\u5c31\u4f1a\u88ab\u7eaa\u5f55\u5230 log.smbd, log.nmbd \u91cc\u9762\u53bb\u4e86&#xff01;\u6240\u4ee5&#xff0c;\u5982\u679c\u4f60\u8981\u5bdf\u770b\u67d0\u90e8\u8ba1\u7b97\u673a\u8fde\u4e0a\u4f60\u7684 SAMBA \u4e3b\u673a\u53d1\u751f\u4e86\u4ec0\u4e48\u95ee\u9898\u65f6&#xff0c;\u7279\u522b\u8981\u7559\u610f\u8fd9\u4e2a\u767b\u5f55\u6863\u7684\u5f62\u5f0f\u5594&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u5982\u679c\u4f60\u7684 SAMBA \u660e\u660e\u5df2\u7ecf\u542f\u52a8\u5b8c\u6210\u4e86&#xff0c;\u5374\u504f\u504f\u8001\u662f\u65e0\u6cd5\u6210\u529f&#xff0c;\u53c8\u65e0\u6cd5\u67e5\u51fa\u95ee\u9898\u65f6&#xff0c;\u5efa\u8bae\u5148\u5173\u95ed Samba \u4e00\u9635\u5b50&#xff0c;\u518d\u91cd\u65b0\u542f\u52a8&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\/etc\/init.d\/smb stop<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u9e1f\u54e5\u8fc7\u53bb\u7684\u6848\u4f8b\u5f53\u4e2d&#xff0c;\u786e\u5b9e\u6709\u51e0\u6b21\u662f\u56e0\u4e3a PID \u4e0e NetBIOS \u7684\u95ee\u9898&#xff0c;\u5bfc\u81f4\u6574\u4e2a SAMBA \u602a\u602a\u7684&#xff5e;\u6240\u4ee5\u5b8c\u6574\u7684\u5173\u95ed\u4e4b\u540e&#xff0c; \u7ecf\u8fc7\u4e00\u9635\u5b50\u7684\u77ed\u6682\u65f6\u95f4&#xff0c;\u518d\u91cd\u65b0\u542f\u52a8&#xff0c;\u5e94\u8be5\u5c31\u53ef\u4ee5\u6062\u590d\u6b63\u5e38\u4e86&#xff01;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u8fd8\u6709&#xff0c;\u4e07\u4e00\u4f60\u5728\u8fdb\u884c\u5199\u5165\u7684\u52a8\u4f5c\u65f6&#xff0c;\u8001\u662f\u53d1\u73b0\u300e\u4f60\u6ca1\u6709\u76f8\u5173\u5199\u5165\u7684\u6743\u9650&#xff01;\u300f&#xff0c;\u4e0d\u8981\u6000\u7591&#xff0c;\u51e0\u4e4e\u53ef\u4ee5\u786e\u5b9a\u662f Permission \u7684\u95ee\u9898&#xff0c;\u4e5f\u5c31\u662f Linux \u7684\u6743\u9650\u4e0e SAMBA \u5f00\u653e\u7684\u6743\u9650\u5e76\u4e0d\u76f8\u7b26\u5408&#xff0c;\u6216\u8005\u662f SELinux \u5728\u641e\u9b3c&#xff01;\u65e0\u8bba\u5982\u4f55&#xff0c; \u4f60\u5fc5\u987b\u8981\u4e86\u89e3\u80fd\u4e0d\u80fd\u5199\u5165 Linux \u78c1\u76d8&#xff0c;\u770b\u7684\u662f PID \u7684\u6743\u9650\u4e0e Linxu \u6587\u4ef6\u7cfb\u7edf\u662f\u5426\u543b\u5408&#xff0c;\u800c\u90a3\u4e2a smb.conf \u91cc\u9762\u8bbe\u5b9a\u7684\u76f8\u5173\u6743\u9650\u53ea\u662f\u5728 SAMBA \u8fd0\u4f5c\u8fc7\u7a0b\u5f53\u4e2d\u300e\u9884\u8ba1\u300f\u8981\u7ed9\u4f7f\u7528\u8005\u7684\u6743\u9650\u800c\u5df2&#xff0c;\u5e76\u4e0d\u80fd\u53d6\u4ee3\u771f\u6b63\u7684 Linux \u6743\u9650\u5594&#xff01;\u6240\u4ee5&#xff0c;\u4e07\u4e00\u771f\u7684\u53d1\u73b0\u8be5\u95ee\u9898\u5b58\u5728&#xff0c; \u8bf7\u767b\u5165 Linux \u7cfb\u7edf&#xff0c;\u67e5\u9a8c\u4e00\u4e0b\u8be5\u5bf9\u5e94\u7684\u76ee\u5f55\u7684 permission \u5427&#xff01;^_^<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u53e6\u5916&#xff0c;\u901a\u5e38\u9020\u6210\u660e\u660e\u5df2\u7ecf\u67e5\u5230\u5206\u4eab (smbclient -L \u7684\u7ed3\u679c)&#xff0c;\u5374\u8001\u662f\u65e0\u6cd5\u987a\u5229\u6302\u8f7d\u7684\u60c5\u51b5&#xff0c;\u4e3b\u8981\u6709\u5e95\u4e0b\u51e0\u4e2a\u53ef\u80fd\u7684\u539f\u56e0&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u867d\u7136 smb.conf \u8bbe\u5b9a\u6b63\u786e&#xff0c;\u4f46\u662f\u8bbe\u5b9a\u503c\u300e path \u300f\u6240\u6307\u5b9a\u7684\u76ee\u5f55\u5374\u5fd8\u8bb0\u5efa\u7acb\u4e86 (\u6700\u5e38\u89c1\u7684\u5446\u6837&#xff01;)&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u867d\u7136 smb.conf \u8bbe\u5b9a\u4e3a\u53ef\u64e6\u5199&#xff0c;\u4f46\u662f\u76ee\u5f55\u9488\u5bf9\u8be5\u7528\u6237\u7684\u6743\u9650\u5374\u662f\u53ea\u8bfb\u6216\u8005\u662f\u65e0\u6743\u9650&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u867d\u7136\u6743\u9650\u5168\u90e8\u90fd\u6b63\u786e&#xff0c;\u4f46\u662f SELinux \u7684\u7c7b\u578b\u5374\u9519\u8bef\u4e86&#xff01;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u867d\u7136\u5168\u90e8\u7684\u6570\u636e\u90fd\u662f\u6b63\u786e\u7684&#xff0c;\u4f46\u662f SELinux \u7684\u89c4\u5219 (getsebool -a) \u5374\u6ca1\u6709\u987a\u5229\u542f\u52a8\u3002<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e0a\u8ff0\u90fd\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u95ee\u9898&#xff0c;\u66f4\u591a\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u8bf7\u53c2\u8003\u6700\u6b63\u786e\u7684\u767b\u5f55\u6587\u4ef6\u4fe1\u606f\u5427&#xff01; ^_^<\/span><\/span><\/p>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span> <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\u5c0f\u6807\u9898\u7684\u56fe\u793a\" height=\"299\" src=\"2025-04-18ipsvjwpihe0.png\" width=\"534\" \/><\/p>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.5.2 \u8ba9\u4f7f\u7528\u8005\u4fee\u6539 samba \u5bc6\u7801\u540c\u65f6\u540c\u6b65\u66f4\u65b0 \/etc\/shadow \u5bc6\u7801<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6709\u4e2a\u95ee\u9898\u662f&#xff0c;\u6211\u4eec\u77e5\u9053\u4f7f\u7528\u8005\u53ef\u4ee5\u900f\u8fc7 passwd \u4fee\u6539 \/etc\/shadow \u5185\u7684\u5bc6\u7801&#xff0c;\u800c\u4e14\u7528\u6237\u4e5f\u80fd\u591f\u81ea\u884c\u4ee5 smbpasswd \u4fee\u6539 Samba \u7684\u5bc6\u7801\u3002\u5982\u679c\u7528\u6237\u662f\u7c7b\u4f3c PDC \u7684\u7528\u6237&#xff0c;\u90a3\u4e48\u8fd9\u4e9b\u7528\u6237\u7406\u8bba\u4e0a\u5c31\u5f88\u5c11\u4f7f\u7528 Linux \u5566&#xff01;\u90a3\u4e48\u60f3\u4e00\u60f3&#xff0c; \u80fd\u5426\u8ba9\u7528\u6237\u5728\u4fee\u6539 Windows \u5bc6\u7801 (\u5c31\u662f Samba) \u65f6&#xff0c;\u540c\u6b65\u66f4\u65b0 Linux \u4e0a\u9762\u7684 \/etc\/shadow \u5bc6\u7801\u5462&#xff1f; \u7b54\u6848\u662f\u53ef\u884c\u7684\u5566&#xff01;\u800c\u4e14\u52a8\u4f5c\u5e76\u4e0d\u56f0\u96be&#xff5e;\u56e0\u4e3a smb.conf \u91cc\u5934\u5df2\u7ecf\u63d0\u4f9b\u4e86\u76f8\u5bf9\u5e94\u7684\u53c2\u6570\u8bbe\u5b9a\u503c&#xff01;\u4f60\u53ef\u4ee5\u53c2\u8003\u5e95\u4e0b\u7684\u7f51\u7ad9\u6570\u636e&#xff1a;<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/moto.debian.org.tw\/viewtopic.php?t&#061;7732&amp;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">http:\/\/de.samba.org\/samba\/docs\/using_samba\/ch09.html<\/span><\/span><\/li>\n<\/ul>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u9e1f\u54e5\u505a\u4e2a\u603b\u7ed3&#xff0c;\u57fa\u672c\u4e0a\u4f60\u9700\u8981\u7684\u662f smb.conf \u91cc\u9762 [global] \u7684\u51e0\u4e2a\u8bbe\u5b9a\u503c&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[root&#064;www ~]# <span style=\"color:#FFFF00\">vim \/etc\/samba\/smb.conf<\/span><br \/>\n[global]<br \/>\n<span style=\"color:#ff6666\"># \u4fdd\u7559\u524d\u9762\u7684\u5404\u9879\u8bbe\u5b9a\u503c&#xff0c;\u5e76\u65b0\u589e\u5e95\u4e0b\u4e09\u884c\u5373\u53ef&#xff1a;<\/span><br \/>\n<span style=\"color:#FFFF00\">        unix password sync  &#061; yes                <span style=\"color:#777777\">&lt;&#061;&#061;\u8ba9 Samba \u4e0e Linux \u5bc6\u7801\u540c\u6b65<\/span><br \/>\n        passwd program      &#061; \/usr\/bin\/passwd %u <span style=\"color:#777777\">&lt;&#061;&#061;\u4ee5 root \u547c\u53eb\u4fee\u6539\u5bc6\u7801\u7684\u6307\u4ee4<\/span><br \/>\n        pam password change &#061; yes                <span style=\"color:#777777\">&lt;&#061;&#061;\u5e76\u4e14\u652f\u6301 pam \u6a21\u5757&#xff01;<\/span><\/span><\/p>\n<p>[root&#064;www ~]# <span style=\"color:#FFFF00\">testparm<\/span><br \/>\n[root&#064;www ~]# <span style=\"color:#FFFF00\">\/etc\/init.d\/smb restart<\/span><br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u63a5\u4e0b\u6765&#xff0c;\u5f53\u4f60\u4ee5\u4e00\u822c\u7528\u6237 (\u4f8b\u5982 dmtsai) \u4fee\u6539 samba \u7684\u5bc6\u7801\u65f6&#xff0c;\u5c31\u4f1a\u50cf\u8fd9\u6837&#xff1a;<\/span><\/span><\/p>\n<table style=\"width:580px\">\n<tbody>\n<tr>\n<td style=\"background-color:#000000\"> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">[dmtsai&#064;www ~]$ <span style=\"color:#FFFF00\">smbpasswd<\/span><br \/>\nOld SMB password:  <span style=\"color:#777777\">&lt;&#061;&#061;\u5f97\u5148\u8f93\u5165\u65e7\u5bc6\u7801&#xff0c;\u624d\u80fd\u8f93\u5165\u65b0\u5bc6\u7801<\/span><br \/>\nNew SMB password:<br \/>\nRetype new SMB password:<br \/>\nPassword changed for user dmtsai <span style=\"color:#777777\">&lt;&#061;&#061;\u8fd9\u5c31\u662f\u6210\u529f\u7684\u5b57\u6837&#xff01;<\/span><\/p>\n<p><span style=\"color:#ff6666\"># \u82e5\u51fa\u73b0\u5e95\u4e0b\u7684\u5b57\u6837&#xff0c;\u5e94\u8be5\u5c31\u662f\u4f60\u7684\u5bc6\u7801\u8f93\u5165\u88ab\u9650\u5236\u4e86&#xff01;\u4f8b\u5982\u8f93\u5165\u7684\u5bc6\u7801\u5b57\u7b26\u5c11\u4e8e 6 \u4e2a&#xff01;<\/span><br \/>\nmachine 127.0.0.1 rejected the password change: Error was : Password restriction.<br \/>\nFailed to change password for dmtsai<br \/>\n<\/span><\/span><\/span> <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<p> <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><\/span><\/span><br \/>\n <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#0000bb\">16.5.3 \u5229\u7528 ACL \u914d\u5408\u5355\u4e00\u4f7f\u7528\u8005\u65f6\u7684\u63a7\u7ba1<\/span><\/span><\/span> <\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u60f3\u8c61\u4e00\u4e2a\u6848\u4f8b&#xff0c;\u5982\u679c\u4f60\u662f\u5b66\u6821\u7684\u7f51\u7ba1\u4eba\u5458&#xff0c;\u6709\u4e2a\u517c\u4efb\u8001\u5e08\u5411\u4f60\u7533\u8bf7\u8d26\u53f7&#xff0c;\u4e3b\u8981\u662f\u8981\u5728\u5f88\u591a\u73ed\u7ea7\u5185\u53d6\u5f97\u540c\u5b66\u7684\u4e13\u9898\u8d44\u6599\u3002 \u56e0\u4e3a\u8be5\u8001\u5e08\u662f\u517c\u4efb\u7684&#xff0c;\u4f60\u6216\u8bb8\u62c5\u5fc3\u4e00\u4e0d\u5c0f\u5fc3\u8be5\u6559\u5e08\u5c31\u5c06\u540c\u5b66\u7684\u8f9b\u82e6\u8d44\u6599\u7ed9\u9500\u6bc1&#xff0c;\u5012\u4e0d\u662f\u6559\u5e08\u4eec\u6545\u610f\u7684&#xff0c; \u800c\u662f\u5f88\u591a\u65f6\u5019&#8230;\u4e0d\u719f\u561b&#xff01;\u8fd9\u4e2a\u65f6\u5019\u5982\u679c\u4f60\u5c06\u8be5\u8001\u5e08\u52a0\u5165\u540c\u5b66\u7684\u7fa4\u7ec4&#xff0c;\u7136\u540e\u504f\u504f\u540c\u5b66\u4eec\u6240\u5728\u7684\u76ee\u5f55\u662f\u7fa4\u7ec4\u53ef\u5199\u5165\u7684\u8bdd&#xff0c; \u90a3\u4e48\u8be5\u6559\u5e08\u5c31\u80fd\u591f\u62e5\u6709\u53ef\u64e6\u5199\u7684\u6743\u9650\u4e86&#xff0c;\u4e5f\u5c31\u5bb9\u6613\u9020\u6210\u4e00\u4e9b\u83ab\u540d\u7684\u707e\u96be&#xff5e;<\/span><\/span><\/p>\n<p><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u90a3\u8be5\u600e\u4e48\u529e&#xff1f;\u5176\u5b9e\u53ef\u4ee5\u900f\u8fc7 ACL \u6765\u7ba1\u7406\u67d0\u4e2a\u76ee\u5f55\u7684\u5355\u4e00\u7528\u6237\u6743\u529b\u5566&#xff01;\u6240\u4ee5\u8bf4&#xff0c; \u6743\u9650\u7684\u7ba1\u7406\u4e0d\u5fc5\u900f\u8fc7 smb.conf \u7684\u8bbe\u5b9a&#xff0c;\u53ea\u8981\u900f\u8fc7 ACL \u6765\u7ba1\u7406\u5c31\u80fd\u591f\u8fbe\u5230\u4f60\u6240\u9700\u8981\u7684\u76ee\u7684\u4e86\u3002 \u5173\u4e8e ACL \u7684\u8bf4\u660e\u6211\u4eec\u5728\u57fa\u7840\u5b66\u4e60\u7bc7\u7b2c\u4e09\u7248\u7b2c\u5341\u56db\u7ae0\u5df2\u7ecf\u63d0\u8fc7\u4e86&#xff0c; \u8fd9\u91cc\u4e0d\u518d\u5570\u5506&#xff0c;\u8bf7\u81ea\u884c\u524d\u5f80\u67e5\u9605\u5436&#xff01; ^_^<\/span><\/span><\/p>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.6 \u91cd\u70b9\u56de\u987e<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u7531 Tridgell \u5229\u7528\u9006\u5411\u5de5\u7a0b\u5206\u6790\u7f51\u82b3\u5f97\u5230 Server Message Block \u534f\u8bae\u7684\u4ea7\u751f&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u540d\u79f0\u7684\u7531\u6765\u662f\u56e0\u4e3a\u9700\u5305\u542b\u6ca1\u6709\u610f\u4e49\u7684 SMB server \u4e4b\u6545&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u53ef\u4ee5\u8ba9 Linux \u4e0e Windows \u76f4\u63a5\u8fdb\u884c\u6587\u4ef6\u7cfb\u7edf\u7684\u4f7f\u7528&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">SAMBA \u4e3b\u8981\u67b6\u6784\u5728 NetBIOS \u4e0a\u53d1\u5c55\u7684&#xff0c;\u4e14\u4ee5 NetBIOS over TCP\/IP \u514b\u670d NetBIOS \u65e0\u6cd5\u8de8\u8def\u7531\u7684\u95ee\u9898&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u4f7f\u7528\u7684 daemon \u4e3b\u8981\u6709\u7ba1\u7406\u5206\u4eab\u6743\u9650\u7684 smbd \u4ee5\u53ca NetBIOS \u89e3\u6790\u7684 nmbd<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u4f7f\u7528\u7684\u6a21\u5f0f\u4e3b\u8981\u6709\u5355\u673a\u7684 workgroup \u65b9\u5f0f&#xff0c;\u4ee5\u53ca\u7f51\u57df\u63a7\u7ba1\u7684 PDC \u6a21\u5f0f&#xff1b;<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e4b\u6863\u540d\u4e3a smb.conf<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">smb.conf \u5185&#xff0c;\u4e3b\u8981\u533a\u5206\u4e3a [global] \u670d\u52a1\u5668\u6574\u4f53\u8bbe\u5b9a\u4e0e [share] \u5206\u4eab\u7684\u8d44\u6e90\u4e24\u5927\u90e8\u5206<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u4f7f\u7528\u8005\u8d26\u53f7\u63a7\u7ba1\u4e3b\u8981\u7684\u8bbe\u5b9a\u503c\u4e3a security &#061; {share,user,domain} \u7b49<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u5ba2\u6237\u7aef\u53ef\u4f7f\u7528 smbclient \u4ee5\u53ca mount.cifs \u8fdb\u884c\u7f51\u82b3\u7684\u6302\u8f7d<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u65b0\u7248\u7684 Samba \u9ed8\u8ba4\u4f7f\u7528\u6570\u636e\u5e93\u8bb0\u5f55\u5e10\u6237\u4fe1\u606f&#xff0c;\u65b0\u589e\u8d26\u53f7\u7528 pdbedit &#xff0c;\u4fee\u6539\u5bc6\u7801\u5219\u7528 smbpasswd<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">Samba \u4e3b\u8981\u652f\u6301 CUPS \u7684\u6253\u5370\u673a\u670d\u52a1\u5668<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728\u6743\u9650\u63a7\u7ba1\u65b9\u9762&#xff0c;\u6700\u5bb9\u6613\u51fa\u9519\u7684\u4e3a SELinux \u7684\u89c4\u5219\u4e0e\u7c7b\u578b (SELinux type)<\/span><\/span><\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 PDC \u7684\u8bbe\u5b9a\u65b9\u9762&#xff0c;\u7531\u4e8e\u4e0e\u4e3b\u673a\u540d\u76f8\u5173\u6027\u5f88\u9ad8&#xff0c;\u5efa\u8bae\u8bbe\u5b9a lmhosts \u6863\u6848\u5185\u5bb9\u4e3a\u5b9c<\/span><\/span><\/li>\n<\/ul>\n<hr \/>\n<p><span style=\"color:#0000bb\"><span style=\"background-color:#ffffff\">16.7 \u672c\u7ae0\u4e60\u9898<\/span><\/span><\/p>\n<ul>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u4e00\u822c\u6765\u8bf4&#xff0c; SAMBA \u4f7f\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u653e\u7f6e\u5728\u54ea\u91cc&#xff1f;\u6863\u540d\u4e3a\u4f55&#xff1f;<\/span><\/span>\n<p>    <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">\u4f7f\u7528\u7684\u6863\u540d\u4e3a smb.conf &#xff0c;\u901a\u5e38\u4f1a\u653e\u7f6e\u5728 \/etc\/samba\/smb.conf \u91cc\u9762&#xff0c;\u4e0d\u8fc7&#xff0c;\u6700\u597d\u53ef\u4ee5\u4f7f\u7528 rpm -qc packagename \u6765\u67e5\u8be2&#xff01;<\/span><\/span><\/span>\n    <\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u54ea\u4e00\u4e2a\u6307\u4ee4\u53ef\u4ee5\u7528\u6765\u5224\u65ad smb.conf \u8fd9\u4e2a\u914d\u7f6e\u6587\u4ef6\u7684\u6b63\u786e\u6027&#xff1f;<\/span><\/span>\n<p>    <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">\u5f53\u6211\u4eec\u4fee\u6539\u5b8c smb.conf \u4e4b\u540e&#xff0c;\u8bb0\u5f97\u8981\u4ee5 testparm \u6765\u8fdb\u884c samba \u7684\u786e\u8ba4&#xff01;<\/span><\/span><\/span>\n    <\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u54ea\u4e00\u4e2a\u6307\u4ee4\u53ef\u4ee5\u7528\u6765\u5bdf\u770b SAMBA \u4e3b\u673a\u5206\u4eab\u51fa\u4ec0\u4e48\u76ee\u5f55&#xff1f;<\/span><\/span>\n<p>    <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">\u5229\u7528 smbclient \u5373\u53ef&#xff1a;\u300esmbclient -L NetBiosName -U username \u300f&#xff01;<\/span><\/span><\/span>\n    <\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u5728 Linux \u5ba2\u6237\u7aef\u6302\u8f7d\u7f51\u82b3\u7684\u6587\u4ef6\u7cfb\u7edf\u4e3b\u8981\u662f\u4f9d\u636e\u54ea\u4e2a\u6307\u4ee4\u6765\u8fbe\u6210\u7684&#xff1f;<\/span><\/span>\n<p>    <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">\u5c31\u662f\u900f\u8fc7 mount.cifs \u6216 mount -t cifs \u6765\u8fbe\u6210\u7684&#xff01;<\/span><\/span><\/span>\n    <\/li>\n<li><span style=\"color:#000000\"><span style=\"background-color:#ffffff\">\u6211\u4eca\u5929\u4f7f\u7528 smbpasswd \u53bb\u65b0\u589e\u4e00\u4f4d\u4f7f\u7528\u8005 badbird&#xff0c;\u8ba9\u4ed6\u53ef\u4ee5\u767b\u5165\u6211\u7684 Linux SAMBA \u4e3b\u673a&#xff0c;\u4f46\u662f\u65e0\u8bba\u5982\u4f55\u5c31\u662f\u65e0\u6cd5\u65b0\u589e\u3002\u4f60\u8ba4\u4e3a\u539f\u56e0\u53ef\u80fd\u662f\u4ec0\u4e48&#xff1f;<\/span><\/span>\n<p>    <span style=\"color:#000000\"><span style=\"background-color:#ffffff\"><span style=\"color:#ffffff\">\u7531\u4e8e Samba \u7528\u6237\u7684\u4fe1\u606f\u5fc5\u987b\u8981\u5b58\u5728\u4e8e \/etc\/passwd \u91cc\u9762&#xff0c;\u65e2\u7136\u65e0\u6cd5\u65b0\u589e&#xff0c;\u5e94\u8be5\u5148\u786e\u8ba4 badbird \u8fd9\u4e2a\u7528\u6237\u5df2\u7ecf\u5b58\u5728\u4e8e Linux \u7cfb\u7edf\u5f53\u4e2d\u4e86&#xff01;<\/span><\/span><\/span>\n    <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf23\u6b21\u300216.1 \u4ec0\u4e48\u662f SAMBA\u5728\u8fd9\u4e2a\u7ae0\u8282\u4e2d\uff0c\u6211\u4eec\u8981\u6559\u5927\u5bb6\u8df3\u7684\u662f\u70ed\u60c5\u6709\u52b2\u7684\u5df4\u897f SAMBA \u821e\u8e48&#8230; \u5594\u4e0d\uff5e\u641e\u9519\u4e86\uff5e\u662f\u8981\u5411\u5927\u5bb6\u4ecb\u7ecdSAMBA\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u5566\uff01\u54a6\uff01\u602a\u4e86\uff01 \u600e\u4e48\u670d\u52a1\u5668\u7684\u540d\u79f0\u4f1a\u4f7f\u7528 SAMBA \u5462\uff1f\u8fd8\u771f\u662f\u602a\u602a\u7684\u5462\uff01\u90a3\u4e48\u8fd9\u4e2a SAMBA \u670d\u52a1\u5668\u7684\u529f\u80fd\u662f\u4ec0\u4e48\u5462\uff1f\u53e6\u5916\uff0c \u5b83\u6700\u65e9\u662f\u7ecf\u7531\u4ec0\u4e48\u6837\u7684\u60f3\u6cd5\u800c\u5f00\u53d1\u51fa\u6765\u7684\u5462\uff1f\u5e95\u4e0b\u5c31\u8ba9\u6211\u4eec\u6162\u6162\u7684\u8c08\u4e00\u8c08\u5427\uff0116.1.1 SAMBA \u7684\u53d1\u5c55\u5386\u53f2\u4e0e\u540d\u79f0\u7684\u7531\u6765\u5728\u65e9\u671f\u7684\u7f51\u7edc\u4e16\u754c\u5f53\u4e2d\uff0c\u6863\u6848\u6570\u636e\u5728\u4e0d\u540c\u4e3b\u673a\u4e4b\u95f4\u7684\u4f20\u8f93\u5927\u591a\u662f\u4f7f\u7528FTP\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u8f6f\u4ef6\u6765\u8fdb_samba \u670d\u52a1\u5668,\u63d0\u4f9b\u7f51\u82b3\u7684\u7f51\u7edc\u9a71\u52a8\u5668\u529f\u80fd\u3002<\/p>\n","protected":false},"author":2,"featured_media":15211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,995],"topic":[],"class_list":["post-15231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \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\/15231.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf23\u6b21\u300216.1 \u4ec0\u4e48\u662f SAMBA\u5728\u8fd9\u4e2a\u7ae0\u8282\u4e2d\uff0c\u6211\u4eec\u8981\u6559\u5927\u5bb6\u8df3\u7684\u662f\u70ed\u60c5\u6709\u52b2\u7684\u5df4\u897f SAMBA \u821e\u8e48... \u5594\u4e0d\uff5e\u641e\u9519\u4e86\uff5e\u662f\u8981\u5411\u5927\u5bb6\u4ecb\u7ecdSAMBA\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u5566\uff01\u54a6\uff01\u602a\u4e86\uff01 \u600e\u4e48\u670d\u52a1\u5668\u7684\u540d\u79f0\u4f1a\u4f7f\u7528 SAMBA \u5462\uff1f\u8fd8\u771f\u662f\u602a\u602a\u7684\u5462\uff01\u90a3\u4e48\u8fd9\u4e2a SAMBA \u670d\u52a1\u5668\u7684\u529f\u80fd\u662f\u4ec0\u4e48\u5462\uff1f\u53e6\u5916\uff0c \u5b83\u6700\u65e9\u662f\u7ecf\u7531\u4ec0\u4e48\u6837\u7684\u60f3\u6cd5\u800c\u5f00\u53d1\u51fa\u6765\u7684\u5462\uff1f\u5e95\u4e0b\u5c31\u8ba9\u6211\u4eec\u6162\u6162\u7684\u8c08\u4e00\u8c08\u5427\uff0116.1.1 SAMBA \u7684\u53d1\u5c55\u5386\u53f2\u4e0e\u540d\u79f0\u7684\u7531\u6765\u5728\u65e9\u671f\u7684\u7f51\u7edc\u4e16\u754c\u5f53\u4e2d\uff0c\u6863\u6848\u6570\u636e\u5728\u4e0d\u540c\u4e3b\u673a\u4e4b\u95f4\u7684\u4f20\u8f93\u5927\u591a\u662f\u4f7f\u7528FTP\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u8f6f\u4ef6\u6765\u8fdb_samba \u670d\u52a1\u5668,\u63d0\u4f9b\u7f51\u82b3\u7684\u7f51\u7edc\u9a71\u52a8\u5668\u529f\u80fd\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/15231.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-18T13:49:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134925-68025865dc581.jpg\" \/>\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=\"43 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15231.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/15231.html\",\"name\":\"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T13:49:32+00:00\",\"dateModified\":\"2025-04-18T13:49:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/15231.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/15231.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/15231.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668\"}]},{\"@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":"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \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\/15231.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e35\u6b21\uff0c\u6536\u85cf23\u6b21\u300216.1 \u4ec0\u4e48\u662f SAMBA\u5728\u8fd9\u4e2a\u7ae0\u8282\u4e2d\uff0c\u6211\u4eec\u8981\u6559\u5927\u5bb6\u8df3\u7684\u662f\u70ed\u60c5\u6709\u52b2\u7684\u5df4\u897f SAMBA \u821e\u8e48... \u5594\u4e0d\uff5e\u641e\u9519\u4e86\uff5e\u662f\u8981\u5411\u5927\u5bb6\u4ecb\u7ecdSAMBA\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u5566\uff01\u54a6\uff01\u602a\u4e86\uff01 \u600e\u4e48\u670d\u52a1\u5668\u7684\u540d\u79f0\u4f1a\u4f7f\u7528 SAMBA \u5462\uff1f\u8fd8\u771f\u662f\u602a\u602a\u7684\u5462\uff01\u90a3\u4e48\u8fd9\u4e2a SAMBA \u670d\u52a1\u5668\u7684\u529f\u80fd\u662f\u4ec0\u4e48\u5462\uff1f\u53e6\u5916\uff0c \u5b83\u6700\u65e9\u662f\u7ecf\u7531\u4ec0\u4e48\u6837\u7684\u60f3\u6cd5\u800c\u5f00\u53d1\u51fa\u6765\u7684\u5462\uff1f\u5e95\u4e0b\u5c31\u8ba9\u6211\u4eec\u6162\u6162\u7684\u8c08\u4e00\u8c08\u5427\uff0116.1.1 SAMBA \u7684\u53d1\u5c55\u5386\u53f2\u4e0e\u540d\u79f0\u7684\u7531\u6765\u5728\u65e9\u671f\u7684\u7f51\u7edc\u4e16\u754c\u5f53\u4e2d\uff0c\u6863\u6848\u6570\u636e\u5728\u4e0d\u540c\u4e3b\u673a\u4e4b\u95f4\u7684\u4f20\u8f93\u5927\u591a\u662f\u4f7f\u7528FTP\u8fd9\u4e2a\u597d\u7528\u7684\u670d\u52a1\u5668\u8f6f\u4ef6\u6765\u8fdb_samba \u670d\u52a1\u5668,\u63d0\u4f9b\u7f51\u82b3\u7684\u7f51\u7edc\u9a71\u52a8\u5668\u529f\u80fd\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/15231.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T13:49:32+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418134925-68025865dc581.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"43 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/15231.html","url":"https:\/\/www.wsisp.com\/helps\/15231.html","name":"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T13:49:32+00:00","dateModified":"2025-04-18T13:49:32+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/15231.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/15231.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/15231.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7b2c\u5341\u516d\u7ae0\u3001\u6587\u4ef6\u670d\u52a1\u5668\u4e4b\u4e8c\uff1a SAMBA \u670d\u52a1\u5668"}]},{"@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\/15231","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=15231"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/15231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/15211"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=15231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=15231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=15231"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=15231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}