Samba – Windows Freigabe Server Installation – Raspbian/Debian
![[Bild: Samba_Logo.png]](http://upload.wikimedia.org/wikipedia/commons/e/e8/Samba_Logo.png)
1. Samba installieren
sudo apt-get install samba samba-common-bin2. Samba konfigurieren
sudo nano /etc/samba/smb.conf2.1 Linux-Nutzern erlauben sich einzuloggen
Unter Authentication section müsst ihr “security = user” auskommentieren, also die ‘#’ löschen
####### Authentication ######## “security = user” is always a good idea. This will require a Unix account# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
security = user
2.2 Freigaben erstellen
Am Ende der Datei folgendes einfügen
[RaspberryPiForum]
comment = www.forum-raspberrypi.de Samba Freigabe
path = /media/usb1
writeable = yes
guest ok = noFolgendes bitte anpassen
[RaspberryPiForum] ist der Name der Freigabe
path = /media/usb1 = Pfad der Freigabe (USB Stick, Externe Festplatte)
2.3 Benutzer erstellen und Rechte geben
sudo smbpasswd -a pisudo chown -R pi:pi /media/usb13. alternativ Homeverzeichnisse der Benutzer freigeben
sudo nano /etc/samba/smb.confAm Ende der Datei folgendes einfügen
[homes]
comment = Homedir
browseable = no
valid users = @users
writable = yes
create mask = 0700
directory mask = 0700Nun noch “read only” auf “no” setzten
#======================= Share Definitions =======================[homes]comment = Home Directories
browseable = no
# By default, the home directories are exported read-only. Change the
# next parameter to ‘no’ if you want to be able to write to them.
read only = no
4. Samba neu starten
sudo /etc/init.d/samba restartNun könnt ihr bequem über das Netzwerk auf die Daten eures RPis zugreifen.
Falls ihr eure Arbeitsgruppe ändern möchtet ändert ihr einfach die Konfigurationsdatei ab.
sudo nano /etc/samba/smb.confworkgroup = DEINE ARBEITSGRUPPE
#======================= Global Settings =======================[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP