mkdir -p /path/to/share/dir
# /etc/samba/smb.conf
# Global settings apply to the whole server
[global]
workgroup = domain name of your choice
server string = Samba Server %v
netbios name = the server hostname
security = user
map to guest = bad user
dns proxy = no
# User defined sections
[section name]
path = /path/to/share/dir
valid users = @groupname
browsable =yes
writable = yes
guest ok = no
read only = no
groupadd groupname
usermod -a -G groupname username
smbpasswd -a username
chmod -R 0770 /path/to/share/dir
chown -R username:groupname /path/to/share/dir
systemctl enable --now smb.service
systemctl enable --now nmb.service
testparm