# pkg install samba41
# vi /usr/local/etc/smb4.conf


[global]
workgroup = WORKGROUP
server string = Test Samba Server
log file = /var/log/samba4/log.%m
max log size = 500
socket options = TCP_NODELAY
os level = 0
security = user

[STORAGE_SU1]
comment = Su1 Storage
valid users = su1
path = /storage_su1
public = no
writable = yes
read only = no
create mask = 0777
directory mask = 0777

[STORAGE_SU2]
comment = Su2 Storage
valid users = su2
path = /storage_su2
public = no
writable = yes
read only = no
create mask = 0777
directory mask = 0777



# mkdir /storage_su1 && chmod 777 /storage_su1
# mkdir /storage_su2 && chmod 777 /storage_su2
# pw useradd su1
# pw useradd su2
# smbpasswd su1
# smbpasswd su2
# echo 'samba_server_enable="YES"' >> /etc/rc.conf
# service samba_server start