creating network shares with Samba 3.x on FreeBSD 6.x Jan 3, 2010
The configuration defined below emulates a shared drive on a Windows PC with minimal security. It does not require users enter a password - it assumes that any user on the local network is valid.
It implements Samba's share-level security; the resulting volume works similarly to a share on a Windows system, where permissions to the share are
set to 'Everyone - Full Control'. This kind of setup is useful for a home or small business network, where security is not highly valued.
make install clean (this requires a live internet connection, and takes a while)
select at least syslog (and CUPS if you want to use the FreeBSD box as a printserver)
cd /usr/local/etc
cp smb.conf.default smb.conf
chmod 644 smb.conf
vi smb.conf
in the [global] section, change workgroup name to correct name, example: MY_GROUP
in the [global] section, set the security mode to share
in the [global] section, uncomment the hosts allow line and change it to permit access only from the local LAN and localhost, example: 192.168.0. 127.
in the [global] section, set domain master and preferred master to Yes
In the [global] section, set os level = 255
Note: these last three settings will cause this server to become the master browser on your LAN. Only one server should be the master browser.
Do not set these on more than one server.
in the [global] section, adjust log size if necessary (remember this is per machine)
create a section in the config file for the share (do this in the "share definitions" section):
[public]
comment = description of the share (optional)
path = /data/smbspace
read only = no
public = yes
save the changes and exit the editor
create share directory: mkdir /data/smbspace
set permissions on share directory: chmod 777 /data/smbspace
vi /etc/rc.conf
add a new line to the end of the file to enable Samba on boot: samba_enable="YES"