Small Business Server
Set up a shared office file server with Samba
Give your team one shared drive on Windows, using a Linux server and free software.
- InstallAdd Samba
- FolderCreate the share
- UsersAdd accounts
- ConnectMap the drive
What you need
- An Ubuntu Server with a fixed IP address
- A user account with sudo access
- A backup plan, as described in the server planning tutorial
Install Samba and create a group
The group controls who can use the share. New files will belong to this group.
sudo apt update sudo apt install -y samba sudo groupadd office sudo mkdir -p /srv/share/office sudo chown root:office /srv/share/office sudo chmod 2770 /srv/share/officeDefine the share
Add this block to the end of /etc/samba/smb.conf. Only members of the office group can connect, and new files stay accessible to that group.
[Office] path = /srv/share/office valid users = @office read only = no create mask = 0660 directory mask = 2770Add users
Each person needs a Linux user and a Samba password. Create a separate account for everyone rather than a shared login, so you can see who has access and remove it when they leave.
sudo adduser --no-create-home --shell /usr/sbin/nologin rahim sudo usermod -aG office rahim sudo smbpasswd -a rahimCheck the setup and restart
testparm checks your configuration for mistakes. Then allow file sharing through the firewall for your office network only.
testparm sudo systemctl restart smbd sudo ufw allow from 192.168.10.0/24 to any app SambaConnect from Windows
In File Explorer, click This PC, then Map network drive, and enter the address below. Sign in with the Samba username and password, and create a test file from a second PC to confirm that it works.
\\192.168.10.20\OfficeA shared drive is a common target for ransomware. Keep versioned backups away from the share itself, and test restoring them.
Want this set up for your business?
We can plan, build and hand it over to your team.