Samba einrichten
Auf meinem NAS habe ich eine Samba-Freigabe eingerichtet, damit ich auf die angeschlossenen Festplatten auch unter Windows zugreifen kann.
Zuerst muss Samba installiert werden:
apt-get install samba samba-common
Jeder Nutzer auf dem Linux-System kann ein Samba-Nutzer sein. Dazu muss er sich mit smbpasswd
ein Samba-Passwort geben.
Hier eine Sample-Konfiguration (/etc/samba/smb.conf
) ohne Drucker, mit Guest-Share und einem User-Share.
- smb.conf
[global] workgroup = WORKGROUP # Name of workgroup the server will appear in server string = %h, Samba %v # String presented to the client load printers = no # Does not load printers from printcap security = user # Authentication based on username/password map to guest = bad user # Unknown users are mapped to guest account invalid users = root # Root is not allowed as user guest account = nobody # User for guest account # Options to improve read/write performance socket options = IPTOS_LOWDELAY TCP_NODELAY use sendfile = yes min receivefile size = 16384 strict allocate = yes [Guest Share] path = /path/to/guest/share guest ok = yes read only = yes # Set to 'no' to grant write access to share veto files = /*lost+found*/ # Hide certain files and directories [User Share] valid users = user # User(s) allowed to access this share path = /path/to/user/share public = no writeable = yes comment = Samba share printable = no guest ok = no create mask = 0600 directory mask = 0700 veto files = /*lost+found*/