Search code examples
macososx-maverickssambafile-sharingfileshare

OS X 10.9.x (Mavericks) broken samba/windows shares - possible workarounds?


Since 10.9 Apple replaced samba in Lion for their SMBX it's constantly broken. Very broken.

While connecting to a samba share (2012 R2 Essentials) the connections often drops or hangs while this appears in the system.log:

smb2_rq_credit_decrement: Timed out waiting for credits 35 
smb_iod_reconnect: Reconnected share <share_name> with server <server_name>
smb_fid_get_kernel_fid: No smb2 fid found for fid 550ff6b0613adf68
smb_iod_reconnect: Reconnected share <share_name> with server <server_name>

A few sources propose forcing using SMBv1 as a workaround like this:

echo "[default]" >> ~/Library/Preferences/nsmb.conf
echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf

Which actually makes it work (not hang or disconnect) it's just that a listing of a directory takes 15-30 sec no problem .. meaning it's almost completely useless.

This problem has bothered me for a LONG time now and I'm trying to think of a workaround. One I can think of is compiling Samba (www.samba.org) but as Apple dropped them out of Mac OS X a while ago they don't really make much effort of making samba compatible with OS X .. which is understandable :)

After making some fixes to Samba 4.1.11 source the samba somehow compiles but does not seem to have a mount_smbfs or anything similar - just smbclient.

Does anyone have an idea whether it's possible to make mountning work with OS X (as it involves kernel and I don't know what exactly) ?

Any other propositions on how to fix this?

P.S.: I'm currently stuck at compilation of Samba 4.1.11 version of samba on OS X 10.9.4 with this (if anyone had an idea on how to fix that):

Undefined symbols for architecture x86_64:
  "___unsafe_string_function_usage_here_size_t__", referenced from:
      _send_announcement in nmbd_sendannounce_122.o
      _send_lm_announcement in nmbd_sendannounce_122.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `<replaced_path_to_samba>/samba/bin'
Build failed:  -> task failed (err #1): 
    {task: cc_link profile_76.o,asyncdns_122.o,nmbd_122.o,nmbd_become_dmb_122.o,nmbd_become_lmb_122.o,nmbd_browserdb_122.o,nmbd_browsesync_122.o,nmbd_elections_122.o,nmbd_incomingdgrams_122.o,nmbd_incomingrequests_122.o,nmbd_lmhosts_122.o,nmbd_logonnames_122.o,nmbd_mynames_122.o,nmbd_namelistdb_122.o,nmbd_namequery_122.o,nmbd_nameregister_122.o,nmbd_namerelease_122.o,nmbd_nodestatus_122.o,nmbd_packets_122.o,nmbd_processlogon_122.o,nmbd_responserecordsdb_122.o,nmbd_sendannounce_122.o,nmbd_serverlistdb_122.o,nmbd_subnetdb_122.o,nmbd_winsproxy_122.o,nmbd_winsserver_122.o,nmbd_workgroupdb_122.o,nmbd_synclists_122.o -> nmbd}

Solution

  • well, thankfully OS X 10.10 Yosemite fixes this and 10.9 does not seem very well supported, so I'm going to assume upgrade is the way to go.