Setup
Install the packages:
sudo apt install samba
Configuration is all in /etc/samba/smb.conf.
You can create shares by appending a section like this:
[Share name on the server]
comment = Some description
path = /path/to/directory
browseable = yes|no # Whether to make the share visible at the server root
read only = no
guest ok = no
write list = <user> <@group>
Complete info here: https://www.samba.org/samba/docs/4.9/man-html/smb.conf.5.html
To allow users to log in, add the user to the sambashare group and (re)set the samba password:
sudo usermod -a -G sambashare <login>
sudo smbpasswd -a <login>
Enable and restart the server:
sudo systemctl enable samba
sudo systemctl restart samba
Now you can load the server root to see the "browseable" entries:
- on Windows: \\<server hostname> (the server IP may or may not work)
- on Linux: smb://<server hostname>
As you double-click on the share you'll get a login prompt as per your server settings.
Comments