All my geeky stuff ends up here. Mostly Unix-related

Samba+FreeBSD+OSX Finder

leave a comment »

Tried to run Samba44 on FreeBSD to share files on the local network with OSX machines. Took me a while but I finally figured out that in order to get rid of the infamous ERROR -36 from the Mac Finder, you have to disable sendfile with:

use sendfile = no

As a matter of fact, let me post a complete working example of smb4.conf that works between my FreeBSD-hosted Samba and my Mac (Yosemite):

# Following line is useful on Linux, not on FreeBSD apparently
# socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
max protocol=SMB3
winbind enum groups=yes
winbind enum users=yes
large readwrite = yes
max xmit=32768
min receivefile size=2048
use sendfile = no
aio read size = 2048
aio write size = 2048
write cache size = 1024000
read raw = yes
write raw = yes
getwd cache = yes
unix charset = UTF-8
oplocks = yes
workgroup = HOME
server string = PO
security = user
map to guest = Bad User
log level = 5
log file = /var/log/samba4/samba.log
max log size = 50
interfaces =
hosts allow =
hosts deny  =
#dns proxy = no
# I do not want Samba to serve printers, thanks
printing = bsd
printcap name = /dev/null
guest ok = yes
guest account = nobody
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
ea support = no

# Share the directory in /data/share as 'share'
path = /data/share
public = yes
guest ok = yes
writable = yes
browsable = yes
create mask = 0777
directory mask = 0777
force user = nobody
follow symlinks = yes

In addition, OSX does not support guest access to an SMB server. The simplest solution I found was to set up a user called ‘nobody’ without password:

smbpasswd nobody
-> Press ENTER twice to set no password

And then access your share by pointing your Mac Finder to smb://nobody@HOST/share and click Connect.

Note to self: never ever install a Samba server after 7pm if you want a full night sleep.


Written by nicolas314

Wednesday 12 October 2016 at 12:01 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: