# 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
map to guest = bad user

[STORAGE]
comment = Test Storage
path = /storage
public = yes
writable = yes
read only = no
create mask = 0777
directory mask = 0777


# mkdir /storage && chmod 777 /storage
# echo 'samba_server_enable="YES"' >> /etc/rc.conf
# service samba_server start