{"id":51,"date":"2017-03-22T23:25:13","date_gmt":"2017-03-22T23:25:13","guid":{"rendered":"https:\/\/test.warrensoft.co.uk\/wp-test\/home-hub\/?p=51"},"modified":"2018-12-08T07:32:38","modified_gmt":"2018-12-08T07:32:38","slug":"software-samba","status":"publish","type":"post","link":"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/03\/22\/software-samba\/","title":{"rendered":"Software &#8211; Samba"},"content":{"rendered":"<p>In order to deploy and modify our python and php scripts it is useful to have samba installed on the headless pi, so you can edit the scripts in your favourite text editor on the desktop.<\/p>\n<p>First create a directory for the python scripts&#8230;<\/p>\n<pre>cd \/usr\/local\/bin\r\nsudo mkdir -p code\/controller\r\n<\/pre>\n<p>set the ownership&#8230;<\/p>\n<pre>sudo chown -R pi:pi\u00a0code<\/pre>\n<p>update the operating system&#8230;<\/p>\n<pre>sudo apt-get update<\/pre>\n<p>install samba&#8230;<\/p>\n<pre>sudo apt-get install samba samba-common-bin\r\n<\/pre>\n<p>then edit the configuration&#8230;<\/p>\n<pre>sudo nano \/etc\/samba\/smb.conf\r\n<\/pre>\n<p>Place this section at the end of the config file, and save.<\/p>\n<blockquote>[controller]\ncomment = controller code repository<br \/>\npath = \/usr\/local\/bin\/code\/controller<br \/>\nwriteable = yes<br \/>\nguest ok = no<\/p>\n<p>Give the user pi permissions&#8230;<\/p>\n<pre>sudo smbpasswd -a pi\r\n<\/pre>\n<p>you will be prompted to enter a password.<\/p>\n<p>Restart samba.<\/p>\n<pre>sudo \/etc\/init.d\/samba restart\r\n<\/pre>\n<p>You should now be able to explore the pi&#8217;s directories:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-224\" src=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SambaExplorer-300x198.png\" alt=\"\" width=\"300\" height=\"198\" srcset=\"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SambaExplorer-300x198.png 300w, https:\/\/test.warrensoft.co.uk\/wp-test\/wp-content\/uploads\/2017\/05\/SambaExplorer.png 506w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I have found that Windows 10 requires a credential to be set up in advance, in order to explore the samba shares. In addition, the home directory for the pi user is set to read-only on samba installation, so you may want to change this in the configuration file.<\/p>\n<p>The next requirement is a database server.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>In order to deploy and modify our python and php scripts it is useful to have samba installed on the headless pi, so you can edit the scripts in your favourite text editor on the desktop. First create a directory for the python scripts&#8230; cd \/usr\/local\/bin sudo mkdir -p code\/controller set the ownership&#8230; sudo chown &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/test.warrensoft.co.uk\/wp-test\/2017\/03\/22\/software-samba\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Software &#8211; Samba&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-hub-software"],"_links":{"self":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":22,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":439,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/posts\/51\/revisions\/439"}],"wp:attachment":[{"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.warrensoft.co.uk\/wp-test\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}