{"id":2895,"date":"2023-07-17T18:49:44","date_gmt":"2023-07-17T16:49:44","guid":{"rendered":"http:\/\/fliegerhorst.dyndns.org\/?p=2895"},"modified":"2023-07-21T15:44:34","modified_gmt":"2023-07-21T13:44:34","slug":"samba","status":"publish","type":"post","link":"https:\/\/fliegerhorst.dyndns.org\/index.php\/2023\/07\/17\/samba\/","title":{"rendered":"SAMBA"},"content":{"rendered":"\n<p>Manchmal m\u00f6chte man mit einem Windows PC Datei basiert auf sein Linux Systems zugreifen. Dazu bietet sich das SAMBA-Paket an. Mit SAMBA ist man also in der Lage Dateien mit dem Linux System auszutauschen. Man baut sich damit einen NAS. SAMBA ist zwar noch viel mehr wie z.B. stellt das Paket sogar einen Active Domain-Controller zur Verf\u00fcgung aber das sind alles Dinge die ich in meinem kleinen Heimnetz nicht ben\u00f6tige. <\/p>\n\n\n\n<p>Die Installation unter Debian 10 erfolgt mit<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;null&quot;,&quot;mime&quot;:&quot;text\/plain&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Plain Text&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;text&quot;}\">root@Fliegerhost:\/etc# apt install samba<\/pre><\/div>\n\n\n\n<p>Nach der Installation laufen zwei neue Daemons &#8211; der Dateidienst <kbd>smbd<\/kbd> und der Namensdienst <kbd>nmbd<\/kbd> &#8211; im System. Ansonsten existiert noch ein Verzeichnis <kbd>\/etc\/samba<\/kbd>. In diesem Verzeichnis befindet sich die Konfigurationsdatei <kbd>smb.cnf<\/kbd>. Die Datei <kbd>smb.conf<\/kbd> besteht aus mehreren Hauptsektionen. Dabei mu\u00df mindestens eine Sektion mit dem Bezeichner <kbd>[global]<\/kbd> vorkommen. Die Konfigurationsdatei beginnt immer mit einem <code>[global]<\/code> Abschnitt. In diesem Abschnitt stehen Konfigurationsdirektiven, die f\u00fcr alle Freigaben gelten, bzw. die global f\u00fcr den Server sind. Diese habe ich wie folgt konfiguriert:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">## Browsing\/Identification ###\n# Change this to the workgroup\/NT-domain name your Samba server will part of\n   workgroup = FLIEGERNETZ<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Dies legt die Arbeitsgruppe des Windows Netzwerkes fest. Diese lautet &#8222;Fliegernetz&#8220;.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">#### Networking ####\n# The specific set of interfaces \/ networks to bind to\n# This can be either the interface name or an IP address\/netmask;\n# interface names are normally preferred\n   interfaces = 127.0.0.1 enp2s0\n   bind interfaces only = yes<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit diesen beiden Einstellungen wird festgelegt auf welchem Netzwerk bzw. auf welchen Netzwerkinterface SAMBA lauscht. Hier ist es nat\u00fcrlich der Rechner selbst (localhost, 127.0.0.1) und das interne Netzwerkinterface. Mit diesen Einstellungen verhindert man letztlich externe Zugriffe.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"># This tells Samba to use a separate log file for each machine\n# that connects\n   log file = \/var\/log\/samba\/log.%m\n   log level = 2\n\n# Cap the size of the individual log files (in KiB).\n   max log size = 1000\n\n# We want Samba to only log to \/var\/log\/samba\/log.{smbd,nmbd}.\n# Append syslog@1 if you want important messages to be sent to syslog too.\n   logging = file<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit diesen Einstellungen wird das Logging-Verhalten festgelegt. Die Log-Dateien f\u00fcr jede einzelne Maschine die Zugriff \u00fcber SAMBA bekam wird im Verzeichnis <kbd>\/var\/log\/samba\/log.%m<\/kbd> gespeichert. Ab einer Gr\u00f6\u00dfe von 1MB werden die ersten Zeilen abgeschnitten.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"># Do something sensible when Samba crashes: mail the admin a backtrace\n   panic action = \/usr\/share\/samba\/panic-action %d<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Diese Einstellung bewirkt dass der Nutzer &#8222;Admin&#8220; eine EMail im Fall eines Crashs gekommt.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">####### Printer Support ########\n   load printers = no\n   printcap name = \/dev\/null<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit diesen Einstellungen wird die Druckerunterst\u00fctzung vollst\u00e4ndig abgeschaltet da ich das nicht ben\u00f6tige. (Hinweis: Das Drucken von einem Windows PC funtioniert nat\u00fcrlich weiterhin)<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">####### Local Master Browser #######\n   local master = yes\n   preferred master = yes\n   os level = 50<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit dieser Einstellung bewirbt sich der SAMBA Server zur Wahl der Local-Master-Browser in dem Netzwerk zu werden. Da es vorkommen kann dass mehrere SAMBA Server in dem Netzwerk sind, findet eine Wahl statt da nur einer der Local-Master-Browser sein kann. Dabei bewirkt die Einstellung <kbd>preferred master = yes<\/kbd> einen leichten Vorteil f\u00fcr den Server bzw. die Einstellung <kbd>os level = 50<\/kbd> garantiert das durch den hohen Wert.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">####### Domain Master Browser #######\n\tdomain master = no\n\twins support = no<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit diesen Einstellungen wird die M\u00f6glichkeit des SAMBA Servers ein Domain Master zu werden und auch die WINS Unterst\u00fctzung vollst\u00e4ndig abgeschaltet. Als File Server ist kein Domain-Master notwendig.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">####### Authentication #######\n# Server role. Defines in which mode Samba will operate. Possible\n# values are &quot;standalone server&quot;, &quot;member server&quot;, &quot;classic primary\n# domain controller&quot;, &quot;classic backup domain controller&quot;, &quot;active\n# directory domain controller&quot;. \n#\n# Most people will want &quot;standalone server&quot; or &quot;member server&quot;.\n# Running as &quot;active directory domain controller&quot; will require first\n# running &quot;samba-tool domain provision&quot; to wipe databases and create a\n# new domain.\n   server role = standalone server<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Mit dieser Einstellung wird die Server Rolle als &#8222;Standalone&#8220; Server festgelegt.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"># Dieser Parameter steuert, ob Samba die PAM-Direktiven\n# zur Konto- und Sitzungsverwaltung befolgen soll oder nicht.\n   obey pam restrictions = yes\n\n# This boolean parameter controls whether Samba attempts to sync the Unix\n# password with the SMB password when the encrypted SMB password in the\n# passdb is changed.\n   unix password sync = yes\n\n# For Unix password sync to work on a Debian GNU\/Linux system, the following\n# parameters must be set (thanks to Ian Kahan &lt;&lt;kahan@informatik.tu-muenchen.de&gt; for\n# sending the correct chat script for the passwd program in Debian Sarge).\n   passwd program = \/usr\/bin\/passwd %u\n   passwd chat = *Enter\\snew\\s*\\spassword:* %n\\n *Retype\\snew\\s*\\spassword:* %n\\n *password\\supdated\\ssuccessfully* .\n\n# This boolean controls whether PAM will be used for password changes\n# when requested by an SMB client instead of the program listed in\n# 'passwd program'. The default is 'no'.\n   pam password change = yes<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Diese Einstellungen steuern das Setzen und Synchronisieren des Passwortes welches zum Einloggen ben\u00f6tigt wird. <br>Hier wird erreicht das ein Passwortwechsel, den ein Nutzer durchf\u00fchrt, auch auf das Passwort des SAMBA Servers gespiegelt wird.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"># &quot;security = user&quot; is always a good idea. This will require a Unix account\n# in this server for every user accessing the server.\n   security = user\n\n# 'Never' - Bedeutet, dass Benutzeranmeldungsanfragen mit einem ung\u00fcltigen\n# Kennwort zur\u00fcckgewiesen werden. Dies ist die Voreinstellung.\n\tmap to guest = Never<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Diese Einstellungen bewirken dass nur Nutzer zugelassen sind die einen realen Unix Account auf dem System haben und dass falsche Passworteingaben nicht auf den Gastzugang gemappt werden.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>Ab hier sind alle notwendigen globalen Einstellungen, die f\u00fcr den Betrieb eines einfachen SAMBA File Servers notwendig sind, getan. Ab hier folgen dann die Einstellungen zu den Shares, den freigegebenen Verzeichnissen. Auf meinem Server werde ich nur das HOME-Verzeichnis des entsprechenden Nutzer freigeben der sich gerade einloggt. Es erfolgen keine [public] oder [guest] Freigaben.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">[homes]\n   comment = Home Directories\n   browseable = no\n\n# By default, the home directories are exported read-only. Change the\n# next parameter to 'no' if you want to be able to write to them.\n   read only = no\n\n# File creation mask is set to 0700 for security reasons. If you want to\n# create files with group=rw permissions, set next parameter to 0775.\n   create mask = 0755\n\n# Directory creation mask is set to 0700 for security reasons. If you want to\n# create dirs. with group=rw permissions, set next parameter to 0775.\n   directory mask = 0755\n\n# By default, \\\\server\\username shares can be connected to by anyone\n# with access to the samba server.\n# The following parameter makes sure that only &quot;username&quot; can connect\n# to \\\\server\\username\n# This might need tweaking when using external authentication schemes\n   valid users = %S\n\n# G\u00e4ste d\u00fcrfen nicht auf die Freigabe zugreifen\n   guest ok = no\n\n# Keine executable flags bei neu erstellen einer Datei\n# Weder Eigent\u00fcmer (archive), Gruppe (system) , noch Andere (hidden)\n   map archive = no\n   map system = no\n   map hidden = no<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p>Der Freigabename [homes] wird unter SAMBA speziell behandet. Beginnt eine Freigabesektion mit dem Namen <code>[homes]<\/code>, gilt diese automatisch als Freigabe des Heimatverzeichnisses eines Benutzers. Diese Freigabe ist daher auch die einzigste Freigabe bei der die Option <kbd>path<\/kbd> weggelassen werden <strong>mu\u00df<\/strong>.<br>Hier wird also das jeweilige HOME-Verzeichnis des entsprechenden Nutzers zum Lesen und Schreiben freigegeben. Werden neue Dateien bzw. Verzeichnisse erstellt so werden die Permissions auf 0755 gesetzt und keine executable Flags gesetzt. G\u00e4ste sind f\u00fcr diese Freigabe nicht zugelassen.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>Wenn man damit fertig ist dann nicht vergessen die beiden Daemons neu zu starten:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">root@Fliegerhost:\/etc# service nmbd restart\nroot@Fliegerhost:\/etc# service smbd restart<\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"samba-nutzer\">SAMBA-Nutzer<\/h3>\n\n\n\n<p>Wer nun meint es ist alles erledigt, den mu\u00df ich entt\u00e4uschen denn zum Schlu\u00df m\u00fcssen nun noch die Nutzer in die SAMBA Datenbank eingetragen werden die sich in SAMBA einloggen d\u00fcrfen. Die Eintragung erfolgt ganz simpel mit dem Befehl<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;null&quot;,&quot;mime&quot;:&quot;text\/plain&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Plain Text&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;text&quot;}\">root@Fliegerhost:\/etc# smbpasswd -a username<\/pre><\/div>\n\n\n\n<p>Dabei wird man aufgefordert ein Passwort einzugeben. Das ist das Passwort, hinter dem die Freigaben gesperrt werden.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"aktivieren-von-web-service-discovery\">Aktivieren von &#8218;Web Service Discovery&#8216;<\/h3>\n\n\n\n<p>Wenn man ab diesem Zeitpunkt seinen Windows-10 Rechner anmacht wird man feststellen dass der SAMBA-Server leider nicht sichtbar ist obwohl der Filetransfer funktioniert wenn man den Server im Windows-Explorer per &#8218;\\\\SERVERNAME\\&#8216; explizit aufruft. <br>Man hat auch nichts falsch gemacht, denn das Verhalten ist von Windows so gewollt denn ab Windows 10 version 1511 ist die Unterst\u00fctzung f\u00fcr SMBv1 und dadurch &#8218;NetBIOS device discovery&#8216; vollst\u00e4ndig entfernt worden. Windows unterst\u00fctzt aber mit SMBv2\/3 &#8218;Web Service Discovery&#8216; aber SAMBA leider nicht. Deshalb mu\u00df man noch ein kleines Programm installieren: <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/christgau\/wsdd\" data-type=\"URL\" data-id=\"https:\/\/github.com\/christgau\/wsdd\" target=\"_blank\">https:\/\/github.com\/christgau\/wsdd<\/a><\/p>\n\n\n\n<p>Leider mu\u00df man dazu seine Repositories erweitern und damit hat man dann auch eine (weitere) Fremdquelle im System da dieses kleine aber sehr sinnvolle Programm, nicht in den offiziellen Repositories von Debian enthalten ist. Folgende Zeile mu\u00df der Datei <code>\/etc\/apt\/sources.list<\/code> hinzugef\u00fcgt werden:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">deb https:\/\/pkg.ltec.ch\/public\/ bullseye mainroot<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Hier wird das neue Repository f\u00fcr die Suche von <code>'apt'<\/code> aufgenommen. Hier f\u00fcr Debian <kbd>'Bullseye'<\/kbd> aber es kann nat\u00fcrlich auch jede andere Version eingetragen werden.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>Dann folgende Befehle eingeben:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">root@Fliegerhost:~# apt-key adv --fetch-keys https:\/\/pkg.ltec.ch\/public\/conf\/ltec-ag.gpg.key<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Installiert die \u00f6ffentlichen Schl\u00fcssel f\u00fcr das neue Repository.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">root@Fliegerhost:~# apt update<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Aktualisiert die Paketlisten f\u00fcr &#8218;apt&#8216;<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\">root@Fliegerhost:~# apt install wsdd<\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>Installiert den daemon <code>'wsdd'<\/code> und tr\u00e4gt diesen in <code>'systemctrl'<\/code> als Autostart bei jedem Systemstart ein.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>Nun ist der <code>'wsdd'<\/code> Daemon installiert und wird auch bei jedem Systemstart wieder gestartet. Jetzt mu\u00df der &#8218;wsdd&#8216; noch konfiguriert werden.<br>Es wurde im Verzeichnis <code>'\/etc'<\/code> eine Datei mit dem Namen <code>'wsdd.conf'<\/code> erstellt, die man noch folgenderma\u00dfen bearbeiten mu\u00df: (&#8218;enp2s0&#8216; ist das Netzwerkinterface auf dem der <code>'wsdd'<\/code> arbeitet, &#8218;-4&#8216; besagt dass der <code>'wsdd'<\/code> nur IPv4 unterst\u00fctzt)<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:false,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;liquibyte&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;Shell&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;shell&quot;}\"># command line parameters for wsdd (consult man page)\nWSDD_PARAMS=&quot;-i enp2s0 -4&quot;<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Manchmal m\u00f6chte man mit einem Windows PC Datei basiert auf sein Linux Systems zugreifen. Dazu bietet sich das SAMBA-Paket an. Mit SAMBA ist man also in der Lage Dateien mit dem Linux System auszutauschen. Man baut sich damit einen NAS. SAMBA ist zwar noch viel mehr wie z.B. stellt das Paket sogar einen Active Domain-Controller[&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3034,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_general_container_width":0,"zakra_general_content_width":0,"zakra_general_sidebar_width":0,"zakra_sticky_header":"customizer","zakra_header_main_area":true,"zakra_site_logo_width":0,"zakra_header_top_enabled":"customizer","zakra_header_top_style":"customizer","zakra_primary_menu_item_style":"customizer","zakra_page_header_text_color":"","zakra_page_header_layout":"customizer","zakra_page_title_bg":"","zakra_footer_widgets_bg_image":0,"zakra_page_title_bg_repeat":"customizer","zakra_page_title_bg_position":"customizer","zakra_page_title_bg_size":"customizer","zakra_page_title_bg_attachment":"customizer","zakra_breadcrumbs_enabled":"customizer","zakra_breadcrumbs_text_color":"","zakra_breadcrumbs_separator_color":"","zakra_breadcrumbs_link_color":"","zakra_breadcrumbs_link_hover_color":"","zakra_page_title_bg_image":0,"zakra_footer_widgets_enabled":"customizer","zakra_footer_column_layout_1_style":"customizer","zakra_footer_widgets_bg":"","zakra_footer_widgets_bg_repeat":"customizer","zakra_footer_widgets_bg_position":"customizer","zakra_footer_widgets_bg_size":"customizer","zakra_footer_widgets_bg_attachment":"customizer","zakra_footer_bar_enabled":"customizer","zakra_footer_bar_style":"customizer","zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-2895","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux"],"_links":{"self":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts\/2895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=2895"}],"version-history":[{"count":0,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/posts\/2895\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/media\/3034"}],"wp:attachment":[{"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=2895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/categories?post=2895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fliegerhorst.dyndns.org\/index.php\/wp-json\/wp\/v2\/tags?post=2895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}