Installing samba FreeBSD 10

Unix

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:

kern.maxfiles="25000"

 

How to start: http://wiki.samba.org/index.php/Samba4/HOWTO

* 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: http://wiki.samba.org/index.php/Samba4

 

 

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

[global]
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 = 192.168.0.1
ldap ssl = no
hosts allow = 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8
hosts deny = 0.0.0.0/0
case sensitive = No
level2 oplocks = Yes
oplocks = Yes

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

 

Add the following to /etc/rc.conf

samba_server_enable="YES"

 

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