{"id":1271,"date":"2013-10-03T13:53:26","date_gmt":"2013-10-03T13:53:26","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=1271"},"modified":"2016-01-19T10:53:33","modified_gmt":"2016-01-19T10:53:33","slug":"network-file-share-using-smb","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/software_utilities\/file-sharing\/network-file-share-using-smb","title":{"rendered":"SMB-Network File Sharing"},"content":{"rendered":"<p>\nThe following instructions will set your RPi to share its files on your local network and be accessible by Windows.\n<\/p>\n<p>\nThis is based on the great guide&nbsp;<a href=\"http:\/\/raspberrywebserver.com\/serveradmin\/share-your-raspberry-pis-files-and-folders-across-a-network.html#.UkyEb4asi-3\" target=\"_blank\">here<\/a>.\n<\/p>\n<h4>\nInstall Samba<br \/>\n<\/h4>\n<pre>\r\n<code>\r\nsudo apt-get install samba samba-common-bin\r\n<\/code><\/pre>\n<p>\nSamba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups.&nbsp;Samba-common-bin contains a tool that you&#39;ll need to register users with Samba.\n<\/p>\n<h4>\nConfigure Samba<br \/>\n<\/h4>\n<pre>\r\n<code>\r\nsudo nano \/etc\/samba\/smb.conf\r\n<\/code><\/pre>\n<p>\nSearch for the workgroup line (normally at the top) and if necessary&nbsp;set it to match your workgroup (if you don&#39;t need it set then it can just be left&nbsp;as default, works fine for us not changed)\n<\/p>\n<p>\nBelow it you&#39;ll find the wins support line, if there is a # at the start of the line remove it to stop it being commented out and then ensure it is set to &quot;yes&quot;, so you should have:\n<\/p>\n<pre>\r\n<code>\r\nworkgroup = your_workgroup_name\r\nwins support = yes\r\n<\/code><\/pre>\n<p>\nAdd a section at the bottom which contains the settings for the share:\n<\/p>\n<pre>\r\n<code>\r\n[pihome]\r\n   comment= Pi Home\r\n   path=\/home\/pi\r\n   browseable=Yes\r\n   writeable=Yes\r\n   only guest=no\r\n   create mask=0777\r\n   directory mask=0777\r\n   public=no\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<p>\nChange path as required ( &quot;path=\/&quot; is fine if you want access to the entire drive).\n<\/p>\n<p>\nIf you want to permit read only access change writeable to &quot;No&quot;\n<\/p>\n<p>\nUse CTRL+X to save and exit.\n<\/p>\n<p>\nFinally add the pi user by typing this command and entering the&nbsp;pi&#39;s password twice:\n<\/p>\n<pre>\r\n<code>\r\nsudo smbpasswd -a pi\r\n<\/code><\/pre>\n<p>\nThat&#39;s&nbsp;it. &nbsp;If you select &quot;Network&quot; in windows explorer device &quot;RASPBERRYPI&quot; should be found (it may take a minute or two to appear). &nbsp;In it the &quot;pihome&quot; folder will be the folder you&#39;ve shared.\n<\/p>\n<h4>\nRestarting Samba<br \/>\n<\/h4>\n<pre>\r\n<code>\r\nsudo \/etc\/init.d\/samba restart\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following instructions will set your RPi to share its files on your local network and be accessible by Windows. This is based on the great guide&nbsp;here. Install Samba sudo apt-get install samba samba-common-bin Samba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups.&nbsp;Samba-common-bin contains a tool [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121],"tags":[],"class_list":["post-1271","post","type-post","status-publish","format-standard","hentry","category-file-sharing"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=1271"}],"version-history":[{"count":16,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1271\/revisions"}],"predecessor-version":[{"id":2446,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1271\/revisions\/2446"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=1271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=1271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=1271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}