{"id":291359,"date":"2024-05-03T23:05:19","date_gmt":"2024-05-03T15:05:19","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=291359"},"modified":"2024-08-01T14:04:33","modified_gmt":"2024-08-01T06:04:33","slug":"learing-linux-12","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/learing-linux-12.html","title":{"rendered":"\u7b2c12\u7ae0 \u4f7f\u7528Samba\u6216NFS\u5b9e\u73b0\u6587\u4ef6\u5171\u4eab"},"content":{"rendered":"

\u7ae0\u8282\u7b80\u8ff0\uff1a<\/strong><\/span><\/p>\n

\u672c\u7ae0\u9996\u5148\u901a\u8fc7\u6bd4\u8f83\u6587\u4ef6\u4f20\u8f93\u548c\u6587\u4ef6\u5171\u4eab\u8fd9\u4e24\u79cd\u8d44\u6e90\u4ea4\u6362\u65b9\u5f0f\uff0c\u5f15\u5165Samba\u670d\u52a1\u7684\u7406\u8bba\u77e5\u8bc6\uff0c\u4ecb\u7ecdSMB\u534f\u8bae\u4e0eSamba\u670d\u52a1\u7a0b\u5e8f\u7684\u8d77\u6e90\u548c\u53d1\u5c55\u8fc7\u7a0b\u3002\u7136\u540e\u901a\u8fc7\u5b9e\u9a8c\u90e8\u7f72\u6587\u4ef6\u5171\u4eab\u670d\u52a1\uff0c\u6df1\u5165\u4e86\u89e3Samba\u670d\u52a1\u4e2d\u76f8\u5173\u53c2\u6570\u7684\u4f5c\u7528\uff0c\u5e76\u5728\u5b9e\u9a8c\u6700\u540e\u5206\u522b\u4f7f\u7528Windows\u7cfb\u7edf\u548cLinux\u7cfb\u7edf\u8bbf\u95ee\u5171\u4eab\u7684\u6587\u4ef6\u8d44\u6e90\uff0c\u786e\u4fdd\u8bfb\u8005\u638c\u63e1\u6587\u4ef6\u5171\u4eab\u670d\u52a1\u7684\u914d\u7f6e\u65b9\u6cd5\u3002<\/p>\n

\u672c\u7ae0\u8fd8\u8bb2\u89e3\u4e86\u5982\u4f55\u914d\u7f6e\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff08Network File System\uff0cNFS\uff09\u670d\u52a1\uff0c\u4ee5\u7b80\u5316Linux\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\u5de5\u4f5c\uff0c\u5e76\u901a\u8fc7\u90e8\u7f72NFS\u670d\u52a1\u5728\u591a\u53f0Linux\u7cfb\u7edf\u4e4b\u95f4\u6302\u8f7d\u548c\u4f7f\u7528\u8d44\u6e90\u3002\u5728\u7ba1\u7406\u8bbe\u5907\u6302\u8f7d\u4fe1\u606f\u65f6\uff0c\u4f7f\u7528autofs\u670d\u52a1\u4e0d\u4ec5\u53ef\u4ee5\u6ee1\u8db3\u8bbe\u5907\u6302\u8f7d\u9700\u6c42\uff0c\u8fd8\u80fd\u8fdb\u4e00\u6b65\u63d0\u9ad8\u670d\u52a1\u5668\u786c\u4ef6\u8d44\u6e90\u548c\u7f51\u7edc\u5e26\u5bbd\u7684\u5229\u7528\u7387\u3002<\/p>\n

\u5218\u9044\u8001\u5e08\u76f8\u4fe1\uff0c\u5f53\u5404\u4f4d\u8bfb\u8005\u8ba4\u771f\u5b66\u4e60\u5b8c\u672c\u7ae0\u5185\u5bb9\u4e4b\u540e\uff0c\u4e00\u5b9a\u4f1a\u6df1\u523b\u7406\u89e3\u5728Linux\u7cfb\u7edf\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u8d44\u6e90\u4ee5\u53ca\u5728Linux\u7cfb\u7edf\u4e0eWindows\u7cfb\u7edf\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u8d44\u6e90\u7684\u5de5\u4f5c\u673a\u5236\uff0c\u5e76\u5f7b\u5e95\u638c\u63e1\u76f8\u5e94\u7684\u914d\u7f6e\u65b9\u6cd5\u3002<\/p>\n

12.1 SAMBA\u6587\u4ef6\u5171\u4eab\u670d\u52a1<\/strong><\/span><\/h5>\n

\u4e0a\u4e00\u7ae0\u8bb2\u89e3\u7684FTP\u6587\u4ef6\u4f20\u8f93\u670d\u52a1\u786e\u5b9e\u53ef\u4ee5\u8ba9\u4e3b\u673a\u4e4b\u95f4\u7684\u6587\u4ef6\u4f20\u8f93\u53d8\u5f97\u7b80\u5355\u65b9\u4fbf\uff0c\u4f46FTP\u534f\u8bae\u7684\u672c\u8d28\u662f\u4f20\u8f93\u6587\u4ef6\uff0c\u800c\u975e\u5171\u4eab\u6587\u4ef6\uff0c\u56e0\u6b64\u8981\u60f3\u901a\u8fc7\u5ba2\u6237\u7aef\u76f4\u63a5\u5728\u670d\u52a1\u5668\u4e0a\u4fee\u6539\u6587\u4ef6\u5185\u5bb9\u8fd8\u662f\u4e00\u4ef6\u6bd4\u8f83\u9ebb\u70e6\u7684\u4e8b\u60c5\u3002<\/p>\n

1987\u5e74\uff0c\u5fae\u8f6f\u516c\u53f8\u548c\u82f1\u7279\u5c14\u516c\u53f8\u5171\u540c\u5236\u5b9a\u4e86SMB\uff08Server Messages Block\uff0c\u670d\u52a1\u5668\u6d88\u606f\u5757\uff09\u534f\u8bae\uff0c\u65e8\u5728\u89e3\u51b3\u5c40\u57df\u7f51\u5185\u7684\u6587\u4ef6\u6216\u6253\u5370\u673a\u7b49\u8d44\u6e90\u7684\u5171\u4eab\u95ee\u9898\uff0c\u8fd9\u4f7f\u5f97\u5728\u591a\u4e2a\u4e3b\u673a\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u53d8\u5f97\u8d8a\u6765\u8d8a\u7b80\u5355\u3002\u5230\u4e861991\u5e74\uff0c\u5f53\u65f6\u8fd8\u5728\u8bfb\u5927\u5b66\u7684Tridgwell\u4e3a\u4e86\u89e3\u51b3Linux\u7cfb\u7edf\u4e0eWindows\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\u95ee\u9898\uff0c\u57fa\u4e8eSMB\u534f\u8bae\u5f00\u53d1\u51fa\u4e86SMBServer\u670d\u52a1\u7a0b\u5e8f\u3002\u8fd9\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u6587\u4ef6\u5171\u4eab\u8f6f\u4ef6\uff0c\u7ecf\u8fc7\u7b80\u5355\u914d\u7f6e\u5373\u53ef\u5b9e\u73b0Linux\u7cfb\u7edf\u4e0eWindows\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\u5de5\u4f5c\u3002\u5f53\u65f6\uff0cTridgwell\u60f3\u628a\u8fd9\u6b3e\u8f6f\u4ef6\u7684\u540d\u5b57SMBServer\u6ce8\u518c\u6210\u4e3a\u5546\u6807\uff0c\u4f46\u88ab\u5546\u6807\u5c40\u4ee5\u201cSMB\u662f\u6ca1\u6709\u610f\u4e49\u7684\u5b57\u7b26\u201d\u4e3a\u7531\u62d2\u7edd\u4e86\u7533\u8bf7\u3002\u540e\u6765\uff0cTridgwell\u4e0d\u65ad\u7ffb\u770b\u8bcd\u5178\uff0c\u7a81\u7136\u770b\u5230\u4e00\u4e2a\u62c9\u4e01\u821e\u8e48\u7684\u540d\u5b57\u2014Samba\uff0c\u800c\u8fd9\u4e2a\u70ed\u60c5\u6d0b\u6ea2\u7684\u821e\u8e48\u540d\u5b57\u4e2d\u6070\u597d\u5305\u542b\u4e86\u201cSMB\u201d\uff0c\u4e8e\u662fSamba\u670d\u52a1\u7a0b\u5e8f\u7684\u540d\u5b57\u7531\u6b64\u8bde\u751f\uff08\u89c1\u56fe12-1\uff09\u3002Samba\u670d\u52a1\u7a0b\u5e8f\u73b0\u5728\u5df2\u7ecf\u6210\u4e3a\u5728Linux\u7cfb\u7edf\u4e0eWindows\u7cfb\u7edf\u4e4b\u95f4\u5171\u4eab\u6587\u4ef6\u7684\u6700\u4f73\u9009\u62e9\u3002<\/p>\n

\"samba\u670d\u52a1logo\"<\/p>\n

\u56fe12-1\u00a0 Samba\u670d\u52a1\u7a0b\u5e8f\u7684logo<\/p>\n

\n

Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u65b9\u6cd5\u4e0e\u4e4b\u524d\u8bb2\u89e3\u7684\u5f88\u591a\u670d\u52a1\u7684\u914d\u7f6e\u65b9\u6cd5\u7c7b\u4f3c\uff0c\u9996\u5148\u9700\u8981\u5148\u901a\u8fc7\u8f6f\u4ef6\u4ed3\u5e93\u6765\u5b89\u88c5Samba\u670d\u52a1\u7a0b\u5e8f\uff08Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u540d\u5b57\u4e5f\u6070\u5de7\u662f\u8f6f\u4ef6\u5305\u7684\u540d\u5b57\uff09\u3002\u987a\u5e26\u518d\u5b89\u88c5\u4e00\u4e2asamba-client\u8f6f\u4ef6\u5305\uff0c\u8fd9\u662f\u4e00\u4f1a\u513f\u7528\u4e8e\u6d4b\u8bd5\u5171\u4eab\u76ee\u5f55\u7684\u5ba2\u6237\u7aef\u7a0b\u5e8f\uff1a<\/p>\n

[root@linuxprobe ~]# dnf install samba samba-client\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nLast metadata expiration check: 0:00:17 ago on Fri 05 Mar 2021 04:54:36 PM CST.\r\nDependencies resolved.\r\n========================================================================================\r\n Package                     Arch            Version              Repository       Size\r\n========================================================================================\r\nInstalling:\r\n samba                       x86_64          4.9.1-8.el8          BaseOS          708 k\r\n samba-client                x86_64          4.9.1-8.el8          BaseOS          636 k\r\nInstalling dependencies:\r\n samba-common-tools          x86_64          4.9.1-8.el8          BaseOS          461 k\r\n samba-libs                  x86_64          4.9.1-8.el8          BaseOS          177 k\r\n\r\nTransaction Summary\r\n========================================================================================\r\nInstall  4 Packages\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\nInstalled:\r\n  samba-4.9.1-8.el8.x86_64                      samba-client-4.9.1-8.el8.x86_64        \r\n  samba-common-tools-4.9.1-8.el8.x86_64         samba-libs-4.9.1-8.el8.x86_64          \r\n\r\nComplete!\r\n<\/pre>\n

\u5b89\u88c5\u5b8c\u6bd5\u540e\u6253\u5f00Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\uff0c\u597d\u5728\u53c2\u6570\u5e76\u4e0d\u591a\uff0c\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u53ea\u670937\u884c\u3002\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u5176\u4e2d\u7b2c17\uff5e22\u884c\u4ee3\u8868\u5171\u4eab\u6bcf\u4f4d\u767b\u5f55\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u5185\u5bb9\u3002\u867d\u7136\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u8fd9\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u5171\u4eab\u6587\u4ef6\uff0c\u4f46\u8fd9\u4e2a\u9ed8\u8ba4\u64cd\u4f5c\u7740\u5b9e\u6709\u4e9b\u5371\u9669\uff0c\u5efa\u8bae\u4e0d\u8981\u5171\u4eab\uff0c\u5c06\u5176\u5220\u9664\u6389\u3002\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u7b2c24\uff5e29\u884c\u662f\u7528SMB\u534f\u8bae\u5171\u4eab\u672c\u5730\u7684\u6253\u5370\u673a\u8bbe\u5907\uff0c\u65b9\u4fbf\u5c40\u57df\u7f51\u5185\u7684\u7528\u6237\u8fdc\u7a0b\u4f7f\u7528\u6253\u5370\u673a\u8bbe\u5907\u3002\u5f53\u524d\u6211\u4eec\u6ca1\u6709\u6253\u5370\u673a\u8bbe\u5907\uff0c\u56e0\u6b64\u5efa\u8bae\u4e5f\u5c06\u5176\u5220\u9664\u6389\uff0c\u4e0d\u5171\u4eab\u3002\u6700\u540e\u7684\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u7b2c31\uff5e37\u884c\u4f9d\u7136\u4e3a\u5171\u4eab\u6253\u5370\u673a\u8bbe\u5907\u7684\u53c2\u6570\uff0c\u540c\u6837\u5efa\u8bae\u4e88\u4ee5\u5220\u9664\u3002<\/p>\n

[root@linuxprobe ~]# vim \/etc\/samba\/smb.conf\r\n  1 # See smb.conf.example for a more detailed config file or\r\n  2 # read the smb.conf manpage.\r\n  3 # Run 'testparm' to verify the config is correct after\r\n  4 # you modified it.\r\n  5 \r\n  6 [global]\r\n  7         workgroup = SAMBA\r\n  8         security = user\r\n  9 \r\n 10         passdb backend = tdbsam\r\n 11 \r\n 12         printing = cups\r\n 13         printcap name = cups\r\n 14         load printers = yes\r\n 15         cups options = raw\r\n 16 \r\n 17 [homes]<\/del>\r\n 18         comment = Home Directories<\/del>\r\n 19         valid users = %S, %D%w%S<\/del>\r\n 20         browseable = No<\/del>\r\n 21         read only = No<\/del>\r\n 22         inherit acls = Yes<\/del>\r\n 23 \r\n 24 [printers]<\/del>\r\n 25         comment = All Printers<\/del>\r\n 26         path = \/var\/tmp<\/del>\r\n 27         printable = Yes<\/del>\r\n 28         create mask = 0600<\/del>\r\n 29         browseable = No<\/del>\r\n 30 \r\n 31 [print$]<\/del>\r\n 32         comment = Printer Drivers<\/del>\r\n 33         path = \/var\/lib\/samba\/drivers<\/del>\r\n 34         write list = @printadmin root<\/del>\r\n 35         force group = @printadmin<\/del>\r\n 36         create mask = 0664<\/del>\r\n 37         directory mask = 0775<\/del><\/pre>\n<\/div>\n

\u5728\u5bf9Samba\u670d\u52a1\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u4e00\u987f\u5220\u51cf\u64cd\u4f5c\u4e4b\u540e\uff0c\u6700\u540e\u7684\u6709\u6548\u914d\u7f6e\u53c2\u6570\u53ea\u5269\u4e0b\u4e86\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>8\u884c\u3002\u6240\u5269\u4e0d\u591a\u7684\u53c2\u6570\u4e2d\uff0c\u8fd8\u80fd\u7ee7\u7eed\u5220\u9664\u4e0d\u9700\u8981\u7684\u53c2\u6570\u3002\u4f8b\u5982\uff0c\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u7b2c5\uff5e8\u884c\u53c2\u6570\u4e2d\u6240\u63d0\u5230\u7684cups\u7684\u5168\u79f0\u4e3aCommon UNIX Printing System\uff08\u901a\u7528UNIX\u6253\u5370\u7cfb\u7edf\uff09\uff0c\u4f9d\u7136\u662f\u7528\u4e8e\u6253\u5370\u673a\u6216\u6253\u5370\u670d\u52a1\u5668\u7684\uff0c\u7ee7\u7eed\u4e88\u4ee5\u5220\u9664\u3002<\/p>\n

[root@linuxprobe ~]# cat \/etc\/samba\/smb.conf\r\n  1 [global]\r\n  2         workgroup = SAMBA\r\n  3         security = user\r\n  4         passdb backend = tdbsam\r\n  5         printing = cups<\/del>\r\n  6         printcap name = cups<\/del>\r\n  7         load printers = yes<\/del>\r\n  8         cups options = raw\r\n<\/del><\/pre>\n
\n
\n

Tips<\/strong><\/h3>\n<\/div>\n
\n

\u5220\u9664\u6389\u4e0d\u9700\u8981\u7684\u4ee3\u7801\u662f\u5e38\u89c4\u64cd\u4f5c\u3002\u901a\u8fc7\u5173\u95ed\u975e\u5fc5\u8981\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u8ba9\u670d\u52a1\u7a0b\u5e8f\u201c\u8f7b\u88c5\u524d\u8fdb\u201d\uff0c\u8ba9\u670d\u52a1\u7a0b\u5e8f\u628a\u786c\u4ef6\u8d44\u6e90\u90fd\u7528\u5230\u5200\u5203\u4e0a\uff0c\u4f7f\u5176\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u3002\u800c\u4e14\uff0c\u8fd8\u80fd\u8ba9\u8fd0\u7ef4\u4eba\u5458\u66f4\u5feb\u5730\u627e\u5230\u6240\u9700\u7684\u4ee3\u7801\u3002\u4e0e100\u884c\u4ee3\u7801\u76f8\u6bd4\uff0c\u4ece10\u884c\u4ee3\u7801\u4e2d\u627e\u5230\u4e00\u4e2a\u53c2\u6570\u8981\u5bb9\u6613\u5f88\u591a\u3002\u6240\u4ee5\u53ea\u8981\u5bf9\u53c2\u6570\u6709\u6b63\u786e\u7684\u8ba4\u8bc6\uff0c\u90a3\u4e48\u5c31\u5927\u80c6\u5730\u64cd\u4f5c\u5427\uff01<\/p>\n<\/div>\n<\/div>\n

\u4e3a\u4e86\u907f\u514d\u5728\u5de5\u4f5c\u4e2d\u4f7f\u7528\u5230\u4e86\u6253\u5370\u673a\u670d\u52a1\u800c\u4e0d\u77e5\u5982\u4f55\u914d\u7f6e\uff0c\u4e0b\u9762\u5bf9\u4e0a\u8ff0\u4ee3\u7801\u8fdb\u884c\u8be6\u7ec6\u7684\u6ce8\u91ca\u8bf4\u660e\uff08\u89c1\u886812-1\uff09\uff0c\u5927\u5bb6\u53ef\u4ee5\u7559\u5b58\u5907\u67e5\u3002<\/p>\n

\u886812-1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Samba\u670d\u52a1\u7a0b\u5e8f\u4e2d\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n

\u3010\u6539\u6539\u6539\u3011<\/span><\/strong><\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u884c\u6570<\/td>\n\u53c2\u6570<\/td>\n\u4f5c\u7528<\/td>\n<\/tr>\n
1<\/td>\n# See smb.conf.example for a more detailed config file or<\/td>\n\u6ce8\u91ca\u4fe1\u606f<\/td>\n<\/tr>\n
2<\/td>\n# read the smb.conf manpage.<\/td>\n<\/tr>\n
3<\/td>\n# Run 'testparm' to verify the config is correct after<\/td>\n<\/tr>\n
4<\/td>\n# you modified it.<\/td>\n<\/tr>\n
5<\/td>\n[global]<\/td>\n\u5168\u5c40\u53c2\u6570<\/td>\n<\/tr>\n
6<\/td>\nworkgroup = SAMBA<\/td>\n\u5de5\u4f5c\u7ec4\u540d\u79f0<\/td>\n<\/tr>\n
7<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
8<\/td>\nsecurity = user<\/td>\n\u5b89\u5168\u9a8c\u8bc1\u7684\u65b9\u5f0f\uff0c\u603b\u5171\u67094\u79cd<\/td>\n<\/tr>\n
9<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
10<\/td>\npassdb backend = tdbsam<\/td>\n\u5b9a\u4e49\u7528\u6237\u540e\u53f0\u7684\u7c7b\u578b\uff0c\u603b\u5171\u67093\u79cd<\/td>\n<\/tr>\n
11<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
12<\/td>\nprinting = cups<\/td>\n\u6253\u5370\u670d\u52a1\u534f\u8bae<\/td>\n<\/tr>\n
13<\/td>\nprintcap name = cups<\/td>\n\u6253\u5370\u670d\u52a1\u540d\u79f0<\/td>\n<\/tr>\n
14<\/td>\nload printers = yes<\/td>\n\u662f\u5426\u52a0\u8f7d\u6253\u5370\u673a<\/td>\n<\/tr>\n
15<\/td>\ncups options = raw<\/td>\n\u6253\u5370\u673a\u7684\u9009\u9879<\/td>\n<\/tr>\n
16<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
17<\/td>\n[homes]<\/td>\n\u5171\u4eab\u540d\u79f0<\/td>\n<\/tr>\n
18<\/td>\ncomment = Home Directories<\/p>\n<\/td>\n\u63cf\u8ff0\u4fe1\u606f<\/td>\n<\/tr>\n
19<\/td>\nvalid users = %S, %D%w%S<\/td>\n\u53ef\u7528\u8d26\u6237<\/td>\n<\/tr>\n
20<\/td>\nbrowseable = No<\/td>\n\u6307\u5b9a\u5171\u4eab\u4fe1\u606f\u662f\u5426\u5728\u201c\u7f51\u4e0a\u90bb\u5c45\u201d\u4e2d\u53ef\u89c1<\/td>\n<\/tr>\n
21<\/td>\nread only = No<\/td>\n\u662f\u5426\u53ea\u8bfb<\/td>\n<\/tr>\n
22<\/td>\ninherit acls = Yes<\/td>\n\u662f\u5426\u7ee7\u627f\u8bbf\u95ee\u63a7\u5236\u5217\u8868<\/td>\n<\/tr>\n
23<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
24<\/td>\n[printers]<\/td>\n\u5171\u4eab\u540d\u79f0<\/td>\n<\/tr>\n
25<\/td>\ncomment = All Printers<\/td>\n\u63cf\u8ff0\u4fe1\u606f<\/td>\n<\/tr>\n
26<\/td>\npath = \/var\/tmp<\/td>\n\u5171\u4eab\u8def\u5f84<\/td>\n<\/tr>\n
27<\/td>\nprintable = Yes<\/td>\n\u662f\u5426\u53ef\u6253\u5370<\/td>\n<\/tr>\n
28<\/td>\ncreate mask = 0600<\/td>\n\u6587\u4ef6\u6743\u9650<\/td>\n<\/tr>\n
29<\/td>\nbrowseable = No<\/td>\n\u6307\u5b9a\u5171\u4eab\u4fe1\u606f\u662f\u5426\u5728\u201c\u7f51\u4e0a\u90bb\u5c45\u201d\u4e2d\u53ef\u89c1<\/td>\n<\/tr>\n
30<\/td>\n<\/td>\n<\/td>\n<\/tr>\n
31<\/td>\n[print$]<\/td>\n\u5171\u4eab\u540d\u79f0<\/td>\n<\/tr>\n
32<\/td>\ncomment = Printer Drivers<\/td>\n\u63cf\u8ff0\u4fe1\u606f<\/td>\n<\/tr>\n
33<\/td>\npath = \/var\/lib\/samba\/drivers<\/td>\n\u5171\u4eab\u8def\u5f84<\/td>\n<\/tr>\n
34<\/td>\nwrite list = @printadmin root<\/td>\n\u53ef\u5199\u5165\u6587\u4ef6\u7684\u7528\u6237\u5217\u8868<\/td>\n<\/tr>\n
35<\/td>\nforce group = @printadmin<\/td>\n\u7528\u6237\u7ec4\u5217\u8868<\/td>\n<\/tr>\n
36<\/td>\n create mask = 0664<\/td>\n\u6587\u4ef6\u6743\u9650<\/td>\n<\/tr>\n
37<\/td>\ndirectory mask = 0775<\/td>\n\u76ee\u5f55\u6743\u9650<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0csecurity\u53c2\u6570\u4ee3\u8868\u7528\u6237\u767b\u5f55Samba\u670d\u52a1\u65f6\u91c7\u7528\u7684\u9a8c\u8bc1\u65b9\u5f0f\u3002\u603b\u5171\u6709\u56db\u79cd\u53ef\u7528\u53c2\u6570\uff1a<\/p>\n

share<\/strong>\uff1a\u4e3b\u673a\u65e0\u987b\u9a8c\u8bc1\u5bc6\u7801\u3002\u8fd9\u76f8\u5f53\u4e8evsftpd\u670d\u52a1\u7684\u533f\u540d\u516c\u5f00\u8bbf\u95ee\u6a21\u5f0f\uff0c\u867d\u7136\u65b9\u4fbf\uff0c\u4f46\u5b89\u5168\u6027\u5f88\u5dee\u3002<\/p>\n

user<\/strong>\uff1a\u767b\u5f55Samba\u670d\u52a1\u65f6\u9700\u8981\u4f7f\u7528\u8d26\u53f7\u5bc6\u7801\u8fdb\u884c\u9a8c\u8bc1\uff0c\u901a\u8fc7\u540e\u624d\u80fd\u83b7\u53d6\u5230\u6587\u4ef6\u3002\u8fd9\u662f\u9ed8\u8ba4\u7684\u9a8c\u8bc1\u65b9\u5f0f\uff0c\u6700\u4e3a\u5e38\u7528\u3002<\/p>\n

domain<\/strong>\uff1a\u901a\u8fc7\u57df\u63a7\u5236\u5668\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\uff0c\u7528\u6765\u9650\u5236\u7528\u6237\u7684\u6765\u6e90\u57df\u3002<\/p>\n

server<\/strong>\uff1a\u4f7f\u7528\u72ec\u7acb\u4e3b\u673a\u9a8c\u8bc1\u6765\u8bbf\u7528\u6237\u63d0\u4f9b\u7684\u5bc6\u7801\uff0c\u8fd9\u76f8\u5f53\u4e8e\u96c6\u4e2d\u7ba1\u7406\u8d26\u53f7\uff0c\u5e76\u4e0d\u5e38\u7528\u3002<\/p><\/blockquote>\n

\u5728\u6700\u65e9\u671f\u7684RHEL\/CentOS\u7cfb\u7edf\u4e2d\uff0cSamba\u670d\u52a1\u4f7f\u7528\u7684\u662fPAM\uff08\u53ef\u63d2\u62d4\u8ba4\u8bc1\u6a21\u5757\uff09\u6765\u8c03\u7528\u672c\u5730\u8d26\u53f7\u548c\u5bc6\u7801\u4fe1\u606f\u3002\u540e\u6765\u57285\u30016\u7248\u672c\u4e2d\uff0c\u66ff\u6362\u6210\u4e86\u7528smbpasswd\u547d\u4ee4\u6765\u8bbe\u7f6e\u72ec\u7acb\u7684Samba\u670d\u52a1\u8d26\u53f7\u548c\u5bc6\u7801\u3002\u5230\u4e86RHEL 7\u7248\u672c\uff0c\u4f20\u7edf\u7684\u9a8c\u8bc1\u65b9\u5f0f\u53c8\u8fdb\u884c\u4e86\u4e00\u6b21\u6539\u9769\uff0c\u6539\u4e3a\u4f7f\u7528tdbsam\u6570\u636e\u5e93\u8fdb\u884c\u9a8c\u8bc1\u3002tdbsam\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u4fdd\u5b58Samba\u670d\u52a1\u8d26\u53f7\u5bc6\u7801\u7684\u6570\u636e\u5e93\uff0c\u7528\u6237\u9700\u8981\u4f7f\u7528pdbedit\u547d\u4ee4\u8fdb\u884c\u72ec\u7acb\u7684\u6dfb\u52a0\u64cd\u4f5c\uff0c\u4e0b\u6587\u4e2d\u4f1a\u6709\u5b9e\u6218\u6f14\u793a\u3002<\/p>\n

12.1.1 \u914d\u7f6e\u5171\u4eab\u8d44\u6e90<\/strong><\/span><\/h6>\n

Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e0e\u4e4b\u524d\u5b66\u4e60\u7684Apache\u670d\u52a1\u5f88\u76f8\u4f3c\uff0c\u5305\u62ec\u5168\u5c40\u914d\u7f6e\u53c2\u6570\u548c\u533a\u57df\u914d\u7f6e\u53c2\u6570\u3002\u5168\u5c40\u914d\u7f6e\u53c2\u6570\u7528\u4e8e\u8bbe\u7f6e\u6574\u4f53\u7684\u8d44\u6e90\u5171\u4eab\u73af\u5883\uff0c\u5bf9\u6bcf\u4e00\u4e2a\u72ec\u7acb\u7684\u5171\u4eab\u8d44\u6e90\u90fd\u6709\u6548\u3002\u533a\u57df\u914d\u7f6e\u53c2\u6570\u5219\u7528\u4e8e\u8bbe\u7f6e\u5355\u72ec\u7684\u5171\u4eab\u8d44\u6e90\uff0c\u4ec5\u5bf9\u8be5\u8d44\u6e90\u6709\u6548\u3002\u521b\u5efa\u5171\u4eab\u8d44\u6e90\u7684\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u53ea\u8981\u5c06\u886812-2\u4e2d\u7684\u53c2\u6570\u5199\u5165\u5230Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u91cd\u542f\u8be5\u670d\u52a1\u5373\u53ef\u3002<\/p>\n

\u886812-2\u00a0\u00a0\u00a0 \u7528\u4e8e\u8bbe\u7f6eSamba\u670d\u52a1\u7a0b\u5e8f\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n\n\n\n\n\n\n\n\n
\u53c2\u6570<\/td>\n\u4f5c\u7528<\/td>\n<\/tr>\n
[database]<\/td>\n\u5171\u4eab\u540d\u79f0\u4e3adatabase<\/td>\n<\/tr>\n
comment =\u00a0Do not arbitrarily modify the database file<\/td>\n\u8b66\u544a\u7528\u6237\u4e0d\u8981\u968f\u610f\u4fee\u6539\u6570\u636e\u5e93<\/td>\n<\/tr>\n
path = \/home\/database<\/td>\n\u5171\u4eab\u76ee\u5f55\u4e3a\/home\/database<\/td>\n<\/tr>\n
public = no<\/td>\n\u5173\u95ed\u201c\u6240\u6709\u4eba\u53ef\u89c1\u201d<\/td>\n<\/tr>\n
writable = yes<\/td>\n\u5141\u8bb8\u5199\u5165\u64cd\u4f5c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

\u7b2c1\u6b65<\/strong>\uff1a\u521b\u5efa\u7528\u4e8e\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\u7684\u8d26\u6237\u4fe1\u606f\u3002\u5728RHEL 10\u7cfb\u7edf\u4e2d\uff0cSamba\u670d\u52a1\u7a0b\u5e8f\u9ed8\u8ba4\u4f7f\u7528\u7684\u662f\u7528\u6237\u5bc6\u7801\u8ba4\u8bc1\u6a21\u5f0f\uff08user\uff09\u3002\u8fd9\u79cd\u8ba4\u8bc1\u6a21\u5f0f\u53ef\u4ee5\u786e\u4fdd\u4ec5\u8ba9\u6709\u5bc6\u7801\u4e14\u53d7\u4fe1\u4efb\u7684\u7528\u6237\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\uff0c\u4e14\u8ba4\u8bc1\u8fc7\u7a0b\u5341\u5206\u7b80\u5355\u3002\u4e0d\u8fc7\uff0c\u53ea\u6709\u5efa\u7acb\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\u540e\uff0c\u624d\u80fd\u4f7f\u7528\u7528\u6237\u5bc6\u7801\u8ba4\u8bc1\u6a21\u5f0f\u3002\u6b64\u5916\uff0cSamba\u670d\u52a1\u7a0b\u5e8f\u7684\u6570\u636e\u5e93\u8981\u6c42\u8d26\u6237\u5fc5\u987b\u5728\u5f53\u524d\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b58\u5728\uff0c\u5426\u5219\u521b\u5efa\u6587\u4ef6\u65f6\u5c06\u5bfc\u81f4\u6587\u4ef6\u6743\u9650\u5c5e\u6027\u6df7\u4e71\uff0c\u8fdb\u800c\u5f15\u53d1\u9519\u8bef\u3002<\/p>\n

pdbedit\u547d\u4ee4\u7528\u4e8e\u7ba1\u7406Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\uff0c\u683c\u5f0f\u4e3a\u201cpdbedit [\u9009\u9879] \u8d26\u6237\u201d\u3002\u5728\u7b2c\u4e00\u6b21\u5c06\u8d26\u6237\u4fe1\u606f\u5199\u5165\u6570\u636e\u5e93\u65f6\u9700\u8981\u4f7f\u7528-a\u53c2\u6570\uff0c\u4ee5\u540e\u5728\u6267\u884c\u4fee\u6539\u5bc6\u7801\u3001\u5220\u9664\u8d26\u6237\u7b49\u64cd\u4f5c\u65f6\u5c31\u4e0d\u518d\u9700\u8981\u8be5\u53c2\u6570\u4e86\u3002pdbedit\u547d\u4ee4\u4e2d\u4f7f\u7528\u7684\u53c2\u6570\u53ca\u5176\u4f5c\u7528\u5982\u886812-3\u6240\u793a\u3002<\/p>\n

\u886812-3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u7528\u4e8epdbedit\u547d\u4ee4\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n\n\n\n\n\n\n\n
\u53c2\u6570<\/td>\n\u4f5c\u7528<\/td>\n<\/tr>\n
-a \u7528\u6237\u540d<\/td>\n\u5efa\u7acbSamba\u7528\u6237<\/td>\n<\/tr>\n
-x \u7528\u6237\u540d<\/td>\n\u5220\u9664Samba\u7528\u6237<\/td>\n<\/tr>\n
-L<\/td>\n\u5217\u51fa\u7528\u6237\u5217\u8868<\/td>\n<\/tr>\n
-Lv<\/td>\n\u5217\u51fa\u7528\u6237\u8be6\u7ec6\u4fe1\u606f\u7684\u5217\u8868<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

[root@linuxprobe ~]# id linuxprobe\r\nuid=1000(linuxprobe) gid=1000(linuxprobe) groups=1000(linuxprobe)\r\n[root@linuxprobe ~]# pdbedit -a -u linuxprobe\r\nnew password:\u6b64\u5904\u8f93\u5165\u8be5\u8d26\u6237\u5728Samba\u670d\u52a1\u6570\u636e\u5e93\u4e2d\u7684\u5bc6\u7801<\/strong>\r\nretype new password:\u518d\u6b21\u8f93\u5165\u5bc6\u7801\u8fdb\u884c\u786e\u8ba4<\/strong>\r\nUnix username:        linuxprobe\r\nNT username:          \r\nAccount Flags:        [U          ]\r\nUser SID:             S-1-5-21-650031181-3622628401-3290108334-1000\r\nPrimary Group SID:    S-1-5-21-650031181-3622628401-3290108334-513\r\nFull Name:            linuxprobe\r\nHome Directory:       \\\\linuxprobe\\linuxprobe\r\nHomeDir Drive:        \r\nLogon Script:         \r\nProfile Path:         \\\\linuxprobe\\linuxprobe\\profile\r\nDomain:               LINUXPROBE\r\nAccount desc:         \r\nWorkstations:         \r\nMunged dial:          \r\nLogon time:           0\r\nLogoff time:          Wed, 06 Feb 2036 23:06:39 CST\r\nKickoff time:         Wed, 06 Feb 2036 23:06:39 CST\r\nPassword last set:    Fri, 05 Mar 2021 18:52:35 CST\r\nPassword can change:  Fri, 05 Mar 2021 18:52:35 CST\r\nPassword must change: never\r\nLast bad password   : 0\r\nBad password count  : 0\r\nLogon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\r\n<\/pre>\n

\u7b2c2\u6b65<\/strong>\uff1a\u521b\u5efa\u7528\u4e8e\u5171\u4eab\u8d44\u6e90\u7684\u6587\u4ef6\u76ee\u5f55\u3002\u5728\u521b\u5efa\u65f6\uff0c\u4e0d\u4ec5\u8981\u8003\u8651\u5230\u6587\u4ef6\u8bfb\u5199\u6743\u9650\u7684\u95ee\u9898\uff0c\u800c\u4e14\u7531\u4e8e\/home\u76ee\u5f55\u662f\u7cfb\u7edf\u4e2d\u666e\u901a\u7528\u6237\u7684\u5bb6\u76ee\u5f55\uff0c\u56e0\u6b64\u8fd8\u9700\u8981\u8003\u8651\u5e94\u7528\u4e8e\u8be5\u76ee\u5f55\u7684SELinux\u5b89\u5168\u4e0a\u4e0b\u6587\u6240\u5e26\u6765\u7684\u9650\u5236\u3002\u5728Samba\u7684\u5e2e\u52a9\u624b\u518c\u4e2d\u663e\u793a\uff0c\u6b63\u786e\u7684\u6587\u4ef6\u4e0a\u4e0b\u6587\u503c\u5e94\u8be5\u662fsamba_share_t\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u4fee\u6539\u5b8c\u6bd5\u540e\u6267\u884crestorecon\u547d\u4ee4\uff0c\u5c31\u80fd\u8ba9\u5e94\u7528\u4e8e\u76ee\u5f55\u7684\u65b0SELinux\u5b89\u5168\u4e0a\u4e0b\u6587\u7acb\u5373\u751f\u6548\u3002<\/p>\n

[root@linuxprobe ~]# mkdir \/home\/database\r\n[root@linuxprobe ~]# chown -Rf linuxprobe:linuxprobe \/home\/database\r\n[root@linuxprobe ~]# semanage fcontext -a -t samba_share_t \/home\/database\r\n[root@linuxprobe ~]# restorecon -Rv \/home\/database\r\nRelabeled \/home\/database from unconfined_u:object_r:user_home_dir_t:s0 to unconfined_u:object_r:samba_share_t:s0<\/pre>\n
\n

\u7b2c3\u6b65<\/strong>\uff1a\u8bbe\u7f6eSELinux\u670d\u52a1\u4e0e\u7b56\u7565\uff0c\u4f7f\u5176\u5141\u8bb8\u901a\u8fc7Samba\u670d\u52a1\u7a0b\u5e8f\u8bbf\u95ee\u666e\u901a\u7528\u6237\u5bb6\u76ee\u5f55\u3002\u6267\u884cgetsebool\u547d\u4ee4\uff0c\u7b5b\u9009\u51fa\u6240\u6709\u4e0eSamba\u670d\u52a1\u7a0b\u5e8f\u76f8\u5173\u7684SELinux\u57df\u7b56\u7565\uff0c\u6839\u636e\u7b56\u7565\u7684\u540d\u79f0\uff08\u548c\u7ecf\u9a8c\uff09\u9009\u62e9\u51fa\u6b63\u786e\u7684\u7b56\u7565\u6761\u76ee\u8fdb\u884c\u5f00\u542f\u5373\u53ef\uff1a<\/p>\n

[root@linuxprobe ~]# getsebool -a | grep samba\r\nsamba_create_home_dirs --> off\r\nsamba_domain_controller --> off\r\nsamba_enable_home_dirs --> off<\/strong>\r\nsamba_export_all_ro --> off\r\nsamba_export_all_rw --> off\r\nsamba_load_libgfapi --> off\r\nsamba_portmapper --> off\r\nsamba_run_unconfined --> off\r\nsamba_share_fusefs --> off\r\nsamba_share_nfs --> off\r\nsanlock_use_samba --> off\r\ntmpreaper_use_samba --> off\r\nuse_samba_home_dirs --> off\r\nvirt_use_samba --> off\r\n[root@linuxprobe ~]# setsebool -P samba_enable_home_dirs on<\/pre>\n

\u7b2c4\u6b65<\/strong>\uff1a\u5728Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u6839\u636e\u886812-2\u6240\u63d0\u5230\u7684\u683c\u5f0f\u5199\u5165\u5171\u4eab\u4fe1\u606f\u3002<\/p>\n

[root@linuxprobe ~]# vim \/etc\/samba\/smb.conf\u00a0\r\n[global]\r\n        workgroup = SAMBA\r\n        security = user\r\n        passdb backend = tdbsam\r\n[database]\r\n        comment = Do not arbitrarily modify the database file\r\n        path = \/home\/database\r\n        public = no\r\n        writable = yes\r\n<\/pre>\n

\u7b2c5\u6b65<\/strong>\uff1aSamba\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u5de5\u4f5c\u57fa\u672c\u5b8c\u6bd5\u3002Samba\u670d\u52a1\u7a0b\u5e8f\u5728Linux\u7cfb\u7edf\u4e2d\u7684\u540d\u5b57\u4e3asmb\uff0c\u6240\u4ee5\u91cd\u542fsmb\u670d\u52a1\u5e76\u52a0\u5165\u5230\u542f\u52a8\u9879\u4e2d\uff0c\u4fdd\u8bc1\u5728\u91cd\u542f\u670d\u52a1\u5668\u540e\u4f9d\u7136\u80fd\u591f\u4e3a\u7528\u6237\u6301\u7eed\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n

[root@linuxprobe ~]# systemctl restart smb \r\n[root@linuxprobe ~]# systemctl enable smb \r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/smb.service \u2192 \/usr\/lib\/systemd\/system\/smb.service.<\/pre>\n

\u4e3a\u4e86\u907f\u514d\u9632\u706b\u5899\u9650\u5236\u7528\u6237\u8bbf\u95ee\uff0c\u8fd9\u91cc\u5c06iptables\u9632\u706b\u5899\u6e05\u7a7a\uff0c\u518d\u628aSamba\u670d\u52a1\u6dfb\u52a0\u5230firewalld\u9632\u706b\u5899\u4e2d\uff0c\u786e\u4fdd\u4e07\u65e0\u4e00\u5931\u3002<\/p>\n

[root@linuxprobe ~]# iptables -F\r\n[root@linuxprobe ~]# iptables-save \r\n[root@linuxprobe ~]# firewall-cmd --zone=public --permanent --add-service=samba\r\nsuccess\r\n[root@linuxprobe ~]# firewall-cmd --reload\r\nsuccess\r\n<\/pre>\n

\u7b2c6\u6b65\uff1a<\/strong>\u53ef\u4ee5\u4f7f\u7528\u201csystemctl status smb\u201d\u547d\u4ee4\u67e5\u770b\u670d\u52a1\u5668\u662f\u5426\u542f\u52a8\u4e86Samba\u670d\u52a1\u3002\u5982\u679c\u60f3\u8fdb\u4e00\u6b65\u67e5\u770bSamba\u670d\u52a1\u90fd\u5171\u4eab\u4e86\u54ea\u4e9b\u76ee\u5f55\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528smbclient\u547d\u4ee4\u6765\u67e5\u770b\u5171\u4eab\u8be6\u60c5\uff1b-U\u53c2\u6570\u6307\u5b9a\u4e86\u7528\u6237\u540d\u79f0\uff08\u7528\u54ea\u4f4d\u7528\u6237\u6302\u8f7d\u4e86Samba\u670d\u52a1\uff0c\u5c31\u7528\u54ea\u4f4d\u7528\u6237\u7684\u8eab\u4efd\u8fdb\u884c\u67e5\u770b\uff09\uff1b-L\u53c2\u6570\u5217\u51fa\u4e86\u5171\u4eab\u6e05\u5355\u3002<\/p>\n

[root@linuxprobe ~]# smbclient -U linuxprobe -L 192.168.10.10\r\nEnter SAMBA\\linuxprobe's password: \u6b64\u5904\u8f93\u5165\u8be5\u8d26\u6237\u5728Samba\u670d\u52a1\u6570\u636e\u5e93\u4e2d\u7684\u5bc6\u7801<\/strong>\r\n\r\n\tSharename       Type      Comment\r\n\t---------       ----      -------\r\n\tdatabase        Disk      Do not arbitrarily modify the database file\r\n\tIPC$            IPC       IPC Service (Samba 4.9.1)\r\nReconnecting with SMB1 for workgroup listing.\r\n\r\n\tServer               Comment\r\n\t---------            -------\r\n\r\n\tWorkgroup            Master\r\n\t---------            -------\r\n<\/pre>\n
12.1.2 Windows\u6302\u8f7d\u5171\u4eab<\/strong><\/span><\/h6>\n

\u65e0\u8bbaSamba\u5171\u4eab\u670d\u52a1\u662f\u90e8\u7f72Windows\u7cfb\u7edf\u4e0a\u8fd8\u662f\u90e8\u7f72\u5728Linux\u7cfb\u7edf\u4e0a\uff0c\u901a\u8fc7Windows\u7cfb\u7edf\u8fdb\u884c\u8bbf\u95ee\u65f6\uff0c\u5176\u6b65\u9aa4\u548c\u65b9\u6cd5\u90fd\u662f\u4e00\u6837\u7684\u3002\u4e0b\u9762\u5047\u8bbeSamba\u5171\u4eab\u670d\u52a1\u90e8\u7f72\u5728Linux\u7cfb\u7edf\u4e0a\uff0c\u5e76\u901a\u8fc7Windows\u7cfb\u7edf\u6765\u8bbf\u95eeSamba\u670d\u52a1\u3002Samba\u5171\u4eab\u670d\u52a1\u5668\u548cWindows\u5ba2\u6237\u7aef\u7684IP\u5730\u5740\u53ef\u4ee5\u6839\u636e\u886812-4\u6765\u8bbe\u7f6e\u3002<\/p>\n

\u886812-4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Samba\u670d\u52a1\u5668\u548cWindows\u5ba2\u6237\u7aef\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u53caIP\u5730\u5740<\/p>\n

\n\n\n\n\n\n\n
\u4e3b\u673a\u540d\u79f0<\/td>\n\u64cd\u4f5c\u7cfb\u7edf<\/td>\nIP\u5730\u5740<\/td>\n<\/tr>\n
Samba\u5171\u4eab\u670d\u52a1\u5668<\/td>\nRHEL 10<\/td>\n192.168.10.10<\/td>\n<\/tr>\n
Linux\u5ba2\u6237\u7aef<\/td>\nRHEL 10<\/td>\n192.168.10.20<\/td>\n<\/tr>\n
Windows\u5ba2\u6237\u7aef<\/td>\nWindows 11<\/td>\n192.168.10.30<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

\u8981\u5728Windows\u7cfb\u7edf\u4e2d\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\uff0c\u53ea\u9700\u8981\u5355\u51fbWindows\u7cfb\u7edf\u7684\u201c\u5f00\u59cb\u201d\u6309\u94ae\u540e\u8f93\u5165\u4e24\u4e2a\u53cd\u659c\u6760\uff0c\u7136\u540e\u518d\u6dfb\u52a0\u670d\u52a1\u5668\u7684IP\u5730\u5740\u5373\u53ef\uff0c\u5982\u56fe12-2\u6240\u793a\u3002<\/p>\n<\/div>\n

\"\"<\/p>\n

\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u56fe12-2\u00a0 \u5728Windows\u7cfb\u7edf\u4e2d\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90<\/p>\n

\u73b0\u5728\u5e94\u8be5\u5c31\u80fd\u770b\u5230Samba\u5171\u4eab\u670d\u52a1\u7684\u767b\u5f55\u754c\u9762\u4e86\u3002\u5218\u9044\u8001\u5e08\u5728\u8fd9\u91cc\u5148\u4f7f\u7528linuxprobe\u8d26\u6237\u7684\u7cfb\u7edf\u672c\u5730\u5bc6\u7801\u5c1d\u8bd5\u767b\u5f55\uff0c\u7ed3\u679c\u51fa\u73b0\u4e86\u5982\u56fe12-3\u6240\u793a\u7684\u62a5\u9519\u4fe1\u606f\u3002\u7531\u6b64\u53ef\u4ee5\u9a8c\u8bc1\uff0c\u5728RHEL 10\u7cfb\u7edf\u4e2d\uff0cSamba\u670d\u52a1\u7a0b\u5e8f\u4f7f\u7528\u7684\u662f\u72ec\u7acb\u7684\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\u3002\u6240\u4ee5\uff0c\u5373\u4fbf\u5728Linux\u7cfb\u7edf\u4e2d\u6709\u4e00\u4e2alinuxprobe\u8d26\u6237\uff0cSamba\u670d\u52a1\u7a0b\u5e8f\u4f7f\u7528\u7684\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\u4e2d\u4e5f\u6709\u4e00\u4e2a\u540c\u540d\u7684linuxprobe\u8d26\u6237\uff0c\u5927\u5bb6\u4e00\u5b9a\u8981\u5f04\u6e05\u695a\u5b83\u4eec\u5404\u81ea\u6240\u5bf9\u5e94\u7684\u5bc6\u7801\uff0c\u5b83\u4eec\u4ec5\u4ec5\u662f\u540d\u79f0\u76f8\u540c\u800c\u5df2\u3002<\/p>\n

\"\"<\/div>\n

\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u56fe12-3\u00a0 \u8bbf\u95eeSamba\u5171\u4eab\u670d\u52a1\u63d0\u793a\u51fa\u9519<\/p>\n

\u5728\u6b63\u786e\u8f93\u5165Samba\u670d\u52a1\u6570\u636e\u5e93\u4e2d\u7684linuxprobe\u8d26\u6237\u540d\u4ee5\u53ca\u4f7f\u7528pdbedit\u547d\u4ee4\u8bbe\u7f6e\u7684\u5bc6\u7801\u540e\uff0c\u5c31\u53ef\u4ee5\u767b\u5f55\u5230Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u5171\u4eab\u754c\u9762\u4e2d\u4e86\uff0c\u5982\u56fe12-4\u6240\u793a\u3002\u6b64\u65f6\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u6267\u884c\u67e5\u770b\u3001\u5199\u5165\u3001\u66f4\u540d\u3001\u5220\u9664\u6587\u4ef6\u7b49\u64cd\u4f5c\u3002<\/p>\n

\u7531\u4e8eWindows\u7cfb\u7edf\u7684\u7f13\u5b58\u539f\u56e0\uff0c\u6709\u53ef\u80fd\u60a8\u5728\u7b2c\u4e8c\u6b21\u767b\u5f55\u65f6\u63d0\u4f9b\u4e86\u6b63\u786e\u7684\u8d26\u6237\u548c\u5bc6\u7801\uff0c\u4f9d\u7136\u4f1a\u62a5\u9519\uff0c\u8fd9\u65f6\u53ea\u9700\u8981\u91cd\u65b0\u542f\u52a8\u4e00\u4e0bWindows\u5ba2\u6237\u7aef\u5c31\u6ca1\u95ee\u9898\u4e86\uff08\u5982\u679cWindows\u7cfb\u7edf\u4f9d\u7136\u62a5\u9519\uff0c\u8bf7\u68c0\u67e5\u4e0a\u8ff0\u6b65\u9aa4\u662f\u5426\u6709\u505a\u9519\u7684\u5730\u65b9\uff09\u3002<\/p>\n

\"\"<\/p>\n

\n

\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u56fe12-4\u00a0 \u6210\u529f\u8bbf\u95eeSamba\u5171\u4eab\u670d\u52a1<\/p>\n

12.1.3 Linux\u6302\u8f7d\u5171\u4eab<\/strong><\/span><\/h6>\n

\u4e0a\u9762\u7684\u5b9e\u9a8c\u64cd\u4f5c\u53ef\u80fd\u4f1a\u8ba9\u5404\u4f4d\u8bfb\u8005\u8bef\u4ee5\u4e3aSamba\u670d\u52a1\u7a0b\u5e8f\u53ea\u662f\u4e3a\u4e86\u89e3\u51b3Linux\u7cfb\u7edf\u548cWindows\u7cfb\u7edf\u7684\u8d44\u6e90\u5171\u4eab\u95ee\u9898\u800c\u8bbe\u8ba1\u7684\u3002\u5176\u5b9e\uff0cSamba\u670d\u52a1\u7a0b\u5e8f\u8fd8\u53ef\u4ee5\u5b9e\u73b0Linux\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\u3002\u8bf7\u5404\u4f4d\u8bfb\u8005\u6309\u7167\u886812-5\u6765\u8bbe\u7f6eSamba\u670d\u52a1\u7a0b\u5e8f\u6240\u5728\u4e3b\u673a\uff08\u5373Samba\u5171\u4eab\u670d\u52a1\u5668\uff09\u548cLinux\u5ba2\u6237\u7aef\u4f7f\u7528\u7684IP\u5730\u5740\uff0c\u7136\u540e\u5728\u5ba2\u6237\u7aef\u5b89\u88c5\u652f\u6301\u6587\u4ef6\u5171\u4eab\u670d\u52a1\u7684\u8f6f\u4ef6\u5305\uff08cifs-utils\uff09\u3002<\/p>\n

\u886812-5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Samba\u5171\u4eab\u670d\u52a1\u5668\u548cLinux\u5ba2\u6237\u7aef\u5404\u81ea\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u53caIP\u5730\u5740<\/p>\n

\n\n\n\n\n\n\n
\u4e3b\u673a\u540d\u79f0<\/td>\n\u64cd\u4f5c\u7cfb\u7edf<\/td>\nIP\u5730\u5740<\/td>\n<\/tr>\n
Samba\u5171\u4eab\u670d\u52a1\u5668<\/td>\nRHEL 10<\/td>\n192.168.10.10<\/td>\n<\/tr>\n
Linux\u5ba2\u6237\u7aef<\/td>\nRHEL 10<\/td>\n192.168.10.20<\/td>\n<\/tr>\n
Windows\u5ba2\u6237\u7aef<\/td>\nWindows 11<\/td>\n192.168.10.30<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/div>\n<\/div>\n

[root@linuxprobe ~]# dnf install cifs-utils\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nAppStream                                                    3.1 MB\/s | 3.2 kB     00:00    \r\nBaseOS                                                       2.7 MB\/s | 2.7 kB     00:00    \r\nDependencies resolved.\r\n=============================================================================================\r\n Package                Arch               Version                  Repository          Size\r\n=============================================================================================\r\nInstalling:\r\n cifs-utils             x86_64             6.8-2.el8                BaseOS              93 k\r\n\r\nTransaction Summary\r\n=============================================================================================\r\nInstall  1 Package         \r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026    \r\nInstalled:\r\n  cifs-utils-6.8-2.el8.x86_64                                                     \r\nComplete!<\/pre>\n

\u5b89\u88c5\u597d\u8f6f\u4ef6\u5305\u540e\uff0c\u5728Linux\u5ba2\u6237\u7aef\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u6302\u8f7dSamba\u670d\u52a1\u5171\u4eab\u8d44\u6e90\u7684\u76ee\u5f55\u3002\u8fd9\u4e2a\u76ee\u5f55\u53ef\u4ee5\u4e0e\u670d\u52a1\u5668\u4e0a\u7684\u5171\u4eab\u540d\u79f0\u540c\u540d\uff0c\u4ee5\u4fbf\u4e8e\u65e5\u540e\u67e5\u627e\u3002mount\u547d\u4ee4\u4e2d\u7684-t\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u534f\u8bae\u7c7b\u578b\uff0c-o\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u6700\u540e\u8ffd\u52a0\u4e0a\u670d\u52a1\u5668IP\u5730\u5740\u3001\u5171\u4eab\u540d\u79f0\u548c\u672c\u5730\u6302\u8f7d\u76ee\u5f55\u5373\u53ef\u3002\u670d\u52a1\u5668IP\u5730\u5740\u540e\u9762\u7684\u5171\u4eab\u540d\u79f0\u6307\u7684\u662f\u914d\u7f6e\u6587\u4ef6\u4e2d[database]\u7684\u503c\uff0c\u800c\u4e0d\u662f\u670d\u52a1\u5668\u672c\u5730\u6302\u8f7d\u7684\u76ee\u5f55\u540d\u79f0\u3002\u867d\u7136\u8fd9\u4e24\u4e2a\u503c\u53ef\u80fd\u4e00\u6837\uff0c\u4f46\u5927\u5bb6\u5e94\u8be5\u8ba4\u51fa\u5b83\u4eec\u7684\u533a\u522b\u3002<\/p>\n

[root@linuxprobe ~]# mkdir \/database\r\n[root@linuxprobe ~]# mount -t cifs -o username=linuxprobe,password=redhat \/\/192.168.10.10\/database \/database\r\n[root@linuxprobe ~]# df -h\r\nFilesystem                Size  Used Avail Use% Mounted on\r\ndevtmpfs                  969M     0  969M   0% \/dev\r\ntmpfs                     984M     0  984M   0% \/dev\/shm\r\ntmpfs                     984M  9.6M  974M   1% \/run\r\ntmpfs                     984M     0  984M   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root      17G  3.9G   14G  23% \/\r\n\/dev\/sr0                  6.7G  6.7G     0 100% \/media\/cdrom\r\n\/dev\/sda1                1014M  152M  863M  15% \/boot\r\ntmpfs                     197M   16K  197M   1% \/run\/user\/42\r\ntmpfs                     197M  3.4M  194M   2% \/run\/user\/0\r\n\/\/192.168.10.10\/database   17G  3.9G   14G  23% \/database\r\n<\/strong><\/pre>\n

\u5982\u679c\u5728\u6bcf\u6b21\u91cd\u542f\u7535\u8111\u540e\u90fd\u9700\u8981\u4f7f\u7528mount\u547d\u4ee4\u624b\u52a8\u6302\u8f7d\u8fdc\u7a0b\u5171\u4eab\u76ee\u5f55\uff0c\u662f\u4e0d\u662f\u89c9\u5f97\u5f88\u9ebb\u70e6\u5462\uff1f\u5176\u5b9e\u53ef\u4ee5\u6309\u7167Samba\u670d\u52a1\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u3001\u5171\u4eab\u57df\u7684\u987a\u5e8f\u5c06\u76f8\u5173\u4fe1\u606f\u5199\u5165\u4e00\u4e2a\u8ba4\u8bc1\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u8ba9\/etc\/fstab\u6587\u4ef6\u548c\u7cfb\u7edf\u81ea\u52a8\u52a0\u8f7d\u5b83\u3002\u4e3a\u4e86\u4fdd\u8bc1\u4e0d\u88ab\u5176\u4ed6\u4eba\u968f\u610f\u770b\u5230\uff0c\u6700\u540e\u628a\u8fd9\u4e2a\u8ba4\u8bc1\u6587\u4ef6\u7684\u6743\u9650\u4fee\u6539\u4e3a\u4ec5root\u7ba1\u7406\u5458\u624d\u80fd\u591f\u8bfb\u5199\uff1a<\/p>\n

[root@linuxprobe ~]# vim auth.smb\r\nusername=linuxprobe\r\npassword=redhat\r\ndomain=MYGROUP\r\n[root@linuxprobe ~]# chmod 600 auth.smb\r\n<\/pre>\n

\u5c06\u6302\u8f7d\u4fe1\u606f\u5199\u5165\/etc\/fstab\u6587\u4ef6\u4e2d\uff0c\u4ee5\u786e\u4fdd\u5171\u4eab\u6302\u8f7d\u4fe1\u606f\u5728\u670d\u52a1\u5668\u91cd\u542f\u540e\u4f9d\u7136\u751f\u6548\uff1a<\/p>\n

[root@linuxprobe ~]# vim \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Thu Feb 25 10:42:11 2021\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root                      \/             xfs     defaults                    0 0\r\nUUID=37d0bdc6-d70d-4cc0-b356-51195ad90369  \/boot         xfs     defaults                    1 0\r\n\/dev\/mapper\/rhel-swap                      swap          swap    defaults                    0 0\r\n\/dev\/cdrom                                 \/media\/cdrom  iso9660 defaults                    0 0 \r\n\/\/192.168.10.10\/database                   \/database     cifs    credentials=\/root\/auth.smb  0 0<\/strong>\r\n[root@linuxprobe ~]# mount -a\r\n<\/pre>\n

Linux\u5ba2\u6237\u7aef\u6210\u529f\u5730\u6302\u8f7d\u4e86Samba\u670d\u52a1\u7684\u5171\u4eab\u8d44\u6e90\u3002\u8fdb\u5165\u5230\u6302\u8f7d\u76ee\u5f55\/database\u540e\u5c31\u53ef\u4ee5\u770b\u5230Windows\u7cfb\u7edf\u8bbf\u95eeSamba\u670d\u52a1\u7a0b\u5e8f\u65f6\u7559\u4e0b\u6765\u7684\u6587\u4ef6\u4e86\uff08\u5373\u6587\u4ef6Memo.txt\uff09\u3002\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u5bf9\u8be5\u6587\u4ef6\u8fdb\u884c\u8bfb\u5199\u64cd\u4f5c\u5e76\u4fdd\u5b58\u3002<\/p>\n

[root@linuxprobe ~]# cat \/database\/Memo.txt\r\ni can edit it .<\/pre>\n

\u51fa\u73b0\u95ee\u9898?\u5927\u80c6\u63d0\u95ee!<\/strong><\/span><\/p>\n

\u56e0\u8bfb\u8005\u4eec\u786c\u4ef6\u4e0d\u540c\u6216\u64cd\u4f5c\u9519\u8bef\u90fd\u53ef\u80fd\u5bfc\u81f4\u5b9e\u9a8c\u914d\u7f6e\u51fa\u9519\uff0c\u8bf7\u8010\u5fc3\u518d\u4ed4\u7ec6\u770b\u770b\u64cd\u4f5c\u6b65\u9aa4\u5427\uff0c\u4e0d\u8981\u6c14\u9981~<\/p>\n

Linux\u6280\u672f\u4ea4\u6d41\u5b66\u4e60\u8bf7\u52a0\u8bfb\u8005\u7fa4\uff08\u63a8\u8350<\/span><\/strong>\uff09\uff1ahttps:\/\/lrxjmw.cn\/club<\/a><\/p>\n

*\u672c\u7fa4\u7279\u8272\uff1a\u786e\u4fdd\u6bcf\u4e00\u4f4d\u7fa4\u53cb\u90fd\u662f\u300aLinux\u5c31\u8be5\u8fd9\u4e48\u5b66\u300b\u7684\u8bfb\u8005\uff0c\u7b54\u7591\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u4e0d\u5b9a\u671f\u9886\u53d6\u5b9a\u5236\u793c\u54c1\u3002<\/p><\/blockquote>\n

12.2 NFS\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf<\/strong><\/span><\/h5>\n

\u5982\u679c\u8bfb\u8005\u4eec\u89c9\u5f97Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u592a\u9ebb\u70e6\uff0c\u800c\u4e14\u6070\u5de7\u9700\u8981\u5171\u4eab\u6587\u4ef6\u7684\u4e3b\u673a\u90fd\u662fLinux\u7cfb\u7edf\uff0c\u975e\u5e38\u63a8\u8350\u5927\u5bb6\u5728\u5ba2\u6237\u7aef\u90e8\u7f72NFS\u670d\u52a1\u6765\u5171\u4eab\u6587\u4ef6\u3002NFS\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u670d\u52a1\u53ef\u4ee5\u5c06\u8fdc\u7a0bLinux\u7cfb\u7edf\u4e0a\u7684\u6587\u4ef6\u5171\u4eab\u8d44\u6e90\u6302\u8f7d\u5230\u672c\u5730\u4e3b\u673a\u7684\u76ee\u5f55\u4e0a\uff0c\u4ece\u800c\u4f7f\u5f97\u672c\u5730\u4e3b\u673a\uff08Linux\u5ba2\u6237\u7aef\uff09\u57fa\u4e8eTCP\/IP\u534f\u8bae\uff0c\u50cf\u4f7f\u7528\u672c\u5730\u4e3b\u673a\u4e0a\u7684\u8d44\u6e90\u90a3\u6837\u8bfb\u5199\u8fdc\u7a0bLinux\u7cfb\u7edf\u4e0a\u7684\u5171\u4eab\u6587\u4ef6\u3002<\/p>\n

\"\"<\/p>\n

\u3010\u6539\u6539\u6539\uff1a\u9700\u8981\u786e\u8ba4\u4e0b\u3011<\/span><\/strong>\u7531\u4e8eRHEL 10\u7cfb\u7edf\u4e2d\u9ed8\u8ba4\u5df2\u7ecf\u5b89\u88c5\u4e86NFS\u670d\u52a1\uff0c\u5916\u52a0NFS\u670d\u52a1\u7684\u914d\u7f6e\u6b65\u9aa4\u4e5f\u5f88\u7b80\u5355\uff0c\u56e0\u6b64\u5218\u9044\u8001\u5e08\u5728\u6388\u8bfe\u65f6\u4f1a\u620f\u79f0\u4e3aNeed For Speed\u6781\u54c1\u98de\u8f66\u3002<\/p>\n

\u9996\u5148\u8bf7\u4f7f\u7528\u8f6f\u4ef6\u4ed3\u5e93\u68c0\u67e5\u81ea\u5df1\u7684\u7cfb\u7edf\u4e2d\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86NFS\u8f6f\u4ef6\u5305\uff1a<\/p>\n

[root@linuxprobe ~]# dnf install nfs-utils\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nLast metadata expiration check: 0:00:12 ago on Sat 06 Mar 2021 04:48:38 AM CST.\r\nPackage nfs-utils-1:2.3.3-14.el8.x86_64 is already installed.<\/strong>\r\nDependencies resolved.\r\nNothing to do.\r\nComplete!\r\n<\/pre>\n

\u7b2c1\u6b65<\/strong>\uff1a\u4e3a\u4e86\u68c0\u9a8cNFS\u670d\u52a1\u914d\u7f6e\u7684\u6548\u679c\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u4e24\u53f0Linux\u4e3b\u673a\uff08\u4e00\u53f0\u5145\u5f53NFS\u670d\u52a1\u5668\uff0c\u4e00\u53f0\u5145\u5f53NFS\u5ba2\u6237\u7aef\uff09\uff0c\u5e76\u6309\u7167\u886812-6\u6765\u8bbe\u7f6e\u5b83\u4eec\u6240\u4f7f\u7528\u7684IP\u5730\u5740\u3002<\/p>\n

\u886812-6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u4e24\u53f0Linux\u4e3b\u673a\u6240\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u53caIP\u5730\u5740<\/p>\n\n\n\n\n\n
\u4e3b\u673a\u540d\u79f0<\/td>\n\u64cd\u4f5c\u7cfb\u7edf<\/td>\nIP\u5730\u5740<\/td>\n<\/tr>\n
NFS\u670d\u52a1\u5668<\/td>\nRHEL 10<\/td>\n192.168.10.10<\/td>\n<\/tr>\n
NFS\u5ba2\u6237\u7aef<\/td>\nRHEL 10<\/td>\n192.168.10.20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

\u53e6\u5916\uff0c\u4e0d\u8981\u5fd8\u8bb0\u914d\u7f6e\u597d\u9632\u706b\u5899\uff0c\u4ee5\u514d\u9ed8\u8ba4\u7684\u9632\u706b\u5899\u7b56\u7565\u7981\u6b62\u6b63\u5e38\u7684NFS\u5171\u4eab\u670d\u52a1\u3002<\/p>\n

[root@linuxprobe ~]# iptables -F\r\n[root@linuxprobe ~]# iptables-save\r\n[root@linuxprobe ~]# firewall-cmd --permanent --zone=public --add-service=nfs\r\nsuccess\r\n[root@linuxprobe ~]# firewall-cmd --permanent --zone=public --add-service=rpc-bind\r\nsuccess\r\n[root@linuxprobe ~]# firewall-cmd --permanent --zone=public --add-service=mountd\r\nsuccess\r\n[root@linuxprobe ~]# firewall-cmd --reload\r\nsuccess<\/pre>\n

\u7b2c2\u6b65<\/strong>\uff1a\u5728NFS\u670d\u52a1\u5668\u4e0a\u5efa\u7acb\u7528\u4e8eNFS\u6587\u4ef6\u5171\u4eab\u7684\u76ee\u5f55\uff0c\u5e76\u8bbe\u7f6e\u8db3\u591f\u7684\u6743\u9650\u786e\u4fdd\u5176\u4ed6\u4eba\u4e5f\u6709\u5199\u5165\u6743\u9650\u3002<\/p>\n

[root@linuxprobe ~]# mkdir \/nfsfile\r\n[root@linuxprobe ~]# chmod -R 777 \/nfsfile\r\n[root@linuxprobe ~]# echo \"welcome to lrxjmw.cn\" > \/nfsfile\/readme\r\n<\/pre>\n

\u7b2c3\u6b65<\/strong>\uff1aNFS\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\u4e3a\/etc\/exports\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u91cc\u9762\u6ca1\u6709\u4efb\u4f55\u5185\u5bb9\u3002\u6211\u4eec\u53ef\u4ee5\u6309\u7167\u201c\u5171\u4eab\u76ee\u5f55\u7684\u8def\u5f84 \u5141\u8bb8\u8bbf\u95ee\u7684NFS\u5ba2\u6237\u7aef\uff08\u5171\u4eab\u6743\u9650\u53c2\u6570\uff09\u201d\u7684\u683c\u5f0f\uff0c\u5b9a\u4e49\u8981\u5171\u4eab\u7684\u76ee\u5f55\u4e0e\u76f8\u5e94\u7684\u6743\u9650\u3002<\/p>\n

\u4f8b\u5982\uff0c\u5982\u679c\u60f3\u8981\u628a\/nfsfile\u76ee\u5f55\u5171\u4eab\u7ed9192.168.10.0\/24\u7f51\u6bb5\u5185\u7684\u6240\u6709\u4e3b\u673a\uff0c\u8ba9\u8fd9\u4e9b\u4e3b\u673a\u90fd\u62e5\u6709\u8bfb\u5199\u6743\u9650\uff0c\u5728\u5c06\u6570\u636e\u5199\u5165\u5230NFS\u670d\u52a1\u5668\u7684\u786c\u76d8\u4e2d\u540e\u624d\u4f1a\u7ed3\u675f\u64cd\u4f5c\uff0c\u6700\u5927\u9650\u5ea6\u4fdd\u8bc1\u6570\u636e\u4e0d\u4e22\u5931\uff0c\u4ee5\u53ca\u628a\u6765\u8bbf\u5ba2\u6237\u7aefroot\u7ba1\u7406\u5458\u6620\u5c04\u4e3a\u672c\u5730\u7684\u533f\u540d\u7528\u6237\u7b49\uff0c\u5219\u53ef\u4ee5\u6309\u7167\u4e0b\u9762\u547d\u4ee4\u4e2d\u7684\u683c\u5f0f\uff0c\u5c06\u886812-7\u4e2d\u7684\u53c2\u6570\u5199\u5230NFS\u670d\u52a1\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/p>\n

\u886812-7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u7528\u4e8e\u914d\u7f6eNFS\u670d\u52a1\u7a0b\u5e8f\u914d\u7f6e\u6587\u4ef6\u7684\u53c2\u6570<\/p>\n\n\n\n\n\n\n\n\n\n\n
\u53c2\u6570<\/td>\n\u4f5c\u7528<\/td>\n<\/tr>\n
ro<\/td>\n\u53ea\u8bfb<\/td>\n<\/tr>\n
rw<\/td>\n\u8bfb\u5199<\/td>\n<\/tr>\n
root_squash<\/td>\n\u5f53NFS\u5ba2\u6237\u7aef\u4ee5root\u7ba1\u7406\u5458\u8bbf\u95ee\u65f6\uff0c\u6620\u5c04\u4e3aNFS\u670d\u52a1\u5668\u7684\u533f\u540d\u7528\u6237<\/td>\n<\/tr>\n
no_root_squash<\/td>\n\u5f53NFS\u5ba2\u6237\u7aef\u4ee5root\u7ba1\u7406\u5458\u8bbf\u95ee\u65f6\uff0c\u6620\u5c04\u4e3aNFS\u670d\u52a1\u5668\u7684root\u7ba1\u7406\u5458<\/td>\n<\/tr>\n
all_squash<\/td>\n\u65e0\u8bbaNFS\u5ba2\u6237\u7aef\u4f7f\u7528\u4ec0\u4e48\u8d26\u6237\u8bbf\u95ee\uff0c\u5747\u6620\u5c04\u4e3aNFS\u670d\u52a1\u5668\u7684\u533f\u540d\u7528\u6237<\/td>\n<\/tr>\n
sync<\/td>\n\u540c\u65f6\u5c06\u6570\u636e\u5199\u5165\u5230\u5185\u5b58\u4e0e\u786c\u76d8\u4e2d\uff0c\u4fdd\u8bc1\u4e0d\u4e22\u5931\u6570\u636e<\/td>\n<\/tr>\n
async<\/td>\n\u4f18\u5148\u5c06\u6570\u636e\u4fdd\u5b58\u5230\u5185\u5b58\uff0c\u7136\u540e\u518d\u5199\u5165\u786c\u76d8\uff1b\u8fd9\u6837\u6548\u7387\u66f4\u9ad8\uff0c\u4f46\u53ef\u80fd\u4f1a\u4e22\u5931\u6570\u636e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

\u8bf7\u6ce8\u610f\uff0cNFS\u5ba2\u6237\u7aef\u5730\u5740\u4e0e\u6743\u9650\u4e4b\u95f4\u6ca1\u6709\u7a7a\u683c\u3002<\/p>\n

[root@linuxprobe ~]# vim \/etc\/exports\r\n\/nfsfile 192.168.10.*(rw,sync,root_squash)<\/pre>\n

\u5728NFS\u670d\u52a1\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u5de7\u7528\u901a\u914d\u7b26\u80fd\u591f\u5b9e\u73b0\u5f88\u591a\u4fbf\u6377\u529f\u80fd\uff0c\u5c31\u6bd4\u5982\u5339\u914dIP\u5730\u5740\u5c31\u6709\u4e09\u79cd\u65b9\u6cd5\u2014\u2014\u7b2c\u4e00\u79cd\u662f\u76f4\u63a5\u5199*\u53f7\uff0c\u4ee3\u8868\u4efb\u4f55\u4e3b\u673a\u90fd\u53ef\u4ee5\u8bbf\u95ee\uff1b\u7b2c\u4e8c\u79cd\u5219\u662f\u5b9e\u9a8c\u4e2d\u91c7\u7528\u7684192.168.10.*\u901a\u914d\u683c\u5f0f\uff0c\u4ee3\u8868\u6765\u81ea192.168.10.0\/24\u7f51\u6bb5\u7684\u4e3b\u673a\uff1b\u7b2c\u4e09\u79cd\u5219\u662f\u76f4\u63a5\u5199\u5bf9\u65b9\u7684IP\u5730\u5740\uff0c\u5982192.168.10.20\uff0c\u4ee3\u8868\u4ec5\u5141\u8bb8\u67d0\u4e2a\u4e3b\u673a\u8fdb\u884c\u8bbf\u95ee\u3002<\/p>\n

\u7b2c4\u6b65<\/strong>\uff1a\u542f\u52a8\u548c\u542f\u7528NFS\u670d\u52a1\u7a0b\u5e8f\u3002\u7531\u4e8e\u5728\u4f7f\u7528NFS\u670d\u52a1\u8fdb\u884c\u6587\u4ef6\u5171\u4eab\u4e4b\u524d\uff0c\u9700\u8981\u4f7f\u7528RPC\uff08Remote Procedure Call\uff0c\u8fdc\u7a0b\u8fc7\u7a0b\u8c03\u7528\uff09\u670d\u52a1\u5c06NFS\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u53f7\u7b49\u4fe1\u606f\u53d1\u9001\u7ed9\u5ba2\u6237\u7aef\u3002\u56e0\u6b64\uff0c\u5728\u542f\u52a8NFS\u670d\u52a1\u4e4b\u524d\uff0c\u8fd8\u9700\u8981\u987a\u5e26\u91cd\u542f\u5e76\u542f\u7528rpcbind\u670d\u52a1\u7a0b\u5e8f\uff0c\u5e76\u5c06\u8fd9\u4e24\u4e2a\u670d\u52a1\u4e00\u5e76\u52a0\u5165\u5f00\u673a\u542f\u52a8\u9879\u4e2d\u3002<\/p>\n

[root@linuxprobe ~]# systemctl restart rpcbind\r\n[root@linuxprobe ~]# systemctl enable rpcbind\r\n[root@linuxprobe ~]# systemctl start nfs-server\r\n[root@linuxprobe ~]# systemctl enable nfs-server\r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/nfs-server.service \u2192 \/usr\/lib\/systemd\/system\/nfs-server.service.\r\n<\/pre>\n

NFS\u5ba2\u6237\u7aef\u7684\u914d\u7f6e\u6b65\u9aa4\u4e5f\u5341\u5206\u7b80\u5355\u3002\u5148\u4f7f\u7528showmount\u547d\u4ee4\u67e5\u8be2NFS\u670d\u52a1\u5668\u7684\u8fdc\u7a0b\u5171\u4eab\u4fe1\u606f\uff0c\u5fc5\u8981\u7684\u53c2\u6570\u89c1\u886812-8\uff0c\u5176\u8f93\u51fa\u683c\u5f0f\u4e3a\u201c\u5171\u4eab\u7684\u76ee\u5f55\u540d\u79f0 \u5141\u8bb8\u4f7f\u7528\u5ba2\u6237\u7aef\u5730\u5740\u201d\u3002<\/p>\n

\u886812-8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 showmount\u547d\u4ee4\u4e2d\u53ef\u7528\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n\n\n\n\n\n\n
\u53c2\u6570<\/td>\n\u4f5c\u7528<\/td>\n<\/tr>\n
-e<\/td>\n\u663e\u793aNFS\u670d\u52a1\u5668\u7684\u5171\u4eab\u5217\u8868<\/td>\n<\/tr>\n
-a<\/td>\n\u663e\u793a\u672c\u673a\u6302\u8f7d\u7684\u6587\u4ef6\u8d44\u6e90\u7684\u60c5\u51b5NFS\u8d44\u6e90\u7684\u60c5\u51b5<\/td>\n<\/tr>\n
-v<\/td>\n\u663e\u793a\u7248\u672c\u53f7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

<\/p>\n

[root@linuxprobe ~]# showmount -e 192.168.10.10\r\nExport list for 192.168.10.10:\r\n\/nfsfile 192.168.10.*\r\n<\/pre>\n

\u7136\u540e\u5728NFS\u5ba2\u6237\u7aef\u521b\u5efa\u4e00\u4e2a\u6302\u8f7d\u76ee\u5f55\u3002\u4f7f\u7528mount\u547d\u4ee4\u5e76\u7ed3\u5408-t\u53c2\u6570\uff0c\u6307\u5b9a\u8981\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u7684\u7c7b\u578b\uff0c\u5e76\u5728\u547d\u4ee4\u540e\u9762\u5199\u4e0a\u670d\u52a1\u5668\u7684IP\u5730\u5740\u3001\u670d\u52a1\u5668\u4e0a\u7684\u5171\u4eab\u76ee\u5f55\u4ee5\u53ca\u8981\u6302\u8f7d\u5230\u672c\u5730\u7cfb\u7edf\uff08\u5373\u5ba2\u6237\u7aef\uff09\u7684\u76ee\u5f55\u3002<\/p>\n

[root@linuxprobe ~]# mkdir \/nfsfile\r\n[root@linuxprobe ~]# mount -t nfs 192.168.10.10:\/nfsfile \/nfsfile\r\n[root@linuxprobe ~]# df -h\r\nFilesystem              Size  Used Avail Use% Mounted on\r\ndevtmpfs                969M     0  969M   0% \/dev\r\ntmpfs                   984M     0  984M   0% \/dev\/shm\r\ntmpfs                   984M  9.6M  974M   1% \/run\r\ntmpfs                   984M     0  984M   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root    17G  3.9G   14G  23% \/\r\n\/dev\/sr0                6.7G  6.7G     0 100% \/media\/cdrom\r\n\/dev\/sda1              1014M  152M  863M  15% \/boot\r\ntmpfs                   197M   16K  197M   1% \/run\/user\/42\r\ntmpfs                   197M  3.4M  194M   2% \/run\/user\/0\r\n192.168.10.10:\/nfsfile   17G  3.9G   14G  23% \/nfsfile\r\n<\/strong><\/pre>\n

\u6302\u8f7d\u6210\u529f\u540e\u5c31\u5e94\u8be5\u80fd\u591f\u987a\u5229\u5730\u770b\u5230\u5728\u6267\u884c\u524d\u9762\u7684\u64cd\u4f5c\u65f6\u5199\u5165\u7684\u6587\u4ef6\u5185\u5bb9\u4e86\u3002\u5982\u679c\u5e0c\u671bNFS\u6587\u4ef6\u5171\u4eab\u670d\u52a1\u80fd\u4e00\u76f4\u6709\u6548\uff0c\u5219\u9700\u8981\u5c06\u5176\u5199\u5165\u5230fstab\u6587\u4ef6\u4e2d\uff1a<\/p>\n

[root@linuxprobe ~]# cat \/nfsfile\/readme\r\nwelcome to lrxjmw.cn\r\n[root@linuxprobe ~]# vim \/etc\/fstab \r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Thu Feb 25 10:42:11 2021\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root                     \/                       xfs     defaults        0 0\r\nUUID=37d0bdc6-d70d-4cc0-b356-51195ad90369 \/boot                   xfs     defaults        0 0\r\n\/dev\/mapper\/rhel-swap                     swap                    swap    defaults        0 0\r\n\/dev\/cdrom                                \/media\/cdrom            iso9660 defaults        0 0 \r\n192.168.10.10:\/nfsfile                    \/nfsfile                nfs     defaults        0 0   <\/strong><\/pre>\n
12.3 autofs\u81ea\u52a8\u6302\u8f7d\u670d\u52a1<\/strong><\/span><\/h5>\n

\u65e0\u8bba\u662fSamba\u670d\u52a1\u8fd8\u662fNFS\u670d\u52a1\uff0c\u90fd\u9700\u8981\u5c06\u6302\u8f7d\u4fe1\u606f\u5199\u5165\u5230\/etc\/fstab\u6587\u4ef6\u4e2d\uff0c\u8fd9\u6837\u8fdc\u7a0b\u5171\u4eab\u8d44\u6e90\u5c31\u4f1a\u81ea\u52a8\u968f\u670d\u52a1\u5668\u5f00\u673a\u800c\u6302\u8f7d\u3002\u8fd9\u867d\u7136\u5f88\u65b9\u4fbf\uff0c\u4f46\u5982\u679c\u6302\u8f7d\u7684\u8fdc\u7a0b\u8d44\u6e90\u592a\u591a\uff0c\u4f1a\u7ed9\u7f51\u7edc\u5e26\u5bbd\u548c\u670d\u52a1\u5668\u7684\u786c\u4ef6\u8d44\u6e90\u5e26\u6765\u5f88\u5927\u8d1f\u62c5\u3002\u5982\u679c\u6302\u8f7d\u7684\u8d44\u6e90\u957f\u671f\u4e0d\u4f7f\u7528\uff0c\u4e5f\u4f1a\u9020\u6210\u670d\u52a1\u5668\u786c\u4ef6\u8d44\u6e90\u7684\u6d6a\u8d39\u3002\u53ef\u80fd\u6709\u4eba\u4f1a\u8bf4\uff0c\u201c\u53ef\u4ee5\u5728\u6bcf\u6b21\u4f7f\u7528\u4e4b\u524d\u6267\u884cmount\u547d\u4ee4\u8fdb\u884c\u624b\u52a8\u6302\u8f7d\u201d\u3002\u867d\u7136\u8fd9\u662f\u4e00\u4e2a\u9009\u62e9\uff0c\u4f46\u6bcf\u6b21\u90fd\u9700\u8981\u5148\u6302\u8f7d\u518d\u4f7f\u7528\uff0c\u786e\u5b9e\u5f88\u9ebb\u70e6\u3002<\/p>\n

autofs\u81ea\u52a8\u6302\u8f7d\u670d\u52a1\u53ef\u4ee5\u5e2e\u6211\u4eec\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u3002\u4e0emount\u547d\u4ee4\u4e0d\u540c\uff0cautofs\u670d\u52a1\u7a0b\u5e8f\u662f\u4e00\u79cdLinux\u7cfb\u7edf\u5b88\u62a4\u8fdb\u7a0b\uff0c\u5f53\u68c0\u6d4b\u5230\u7528\u6237\u8bd5\u56fe\u8bbf\u95ee\u4e00\u4e2a\u5c1a\u672a\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u65f6\uff0c\u5c06\u81ea\u52a8\u6302\u8f7d\u8be5\u6587\u4ef6\u7cfb\u7edf\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c06\u6302\u8f7d\u4fe1\u606f\u586b\u5165\/etc\/fstab\u6587\u4ef6\u540e\uff0c\u7cfb\u7edf\u5728\u6bcf\u6b21\u5f00\u673a\u65f6\u90fd\u4f1a\u81ea\u52a8\u6302\u8f7d\uff0c\u800cautofs\u670d\u52a1\u7a0b\u5e8f\u5219\u662f\u5728\u7528\u6237\u9700\u8981\u4f7f\u7528\u8be5\u6587\u4ef6\u7cfb\u7edf\u65f6\u624d\u53bb\u52a8\u6001\u6302\u8f7d\uff0c\u4ece\u800c\u8282\u7ea6\u4e86\u7f51\u7edc\u8d44\u6e90\u548c\u670d\u52a1\u5668\u7684\u786c\u4ef6\u8d44\u6e90\u3002<\/p>\n

\u9996\u5148\u9700\u8981\u81ea\u884c\u5b89\u88c5autofs\u670d\u52a1\u7a0b\u5e8f\uff1a<\/p>\n

[root@linuxprobe ~]# dnf install autofs\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nLast metadata expiration check: 0:28:58 ago on Sat 06 Mar 2021 04:57:01 AM CST.\r\nDependencies resolved.\r\n========================================================================================\r\n Package           Arch              Version                    Repository         Size\r\n========================================================================================\r\nInstalling:\r\n autofs            x86_64            1:5.1.4-29.el8             BaseOS            755 k\r\n\r\nTransaction Summary\r\n========================================================================================\r\nInstall  1 Package\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r\nInstalled:\r\n  autofs-1:5.1.4-29.el8.x86_64                                                          \r\n\r\nComplete!\r\n<\/pre>\n

\u5904\u4e8e\u751f\u4ea7\u73af\u5883\u4e2d\u7684Linux\u670d\u52a1\u5668\uff0c\u4e00\u822c\u4f1a\u540c\u65f6\u7ba1\u7406\u8bb8\u591a\u8bbe\u5907\u7684\u6302\u8f7d\u64cd\u4f5c\u3002\u5982\u679c\u628a\u8fd9\u4e9b\u8bbe\u5907\u7684\u6302\u8f7d\u4fe1\u606f\u90fd\u5199\u5165autofs\u670d\u52a1\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u65e0\u7591\u4f1a\u8ba9\u4e3b\u914d\u7f6e\u6587\u4ef6\u53d8\u5f97\u81c3\u80bf\uff0c\u4e0d\u5229\u4e8e\u670d\u52a1\u6267\u884c\u6548\u7387\uff0c\u4e5f\u4e0d\u5229\u4e8e\u65e5\u540e\u4fee\u6539\u914d\u7f6e\u5185\u5bb9\u3002\u56e0\u6b64\uff0c\u5728autofs\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u9700\u8981\u6309\u7167\u201c\u6302\u8f7d\u76ee\u5f55 \u5b50\u914d\u7f6e\u6587\u4ef6\u201d\u7684\u683c\u5f0f\u8fdb\u884c\u586b\u5199\u3002\u6302\u8f7d\u76ee\u5f55\u662f\u8bbe\u5907\u6302\u8f7d\u4f4d\u7f6e\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5149\u76d8\u8bbe\u5907\u4e00\u822c\u6302\u8f7d\u5230\/media\/cdrom\u76ee\u5f55\u4e2d\uff0c\u90a3\u4e48\u6302\u8f7d\u76ee\u5f55\u5199\u6210\/media\u5373\u53ef\u3002\u5bf9\u5e94\u7684\u5b50\u914d\u7f6e\u6587\u4ef6\u5219\u5bf9\u8fd9\u4e2a\u6302\u8f7d\u76ee\u5f55\u5185\u7684\u6302\u8f7d\u8bbe\u5907\u4fe1\u606f\u4f5c\u8fdb\u4e00\u6b65\u8bf4\u660e\u3002\u5b50\u914d\u7f6e\u6587\u4ef6\u9700\u8981\u7528\u6237\u81ea\u884c\u5b9a\u4e49\uff0c\u6587\u4ef6\u540d\u5b57\u6ca1\u6709\u4e25\u683c\u8981\u6c42\uff0c\u4f46\u540e\u7f00\u5efa\u8bae\u4ee5.misc\u7ed3\u675f\u3002\u5177\u4f53\u7684\u914d\u7f6e\u53c2\u6570\u5982\u3010\u6539\u6539\u6539\u3011<\/span><\/strong>\u7b2c7\u884c\u7684\u52a0\u7c97\u5b57\u6240\u793a\u3002<\/p>\n

[root@linuxprobe ~]# vim \/etc\/auto.master\r\n#\r\n# Sample auto.master file\r\n# This is a 'master' automounter map and it has the following format:\r\n# mount-point [map-type[,format]:]map [options]\r\n# For details of the format look at auto.master(5).\r\n#\r\n\/media  \/etc\/iso.misc<\/strong>\r\n\/misc   \/etc\/auto.misc\r\n#\r\n# NOTE: mounts done from a hosts map will be mounted with the\r\n#       \"nosuid\" and \"nodev\" options unless the \"suid\" and \"dev\"\r\n#       options are explicitly given.\r\n#\r\n\/net    -hosts\r\n#\r\n# Include \/etc\/auto.master.d\/*.autofs\r\n# The included files must conform to the format of this file.\r\n#\r\n+dir:\/etc\/auto.master.d\r\n#\r\n# If you have fedfs set up and the related binaries, either\r\n# built as part of autofs or installed from another package,\r\n# uncomment this line to use the fedfs program map to access\r\n# your fedfs mounts.\r\n#\/nfs4  \/usr\/sbin\/fedfs-map-nfs4 nobind\r\n#\r\n# Include central master map if it can be found using\r\n# nsswitch sources.\r\n#\r\n# Note that if there are entries for \/net or \/misc (as\r\n# above) in the included master map any keys that are the\r\n# same will not be seen as the first read key seen takes\r\n# precedence.\r\n#\r\n+auto.master\r\n<\/pre>\n

\u5728\u5b50\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5e94\u6309\u7167\u201c\u6302\u8f7d\u76ee\u5f55 \u6302\u8f7d\u6587\u4ef6\u7c7b\u578b\u53ca\u6743\u9650 :\u8bbe\u5907\u540d\u79f0\u201d\u7684\u683c\u5f0f\u8fdb\u884c\u586b\u5199\u3002\u4f8b\u5982\uff0c\u8981\u628a\u5149\u76d8\u8bbe\u5907\u6302\u8f7d\u5230\/media\/iso\u76ee\u5f55\u4e2d\uff0c\u53ef\u5c06\u6302\u8f7d\u76ee\u5f55\u5199\u4e3aiso\uff0c\u800c-fstype\u4e3a\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u53c2\u6570\uff0ciso9660\u4e3a\u5149\u76d8\u8bbe\u5907\u683c\u5f0f\uff0cro\u3001nosuid\u53canodev\u4e3a\u5149\u76d8\u8bbe\u5907\u5177\u4f53\u7684\u6743\u9650\u53c2\u6570\uff0c\/dev\/cdrom\u5219\u662f\u5b9a\u4e49\u8981\u6302\u8f7d\u7684\u8bbe\u5907\u540d\u79f0\u3002\u914d\u7f6e\u5b8c\u6210\u540e\u518d\u987a\u624b\u5c06autofs\u670d\u52a1\u7a0b\u5e8f\u542f\u52a8\u5e76\u52a0\u5165\u5230\u7cfb\u7edf\u542f\u52a8\u9879\u4e2d\uff1a<\/p>\n

[root@linuxprobe ~]# vim \/etc\/iso.misc\r\niso \u00a0\u00a0-fstype=iso9660,ro,nosuid,nodev :\/dev\/cdrom\r\n[root@linuxprobe ~]# systemctl start autofs \r\n[root@linuxprobe ~]# systemctl enable autofs \r\nCreated symlink \/etc\/systemd\/system\/multi-user.target.wants\/autofs.service \u2192 \/usr\/lib\/systemd\/system\/autofs.service.<\/pre>\n

\u63a5\u4e0b\u6765\u5c06\u53d1\u751f\u4e00\u4ef6\u975e\u5e38\u6709\u8da3\u7684\u4e8b\u60c5\u3002\u5148\u67e5\u770b\u5f53\u524d\u7684\u5149\u76d8\u8bbe\u5907\u6302\u8f7d\u60c5\u51b5\uff0c\u786e\u8ba4\u5149\u76d8\u8bbe\u5907\u6ca1\u6709\u88ab\u6302\u8f7d\u4e0a\uff0c\u800c\u4e14\/media\u76ee\u5f55\u4e2d\u6839\u672c\u5c31\u6ca1\u6709iso\u5b50\u76ee\u5f55\uff1a<\/p>\n

[root@linuxprobe ~]# umount \/dev\/cdrom\r\n[root@linuxprobe ~]# df -h\r\nFilesystem              Size  Used Avail Use% Mounted on\r\ndevtmpfs                969M     0  969M   0% \/dev\r\ntmpfs                   984M     0  984M   0% \/dev\/shm\r\ntmpfs                   984M  9.6M  974M   1% \/run\r\ntmpfs                   984M     0  984M   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root    17G  3.9G   14G  23% \/\r\n\/dev\/sda1              1014M  152M  863M  15% \/boot\r\ntmpfs                   197M   16K  197M   1% \/run\/user\/42\r\ntmpfs                   197M  3.4M  194M   2% \/run\/user\/0\r\n192.168.10.10:\/nfsfile   17G  3.9G   14G  23% \/nfsfile\r\n[root@linuxprobe ~]# cd \/media\r\n[root@linuxprobe media]# ls\r\n[root@linuxprobe media]#\r\n<\/pre>\n

\u4f46\u662f\uff0c\u6211\u4eec\u5374\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u5207\u6362\u5230\u8fd9\u4e2aiso\u5b50\u76ee\u5f55\u4e2d\uff0c\u800c\u4e14\u5149\u76d8\u8bbe\u5907\u4f1a\u88ab\u7acb\u5373\u81ea\u52a8\u6302\u8f7d\u4e0a\uff0c\u7136\u540e\u4e5f\u5c31\u80fd\u987a\u5229\u67e5\u770b\u5149\u76d8\u5185\u7684\u5185\u5bb9\u4e86\u3002<\/p>\n

[root@linuxprobe media]# cd iso\r\n[root@linuxprobe iso]# ls\r\nAppStream  EULA              images      RPM-GPG-KEY-redhat-beta\r\nBaseOS     extra_files.json  isolinux    RPM-GPG-KEY-redhat-release\r\nEFI        GPL               media.repo  TRANS.TBL\r\n[root@linuxprobe iso]# df -h\r\nFilesystem              Size  Used Avail Use% Mounted on\r\ndevtmpfs                969M     0  969M   0% \/dev\r\ntmpfs                   984M     0  984M   0% \/dev\/shm\r\ntmpfs                   984M  9.6M  974M   1% \/run\r\ntmpfs                   984M     0  984M   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root    17G  3.9G   14G  23% \/\r\n\/dev\/sda1              1014M  152M  863M  15% \/boot\r\ntmpfs                   197M   16K  197M   1% \/run\/user\/42\r\ntmpfs                   197M  3.4M  194M   2% \/run\/user\/0\r\n192.168.10.10:\/nfsfile   17G  3.9G   14G  23% \/nfsfile\r\n\/dev\/sr0                6.7G  6.7G     0 100% \/media\/iso<\/strong>\r\n<\/pre>\n
\n
\n

Tips<\/strong><\/h3>\n<\/div>\n
\n

\u54a6\uff1f\u600e\u4e48\u5149\u76d8\u8bbe\u5907\u7684\u540d\u79f0\u53d8\u6210\u4e86\/dev\/sr0\u5462\uff1f\u5b9e\u9645\u4e0a\u5b83\u548c\/dev\/cdrom\u662f\u5feb\u6377\u65b9\u5f0f\u7684\u5173\u7cfb\uff0c\u53ea\u662f\u540d\u79f0\u4e0d\u540c\u800c\u5df2\u3002<\/p>\n

[root@linuxprobe ~]# ls -l \/dev\/cdrom\r\nlrwxrwxrwx. 1 root root 3 Feb 26 00:09 \/dev\/cdrom -> sr0<\/pre>\n<\/div>\n<\/div>\n

\u662f\u4e0d\u662f\u5f88\u6709\u65b9\u4fbf\uff1f\uff01\u8d81\u7740\u521a\u5b66\u7684\u77e5\u8bc6\u8fd8\u6ca1\u5fd8\uff0c\u6211\u4eec\u518d\u5bf9NFS\u670d\u52a1\u52a8\u624b\u8bd5\u8bd5\u5427\u3002<\/p>\n

\u9996\u5148\u628aNFS\u5171\u4eab\u76ee\u5f55\u5378\u8f7d\u6389\u3002\u5728autofs\u670d\u52a1\u7a0b\u5e8f\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4e2d\u4f1a\u6709\u4e00\u4e2a\u201c\/misc \/etc\/auto.misc\u201d\u53c2\u6570\uff0c\u8fd9\u4e2aauto.misc\u76f8\u5f53\u4e8e\u81ea\u52a8\u6302\u8f7d\u7684\u53c2\u8003\u6587\u4ef6\uff0c\u5b83\u9ed8\u8ba4\u5c31\u5df2\u7ecf\u5b58\u5728\uff0c\u6240\u4ee5\u8fd9\u91cc\u4e0d\u9700\u8981\u8fdb\u884c\u4efb\u4f55\u64cd\u4f5c\uff1a<\/p>\n

[root@linuxprobe ~]# umount \/nfsfile\r\n[root@linuxprobe ~]# vim \/etc\/auto.master\r\n#\r\n# Sample auto.master file\r\n# This is a 'master' automounter map and it has the following format:\r\n# mount-point [map-type[,format]:]map [options]\r\n# For details of the format look at auto.master(5).\r\n#\r\n\/media   \/etc\/iso.misc\r\n\/misc    \/etc\/auto.misc\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n

\u63a5\u4e0b\u6765\u627e\u5230\u8fd9\u4e2a\u5bf9\u5e94\u7684auto.misc\u6587\u4ef6\uff0c\u586b\u5199\u672c\u5730\u6302\u8f7d\u7684\u8def\u5f84\u548cNFS\u670d\u52a1\u5668\u7684\u6302\u8f7d\u4fe1\u606f\uff1a<\/p>\n

[root@linuxprobe ~]# vim \/etc\/auto.misc\r\n#\r\n# This is an automounter map and it has the following format\r\n# key [ -mount-options-separated-by-comma ] location\r\n# Details may be found in the autofs(5) manpage\r\nnfsfile         192.168.10.10:\/nfsfile<\/strong>\r\ncd              -fstype=iso9660,ro,nosuid,nodev :\/dev\/cdrom\r\n\r\n# the following entries are samples to pique your imagination\r\n#linux          -ro,soft,intr           ftp.example.org:\/pub\/linux\r\n#boot           -fstype=ext2            :\/dev\/hda1\r\n#floppy         -fstype=auto            :\/dev\/fd0\r\n#floppy         -fstype=ext2            :\/dev\/fd0\r\n#e2floppy       -fstype=ext2            :\/dev\/fd0\r\n#jaz            -fstype=ext2            :\/dev\/sdc1\r\n#removable      -fstype=ext2            :\/dev\/hdd\r\n<\/pre>\n

\u5728\u586b\u5199\u5b8c\u6bd5\u540e\u91cd\u542fautofs\u670d\u52a1\u7a0b\u5e8f\uff0c\u5f53\u7528\u6237\u8fdb\u5165\u5230\/misc\/nfsfile\u76ee\u5f55\u65f6\uff0c\u4fbf\u4f1a\u81ea\u52a8\u6302\u8f7d\u5171\u4eab\u4fe1\u606f\uff1a<\/p>\n

[root@linuxprobe ~]# systemctl restart autofs\r\n[root@linuxprobe ~]# cd \/misc\/nfsfile\r\n[root@linuxprobe nfsfile]# df -h\r\nFilesystem              Size  Used Avail Use% Mounted on\r\ndevtmpfs                969M     0  969M   0% \/dev\r\ntmpfs                   984M     0  984M   0% \/dev\/shm\r\ntmpfs                   984M  9.6M  974M   1% \/run\r\ntmpfs                   984M     0  984M   0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root    17G  3.9G   14G  23% \/\r\n\/dev\/sda1              1014M  152M  863M  15% \/boot\r\ntmpfs                   197M   16K  197M   1% \/run\/user\/42\r\ntmpfs                   197M  3.4M  194M   2% \/run\/user\/0\r\n192.168.10.10:\/nfsfile   17G  3.9G   14G  23% \/misc\/nfsfile<\/strong>\r\n\/dev\/sr0                6.7G  6.7G     0 100% \/media\/iso\r\n<\/pre>\n

\u771f\u68d2\uff01\u53c8\u5b66\u4e60\u5230\u4e86\u4e00\u4e2a\u5168\u65b0\u7684\u6280\u80fd\u3002\u6709\u4e86autofs\u670d\u52a1\uff0c\u6211\u4eec\u7684\u5de5\u4f5c\u53d8\u5f97\u66f4\u52a0\u4fbf\u6377\uff0c\u4e5f\u5c31\u4e0d\u7528\u603b\u60f3\u7740\u6302\u8f7d\u8bbe\u5907\u7684\u95ee\u9898\u4e86\uff0c\u5b83\u4f1a\u5e2e\u6211\u4eec\u81ea\u52a8\u5b8c\u6210\u3002<\/p>\n

\u7a0d\u4f5c\u4f11\u606f\uff0c\u51c6\u5907\u7ee7\u7eed\u524d\u8fdb\uff01<\/p>\n

\u51fa\u73b0\u95ee\u9898?\u5927\u80c6\u63d0\u95ee!<\/strong><\/span><\/p>\n

\u56e0\u8bfb\u8005\u4eec\u786c\u4ef6\u4e0d\u540c\u6216\u64cd\u4f5c\u9519\u8bef\u90fd\u53ef\u80fd\u5bfc\u81f4\u5b9e\u9a8c\u914d\u7f6e\u51fa\u9519\uff0c\u8bf7\u8010\u5fc3\u518d\u4ed4\u7ec6\u770b\u770b\u64cd\u4f5c\u6b65\u9aa4\u5427\uff0c\u4e0d\u8981\u6c14\u9981~<\/p>\n

Linux\u6280\u672f\u4ea4\u6d41\u5b66\u4e60\u8bf7\u52a0\u8bfb\u8005\u7fa4\uff08\u63a8\u8350<\/span><\/strong>\uff09\uff1ahttps:\/\/lrxjmw.cn\/club<\/a><\/p>\n

*\u672c\u7fa4\u7279\u8272\uff1a\u786e\u4fdd\u6bcf\u4e00\u4f4d\u7fa4\u53cb\u90fd\u662f\u300aLinux\u5c31\u8be5\u8fd9\u4e48\u5b66\u300b\u7684\u8bfb\u8005\uff0c\u7b54\u7591\u66f4\u6709\u9488\u5bf9\u6027\uff0c\u4e0d\u5b9a\u671f\u9886\u53d6\u5b9a\u5236\u793c\u54c1\u3002<\/p><\/blockquote>\n

\u672c\u7ae0\u8282\u7684\u590d\u4e60\u4f5c\u4e1a<\/span>(\u7b54\u6848\u5c31\u5728\u95ee\u9898\u7684\u4e0b\u4e00\u884c\u54e6\uff0c\u7528\u9f20\u6807\u9009\u4e2d\u5373\u53ef\u770b\u5230\u7684~)<\/strong><\/span><\/p>\n

1\uff0e\u8981\u60f3\u5b9e\u73b0Linux\u7cfb\u7edf\u4e0eWindows\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\uff0c\u80fd\u5426\u4f7f\u7528NFS\u670d\u52a1\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u4e0d\u53ef\u4ee5\uff0c\u5e94\u8be5\u4f7f\u7528Samba\u670d\u52a1\u7a0b\u5e8f\uff0cNFS\u670d\u52a1\u4ec5\u80fd\u5b9e\u73b0Linux\u7cfb\u7edf\u4e4b\u95f4\u7684\u6587\u4ef6\u5171\u4eab\u3002<\/span><\/p>\n

2\uff0e\u7528\u4e8e\u7ba1\u7406Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u72ec\u7acb\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\u7684\u547d\u4ee4\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>pdbedit\u547d\u4ee4\u7528\u4e8e\u7ba1\u7406Samba\u670d\u52a1\u7a0b\u5e8f\u7684\u8d26\u6237\u4fe1\u606f\u6570\u636e\u5e93\u3002<\/span><\/p>\n

3\uff0e\u7b80\u8ff0\u5728Windows\u7cfb\u7edf\u4e2d\u4f7f\u7528Samba\u670d\u52a1\u7a0b\u5e8f\u6765\u5171\u4eab\u8d44\u6e90\u7684\u65b9\u6cd5\u3002<\/p>\n

\u7b54\uff1a<\/strong>\u5728\u201c\u5f00\u59cb\u201d\u83dc\u5355\u7684\u8f93\u5165\u6846\u4e2d\u6309\u7167\\\\192.168.10.10\u7684\u683c\u5f0f\u8f93\u5165\u8bbf\u95ee\u547d\u4ee4\u5e76\u56de\u8f66\u6267\u884c\u5373\u53ef\u3002\u5728Windows\u7684\u201c\u8fd0\u884c\u201d\u547d\u4ee4\u6846\u4e2d\u6309\u7167\\\\192.168.10.10\u7684\u683c\u5f0f\u8f93\u5165\u8bbf\u95ee\u547d\u4ee4\u5e76\u6309\u56de\u8f66\u952e\u5373\u53ef\u3002<\/span><\/p>\n

4\uff0e\u7b80\u8ff0\u5728Linux\u7cfb\u7edf\u4e2d\u4f7f\u7528Samba\u670d\u52a1\u7a0b\u5e8f\u6765\u5171\u4eab\u8d44\u6e90\u7684\u6b65\u9aa4\u65b9\u6cd5\u3002<\/p>\n

\u7b54\uff1a<\/strong>\u9996\u5148\u5e94\u521b\u5efa\u5bc6\u7801\u8ba4\u8bc1\u6587\u4ef6\u4ee5\u53ca\u6302\u8f7d\u76ee\u5f55\uff0c\u7136\u540e\u628a\u6302\u8f7d\u4fe1\u606f\u5199\u5165\/etc\/fstab\u6587\u4ef6\u4e2d\uff0c\u6700\u540e\u6267\u884cmount -a\u547d\u4ee4\u6302\u8f7d\u4f7f\u7528\u3002<\/span><\/p>\n

5\uff0e\u5982\u679c\u5728Linux\u7cfb\u7edf\u4e2d\u9ed8\u8ba4\u6ca1\u6709\u5b89\u88c5NFS\u670d\u52a1\u7a0b\u5e8f\uff0c\u5219\u9700\u8981\u5b89\u88c5\u4ec0\u4e48\u8f6f\u4ef6\u5305\u5462\uff1f<\/p>\n

\u7b54\uff1a<\/strong>NFS\u670d\u52a1\u7a0b\u5e8f\u7684\u8f6f\u4ef6\u5305\u540d\u5b57\u4e3anfs-utils\uff0c\u56e0\u6b64\u6267\u884cyum install nfs-utils\u547d\u4ee4\u5373\u53ef\u3002<\/span><\/p>\n

6\uff0e\u5728\u4f7f\u7528NFS\u670d\u52a1\u5171\u4eab\u8d44\u6e90\u65f6\uff0c\u82e5\u5e0c\u671b\u65e0\u8bbaNFS\u5ba2\u6237\u7aef\u4f7f\u7528\u4ec0\u4e48\u8d26\u6237\u6765\u8bbf\u95ee\u5171\u4eab\u8d44\u6e90\uff0c\u90fd\u4f1a\u88ab\u6620\u5c04\u4e3a\u672c\u5730\u533f\u540d\u7528\u6237\uff0c\u5219\u9700\u8981\u6dfb\u52a0\u54ea\u4e2a\u53c2\u6570\u3002<\/p>\n

\u7b54\uff1a<\/strong>\u9700\u8981\u6dfb\u52a0all_squash\u53c2\u6570\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u4fdd\u8bc1\u670d\u52a1\u5668\u7684\u5b89\u5168\u3002<\/span><\/p>\n

7\uff0e\u5ba2\u6237\u7aef\u5728\u67e5\u770b\u8fdc\u7a0bNFS\u670d\u52a1\u5668\u4e0a\u7684\u5171\u4eab\u8d44\u6e90\u5217\u8868\u65f6\uff0c\u9700\u8981\u4f7f\u7528\u54ea\u4e2a\u547d\u4ee4\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u4f7f\u7528showmount\u547d\u4ee4\u5373\u53ef\u770b\u5230NFS\u670d\u52a1\u5668\u4e0a\u7684\u8d44\u6e90\u5171\u4eab\u60c5\u51b5\u3002<\/span><\/p>\n

8\uff0e\u7b80\u8ff0autofs\u670d\u52a1\u7a0b\u5e8f\u7684\u4f5c\u7528\u3002<\/p>\n

\u7b54\uff1a<\/strong>\u5b9e\u73b0\u52a8\u6001\u7075\u6d3b\u7684\u8bbe\u5907\u6302\u8f7d\u64cd\u4f5c\uff0c\u800c\u4e14\u53ea\u6709\u68c0\u6d4b\u5230\u7528\u6237\u8bd5\u56fe\u8bbf\u95ee\u4e00\u4e2a\u5c1a\u672a\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u65f6\uff0c\u624d\u81ea\u52a8\u6302\u8f7d\u8be5\u6587\u4ef6\u7cfb\u7edf\u3002<\/span><\/p>\n

9\uff0eautofs\u670d\u52a1\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u91cc\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u4f4d\u7f6e\u5728\/etc\/auto.master\u3002<\/span><\/p>\n

10\uff0eautofs\u670d\u52a1\u7684\u5b50\u914d\u7f6e\u6587\u4ef6\u540e\u7f00\u662f\u4ec0\u4e48\uff1f<\/p>\n

\u7b54\uff1a<\/strong>\u5efa\u8bae\u540e\u7f00\u662f\u7528.misc\uff0c\u4f46\u5b9e\u6d4b\u7528\u5176\u4ed6\u540e\u7f00\u4e5f\u6ca1\u6709\u5f71\u54cd\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"

\u7ae0\u8282\u7b80\u8ff0\uff1a \u672c\u7ae0\u9996\u5148\u901a\u8fc7\u6bd4\u8f83\u6587\u4ef6\u4f20\u8f93\u548c\u6587\u4ef6\u5171\u4eab\u8fd9\u4e24\u79cd\u8d44\u6e90\u4ea4\u6362\u65b9\u5f0f\uff0c\u5f15\u5165Samba\u670d\u52a1\u7684\u7406\u8bba\u77e5\u8bc6\uff0c\u4ecb\u7ecdSMB\u534f\u8bae […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2632],"tags":[],"class_list":["post-291359","post","type-post","status-publish","format-standard","hentry","category-rhel10"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/291359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=291359"}],"version-history":[{"count":7,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/291359\/revisions"}],"predecessor-version":[{"id":292465,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/291359\/revisions\/292465"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=291359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=291359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=291359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}