Fix SMB connection problems for Mac

If you’re seeing problems with Macs connecting to SMB servers you are not alone. There are TWO important possible symptoms & causes you may want to investigate.

1) Your connection to the SMB server is slow. Or

2) Your connection to the SMB server is unreliable. (click here to Skip over #1 & keep reading)

#1 Fix: If a slow server connection is your problem, Apple has a documented resolution. (linked & copied below) It seems that macOS 10.9 to 10.13.3 (IIRC) default to SMB packet signing enabled which considerably slows the data and is generally not necessary for internal networks.  If you are comfortable at the command line, give it a go. Or you may use a plain text editor (such as BBEdit). This fix is reversible & may help. A lot. Apple has changed their mind about packet signing, and as of macOS 13.13.4 it is disabled by default. The official Apple instructions are copied below and at the link. https://support.apple.com/en-us/HT205926

The Apple article (below) works for experts, but you may want more specific detailed instructions. If you prefer a text editor over the command line, here’s another method. There are several ways to do this, but we will just focus on one way. Stick with me here!

On the Mac, from the Finder (desktop). Pull the “Go” menu to “Go to Folder” and type in; /etc/

And press the blue Go button. This will open the etc folder (usually pronounced et-see).  If you have an nsmb.conf file, this is where it will be.

If you don’t have one, that’s ok, just open a new blank text document & we will get it into the right place later. I like to use the free version of BBEdit to edit plain text files, Do not try to use a fancy word processor like MS Word. Launch BBEdit, then drag nsmb.conf to the BBEdit dock icon to open it.

To disable packet signing & speed up your SMB server connection your nsmb.conf file should have 2 lines;

[default]
signing_required=no

If you already had a nSMB.conf file, you’re ready to save. Go ahead & save, making sure you save it into the same folder it came from. You may need to enter your admin username & OS password.

If you did not already have a nsmb.conf file, an easy way is to save the new file to your desktop, then drag it into the etc folder, entering your admin password when it asks.

You’ll all finished!  :-)  Ok, try connecting to your SMB server & hopefully it is working better now than it was before. You may need to disconnect & reconnect to the server, or even reboot  the computer – you know, just in case.

If #2 sounds more likely, maybe your server is offering SMB v2 or SMB v3, but SMB v1 is better for your particular macOS. Download SMBconf free from MacParc to easily set the default version of SMB to use. Works for macOS 10.9 to current (10.14 Mojave is current as of this writing). Reversible, so no reason not to try it. It may help. In my personal experience, this fix has worked out well in several cases, but I did see one case (macOS Sierra 10.12.6) where switching to SMB 1 disabled SMB connections, but AFP connections still worked. It was easy to switch back though, so no harm done.

=-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–=

Hat tip to Norbert Doerner, for mentioning SMB packet signing in his NeoFinder docs.  https://www.cdfinder.de/guide/2/2.2/neofinder_server.html
 

https://support.apple.com/en-us/HT205926
The Apple Support Article says:

=-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–==-=-=–=

In macOS 10.13.4 and later, packet signing is off by default. Packet signing for SMB 2 or SMB 3 connections turns on automatically when needed if the server offers it. The instructions in this article apply to macOS 10.13.3 and earlier.

Turn off packet signing for SMB 2 and SMB 3 connections

You can turn off packet signing if the client and server are on a secure network.

When you use an SMB 2 or SMB 3 connection, packet signing is turned on by default. You might want to turn off packet signing if:

• Performance decreases when you connect to a third-party server.
• You can’t connect to a server that doesn’t support packet signing.
• You can’t connect a third-party device to your macOS SMB server.
If you turn off packet signing, you lower the security of the SMB connection. Turn off packet signing only if both the client and server are on a secure network.

Turn off packet signing on a macOS client

Check to see if your macOS computer has an /etc/nsmb.conf file.

If your macOS computer has a /etc/nsmb.conf file

• Open the /etc/nsmb.conf file.
• Set the signing_required value to “no,” like this:
[default]
signing_required=no
• Save the /etc/nsmb.conf file.
• Disconnect and then reconnect any mounted SMB shares to make the changes take effect.
If your macOS computer doesn’t have an /etc/nsmb.conf file

• Open Terminal.
• Use these commands to create an /etc/nsmb.conf file that has a signing_required value that’s set to “no”:
sudo -s
echo “[default]” >> /etc/nsmb.conf
echo “signing_required=no” >> /etc/nsmb.conf
exit
• Disconnect and then reconnect any mounted SMB shares to make the changes take effect.
Turn off packet signing on a macOS computer that hosts SMB shares

Follow the steps on macOS or on macOS Server.

On macOS

• Choose Apple menu > System Preferences, then click Sharing.
• Clear the File Sharing checkbox, then close the Sharing pane.
• In Terminal, use this command:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server SigningRequired -bool FALSE
• Choose Apple menu > System Preferences, then click Sharing.
• Select the File Sharing checkbox, then close the Sharing pane.

On macOS Server

• Open Terminal.
• In Terminal, use these commands to make packet signing optional for clients:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server SigningRequired -bool FALSE

sudo /usr/libexec/smb-sync-preferences.

3 thoughts on “Fix SMB connection problems for Mac

  1. You are a gentleman and a scholar. Spent a week trying to fix an ‘unreliable vpn’ connection to our mac server, but it wasn’t the vpn’s fault, it was the mac server. This has connections stable and no more files fail to copy.

  2. I just tried this on a Mac that is running Big Sur and it will not work it says the OS is to new.
    Do you have one that will work with this?
    I have two Macs that have a bad time with copying files to a Windows server it gets slow over time.

Leave a Reply

Your email address will not be published. Required fields are marked *