Mac OS X Lion and legacy SMB

mount_smbfs: server connection failed: Unknown error: -5996

For anyone else experiencing problems connecting to older Windows networking shares (using SMB/CIFS protocols) from OS X Lion hosts, here is why and what to do about it.

For many years Mac OS X included the Open Source Samba client, but from OS X 10.7 onwards this was replaced by Apple’s own Windows networking software. In making this change Apple also chose to disable support for the older SMB 1.0 protocol, which some file sharing devices still depend on.

If you cannot connect your Mac to a network storage device, then try this command which temporarily resurrects support for the older SMB 1.0 protocol:

sudo sysctl -w net.smb.fs.kern_deprecatePreXPServers=0

Note that this is a transient kernel fix which will revert back when you reboot your Mac.

Unfortunately I’ve heard that this option no longer works in OS X Mountain Lion (10.8), so if you can’t update your legacy storage device to support SMB 2.0 then you had better not upgrade!

(Apple support article HT4697 also describes this issue)

1 thought on “Mac OS X Lion and legacy SMB

Leave a comment