Linux SMB2 share

Commands:

sudo addgroup smbgrp
sudo useradd shares -G smbgrp
sudo smbpasswd -a shares
sudo mkdir -p /srv/samba-secured
sudo chmod -R 0770 /srv/samba-secured
sudo chown root:smbgrp /srv/samba-secured

Configs( /etc/samba/smb.conf ):

[global]
# protocol version range, currently only SMB2
min protocol = SMB2
max protocol = SMB2
[SECURED]
path = /srv/samba-secured
valid users = @smbgrp
browseable = yes
writable = yes
read only = no

restart it: sudo service smbd restart
if your device cannot find it, check your firewall

# Ubuntu

# enable it later
ufw disable

# Connect smb with your client

# Check the port
smbstatus -p

ufw enable

ufw allow {target port}

ufw reload