Install Samba

Synopsis:

Samba is Free Software licensed under the GNU General Public License. Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments using the winbind daemon.

In our Home Gateway Project, we will use SAMBA to create a 'file server' to share files between different Windows machines on our home network.


I. Installing Samba.
Log into the Freebsd system as root. (Assumes networking is already configured.)

Ports Method:

#
# cd /usr/ports/net/samba419 && make install clean
#

The default options look ok. (note: many dependencies are required so this will take some time) ADS, LDAP, yes or no. (no, only DOCS, FAM and PROFILE, GSSAPI Builtin) Continue with default options thru out the SAMBA installation.

Package Method:

#
# pkg install -y samba419
#

II. Configuration
Samba419 does not create any config file.
in /usr/local/etc edit a new smb4.conf file
#
# cd /usr/local/etc
# ee smb4.conf
#
[global]
workgroup = WORKGROUP
realm = workgroup.local
netbios name = MEDIA
bind interfaces only = yes
log level = 1
hosts deny = ALL
hosts allow = 127. 192.168.1. 10.8.0.
interfaces = lo0 re1 192.168.1.254/24
invalid users = root
unix extensions = no
local master = no
#os level =65
#domain master = yes
#preferred master = yes

[media]
path = /usr/home/media/
public = no
writable = yes
printable = no
guest ok = no
valid users = media
follow symlinks = yes
wide links = yes

Then just enable Samba and start it:

#
# sysrc samba_server_enable="YES"
# service samba_server start
#

Lastly, create the users for Samba
#
# pdbedit -a -u media
#