SMB
SMB is a file sharing protocol and we’re going to handle it in the context of NAS systems. For a linux system, setting it up is very simple for minimal install.
Installation
apt install samba
Minimal Configuration
The docs1 say only a minimal config is needed. Here’s an example that’s backwards compatible for anonymous gest access.
vi /etc/samba/smb.conf
[global]
map to guest = bad user
min protocol = NT1
[srv]
path = /srv
read only = yes
guest ok = yes
guest only = yes
Notes
Windows clients should not prompt for credentials, but some Linux clients will and depends on the file browser in question. Creds are not checked so supply anything you like.
Possibly, for Windows 11 you must add the browseable = yes directive to [srv] or windows will also prompt you for a password just like Linux above.
You can add hosts allow = some.ip.address to the global settings to restrict access somewhat if needed. If you find the default log file location is in a non-writeable space2 you can specify with log file = /var/log/samba/%m.log
Check the config with testparm, a samba utility for checking your config syntax.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.