Installing samba FreeBSD 10


07 Feb 2015

Installing samba FreeBSD 10

Preston Garrison 0 Comments

This is a quick tutorial on installing samba v4 on FreeBSD

pkg install samba4


For a typical desktop, add the following line to /boot/loader.conf, then reboot the system:



How to start:

* Your configuration is: /usr/local/etc/smb4.conf

* All the relevant databases are under: /var/db/samba4

* All the logs are under: /var/log/samba4

* Provisioning script is: /usr/local/bin/samba-tool

You will need to specify location of the ‘nsupdate’ command in the
smb4.conf file:

nsupdate command = /usr/local/bin/samba-nsupdate -g

For additional documentation check:



Here is the config file I use,  this file works good for WDTV.

load printers = no
show add printer wizard = no
#printing = none
printcap name = /dev/null
disable spoolss = yes

guest account = p
workgroup = WDTV
server string = FileServer
interfaces = re0
bind interfaces only = Yes
map to guest = Bad User
passdb backend = tdbsam
log file = /var/log/samba/log.%m
max log size = 500
name resolve order = wins bcast
load printers = No
os level = 10
preferred master = No
domain master = No
dns proxy = yes
wins support = Yes
#wins server =
ldap ssl = no
hosts allow =,,
hosts deny =
case sensitive = No
level2 oplocks = Yes
oplocks = Yes

comment = Raid Folder
path = /storage/raid
guest only = no
guest ok = Yes
read only = No


Add the following to /etc/rc.conf



type the following to fix some samba bugs

mkdir /var/log/samba4
chmod a+x+r+w /var/log/samba4
ln -s /var/log/samba4 /var/log/samba


Then start the server with

/usr/local/etc/rc.d/samba_server start



Here is a good guide to install apple talk as well with time machine back up ability