IPv4 Address:-
IPv6 Address:-
Service Provider:-
SSL Information:-
HTTP Protocol:-
Database:-
Web:-
Blog Menu


Search articles:
 

Recent articles (showing 61-69 out of 69):

 
Installing Samba (for windows file sharing) in FreeBSD [27/Sep/2010]   Upgrading FreeBSD (using source method)     Switching from MD5 to Blowfish/SHA512 password hashes in FreeBSD  

WARNING: This post has been marked as obsolete and may be incorrect. It is kept for archival purposes only. People keep telling me that they have trouble getting Samba to work properly.  I found it difficult to get working properly too, so here's a guide that should make it a lot easier...

First of all, we need to install it!  Make sure you have updated your Ports tree (see other posts) and then, as root:

cd /usr/ports/net/samba34
make config Copy


This will show the configuration dialog box for options for the port.  Using the space bar and cursor keys, deselect ALL the options, and then enable only these:

AIO_SUPPORT, FAM_SUPPORT, QUOTAS, PAM_SMBPASS, POPT Copy

Press TAB to go to OK and press enter.  Now you can build and install the port with:

make install distclean Copy

It will go off and install dependencies if it needs to.  If you see any other configuration boxes, just accept the defaults and move on.

This takes a while as it has to install quite a few packages/ports, mostly for the file alteration monitor support – but it’s worth it so be patient.  If you already have X/gnome2 installed, this process will be much quicker.

Once the port is installed, we need to make a few changes to the limits within FreeBSD to make samba a little happier...  edit /etc/sysctl.conf and add the following:

kern.maxfiles=25600
kern.maxfilesperproc=16384
net.inet.tcp.sendspace=65536
net.inet.tcp.recvspace=65536 Copy


And we also need to add another kernel module.  Edit /boot/loader.conf and add the following:

aio_load="YES" Copy

Now, we need to tell samba to start on bootup, edit /etc/rc.conf and add the following:

samba_enable="YES"
samba_config="/usr/local/etc/smb.conf"
winbindd_enable="NO" Copy


And finally, we need to make ourselves a config file.  Edit /usr/local/etc/smb.conf and remove its entire contents.  Replace with the following template:

[global]
server string = Server Name
interfaces = em0
bind interfaces only = Yes
map to guest = Bad User
passdb backend = tdbsam
log file = /var/log/samba34/log.%m
max log size = 500
name resolve order = wins lmhosts bcast host
load printers = No
os level = 10
preferred master = No
domain master = No
dns proxy = No
wins support = No
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 = Yes
level2 oplocks = Yes
oplocks = Yes

[tmp]
comment = Temp Folder
path = /tmp
guest only = Yes
guest ok = Yes
read only = No Copy


Replace 'interfaces' with your network interface name (mine is em0)

Your windows netbios name, by default, will be the hostname of your FreeBSD server up to the first dot.  E.g. for test.dan.me.uk the netbios name is TEST.

Reboot to startup samba with all the relevant changes.  Browse to the server and you will see "tmp" share which is a user nobody access to /tmp.

Check the samba documentation on how to define other shares, such as per-user homedir shares.

  Upgrading FreeBSD (using source method)     Switching from MD5 to Blowfish/SHA512 password hashes in FreeBSD  
Copyright © 2024 Daniel Austin MBCS.
Proudly hosted using the FreeBSD operating system.
 
E-mail me
PGP Key
E-mail me
LOGGED IN
Login
padlock icon
LOGIN ERROR#123: random error here