{"id":698,"date":"2016-03-21T11:21:06","date_gmt":"2016-03-21T03:21:06","guid":{"rendered":"https:\/\/yanjingang.com\/blog\/?p=698"},"modified":"2020-01-13T13:42:37","modified_gmt":"2020-01-13T05:42:37","slug":"samba%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/yanjingang.com\/blog\/?p=698","title":{"rendered":"samba\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528"},"content":{"rendered":"<p>samba\u4e3b\u8981\u7528\u4e8elinux\u5411window\u5171\u4eab\u6587\u4ef6\uff0c\u672c\u6587\u8bb2\u89e3\u5982\u4f55\u5728linux\u4e2d\u5b89\u88c5\u3001\u914d\u7f6e\u5e76\u5728windows\u6302\u8f7d\u3002<\/p>\n<h3><strong>1.centos\u5b89\u88c5samba<\/strong><\/h3>\n<pre class=\"pure-highlightjs\"><code class=\"\">yum install samba samba-client samba-swat\r\nrpm -qa |grep samba \u00a0 \u00a0 \u00a0 \u00a0#\u67e5\u770b\u5b89\u88c5\u72b6\u51b5\r\n\/etc\/init.d\/smb restart \u00a0 \u00a0\u00a0#\u542f\u52a8Samba\u670d\u52a1\u5668\uff08centos7\uff1asystemctl start smb.service\uff09\r\nservice smb status \u00a0 \u00a0 \u00a0 \u00a0 #\u67e5\u770bsamba\u7684\u670d\u52a1\u542f\u52a8\u60c5\u51b5\r\nchkconfig --level 35 smb on \u00a0 #\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<\/code><\/pre>\n<h3><strong>2.centos\u914d\u7f6esamba<\/strong><\/h3>\n<pre class=\"pure-highlightjs\"><code class=\"\">vim \/etc\/samba\/smb.conf\r\n[global]\r\nworkgroup = WORKGROUP\r\nunix charset = cp936\r\nmax log size = 500\r\nuseradd -d \/home\/mars -p userpassword mars #\u6dfb\u52a0\u7cfb\u7edf\u7528\u6237\uff1amars\r\nusermod -d \/home\/newpath mars\r\n\r\nsmbpasswd -a mars  #\u6dfb\u52a0samb\u7528\u6237\u5e76\u8bbe\u7f6e\u5bc6\u7801\uff08mars\u662f\u4e0a\u6b65\u6dfb\u52a0\u7684\u7cfb\u7edf\u7528\u6237\uff09\r\nNew SMB password: mars@smb#2016\r\n\r\nservice smbd restart     #\u91cd\u542f\u670d\u52a1<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>3.windows\u5efa\u7acb\u8fde\u63a5<\/strong><\/h3>\n<p>samba.cmd<\/p>\n<p>net use x: \\\\mars.com\\mars &#8220;Mars@smb#2016&#8243; \/user:&#8221;\\mars&#8221;<\/p>\n<h3><strong>4.mac\u5efa\u7acb\u8fde\u63a5<\/strong><\/h3>\n<p>\u5728\u684c\u9762CMD + k\u8c03\u51fa\u8fde\u63a5\u670d\u52a1\u5668\u7a97\u53e3\uff0c\u5728\u670d\u52a1\u5668\u5730\u5740\u8f93\u5165\u6846\u8f93\u5165\u5e76\u6536\u85cfcentos\u5730\u5740\uff1a<\/p>\n<p>smb:\/\/mars.com\/mars<\/p>\n<p>\u70b9\u51fb\u201c\u8fde\u63a5\u201d\u6309\u94ae\uff0c\u8f93\u5165samba\u7528\u6237\u540d\u201cmars\u201d\u548c\u5bc6\u7801\u201cmars@smb#2016\u201d\uff0c\u94fe\u63a5\u6210\u529f\u540e\u5373\u53ef\u5728finder\u7684\u5de6\u4fa7\u5171\u4eab\u673a\u5668\u5217\u8868\u663e\u793a\u8fdc\u7aefsamba\u76ee\u5f55\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>yan 16.3.21<\/p>\n<p>\u53c2\u8003\uff1ahttp:\/\/www.cnblogs.com\/mchina\/archive\/2012\/12\/18\/2816717.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>samba\u4e3b\u8981\u7528\u4e8elinux\u5411window\u5171\u4eab\u6587\u4ef6\uff0c\u672c\u6587\u8bb2\u89e3\u5982\u4f55\u5728linux\u4e2d\u5b89\u88c5\u3001\u914d\u7f6e\u5e76\u5728windows\u6302\u8f7d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[31,36,77],"tags":[140,32,37,342,343],"_links":{"self":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/698"}],"collection":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=698"}],"version-history":[{"count":0,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/698\/revisions"}],"wp:attachment":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}