Solving SMB Performance Issues on macOS

macOS units were experiencing performance issues both authenticating and browsing Hitachi HNAS appliances navigating through any DFS namespace.  This lead to the following issues:

  • Long delays mounting shares, browsing folders, and opening files (15s for auth dialog to appear, 15s to connect). 
  • Slow file searches
  • File corruption
  • Disappearing files
  • Crashing applications
  • Permissions problems
  • Locked files and file naming issues
  • Failed downloads when using Google Chrome to save gmail attachments directly to server
  • Microsoft Office intermittently fails to save documents opened from the server

This was solved by disabling the SMB packet signing.

[levaufr1@mbp ~]$ sudo vi /etc/nsmb.conf 
# Managed by JAMF

[global]
#smb_neg=smb1_only
signing_required=no

On JAMF JSS, deploy the following script:

#!/bin/bash

# Overwrite /etc/nsmb.conf
printf "# Managed by JAMF\n\n[global]\n#smb_neg=smb1_only\nsigning_required=no\n" > /etc/nsmb.conf

if [[ -f /etc/nsmb.conf ]]; then
    echo "OK: /etc/nsmb.conf exists"
    exit 0
else
    echo "ERROR: /etc/nsmb.conf doesn't exist!!"
    exit 1
fi