{"id":341,"date":"2018-11-13T21:38:57","date_gmt":"2018-11-13T20:38:57","guid":{"rendered":"http:\/\/chrigi.me\/wordpress\/?p=341"},"modified":"2020-05-17T15:02:07","modified_gmt":"2020-05-17T13:02:07","slug":"samba-einrichten-fuer-home-assistant","status":"publish","type":"post","link":"https:\/\/chrigi.me\/wordpress\/samba-einrichten-fuer-home-assistant\/","title":{"rendered":"Samba einrichten f\u00fcr Home Assistant"},"content":{"rendered":"<p>To install Samba, enter the command,\u00a0<code>sudo apt-get install samba samba-common-bin<\/code>. Now, we need to configure the Samba configuration file so enter the following command,\u00a0<code>sudo nano \/etc\/samba\/smb.conf<\/code>\u00a0.<\/p>\n<p>The Samba configuration file it is well documented. You can go through it and enable the options you would like. You can also remove everything by pressing and holding\u00a0<strong>Ctrl+K<\/strong>\u00a0and pasting the following configuration:<\/p>\n<p>Mit <strong>Shift+Insert<\/strong> kann man die Konfiguration im Nano einf\u00fcgen<\/p>\n<pre class=\"\">[global]\nnetbios name = SmartHomeServer\nserver string = The SmartHome File Center\nworkgroup = WORKGROUP\nhosts allow =\nremote announce =\nremote browse sync =\n\n[HOME ASSISTANT]\npath = \/home\/homeassistant\/.homeassistant\ncomment = No comment\nbrowsable = yes\nread only = no\nvalid users =\nwritable = yes\nguest ok = no\npublic = yes\ncreate mask = 0777\ndirectory mask = 0777\nforce user = root\nforce create mode = 0777\nforce directory mode = 0777\nhosts allow =\n\n[HOME ASSISTANT ESPHOME]\npath = \/home\/pi\/esphome\ncomment = No comment\nbrowsable = yes\nread only = no\nvalid users =\nwritable = yes\nguest ok = no\npublic = yes\ncreate mask = 0777\ndirectory mask = 0777\nforce user = root\nforce create mode = 0777\nforce directory mode = 0777\nhosts allow =<\/pre>\n<h4>Here is a short explanation of what the code above means:<\/h4>\n<ul>\n<li><code>workgroup<\/code>: This is the domain that the Samba server will be part of. By default, Windows has the workgroup set as\u00a0<strong>WORKGROUP<\/strong><\/li>\n<li><code>path<\/code>: The path for the Home Assistant configuration files<\/li>\n<li><code>writeable<\/code>: If set to\u00a0<strong>yes<\/strong>, it will allow the folder to be writeable<\/li>\n<li><code>create mask<\/code>\u00a0and\u00a0<code>directory mask<\/code>: When set to 0777 allows the user to read, write and execute<\/li>\n<li><code>public<\/code>: If set to\u00a0<strong>no<\/strong>, it will only allow valid users to access the shared folder<\/li>\n<\/ul>\n<p>Press\u00a0<strong>Ctrl+X<\/strong>\u00a0to exit and then press\u00a0<strong>Y<\/strong>\u00a0to save the changes. Next, you need to set up a Samba password. Enter the following command,\u00a0<code>sudo smbpasswd -a pi<\/code>. Enter a new password when prompted. You can use the same password as your Raspberry Pi user but for security, enter a different password.<\/p>\n<p>Last but not least, restart the Samba service to apply all changes using the command,\u00a0<code>sudo service smbd restart<\/code>.<\/p>\n<p>To access the Samba shared folder on a windows computer, open Windows File Explorer and click on Network. The Raspberry Pi shared folder will now be displayed. Click on it and enter your Pi\u2019s username and the Samba password. After that, you can access the Home assistant configuration.yaml file and quickly make any changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install Samba, enter the command,\u00a0sudo apt-get install samba samba-common-bin. Now, we need to configure the Samba configuration file so enter the following command,\u00a0sudo nano \/etc\/samba\/smb.conf\u00a0. The Samba configuration file it is well documented. You can go through it and enable the options you would like. You can also remove&#8230; <a href=\"https:\/\/chrigi.me\/wordpress\/samba-einrichten-fuer-home-assistant\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"categories":[1,10,128],"tags":[],"class_list":["post-341","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi","category-smart-home"],"_links":{"self":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":3,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":659,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/posts\/341\/revisions\/659"}],"wp:attachment":[{"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrigi.me\/wordpress\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}