Nsmb conf mac os

jbfriedrich / nsmb.conf

# /etc/nsmb.conf — macOS 11.3 — 2021-04-29
#——————————————————————————
# SMB configuration for macOS 11.3 Synology
#——————————————————————————
# Additional information:
# ————————
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
# https://support.apple.com/de-de/HT212277
#——————————————————————————
[default]
# Use NTFS streams if supported
streams=yes
# Soft mount by default
soft=yes
# Disable signing due to macOS bug
signing_required=no
# Disable directory caching
dir_cache_off=yes
# Lock negotiation to SMB2/3 only
# 7 == 0111 SMB 1/2/3 should be enabled
# 6 == 0110 SMB 2/3 should be enabled
# 4 == 0100 SMB 3 should be enabled
protocol_vers_map=6
# No SMB1, so we disable NetBIOS
port445=no_netbios
# Turn off notifications
notify_off=yes
# SMB Multichannel behavior
# To disable multichannel support completely uncomment the next line
# mc_on=no
# Some Wi-Fi networks advertise faster speeds than the connected wired network.
mc_prefer_wired=yes

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

MacKonsti

Discovering methods & tweaks!

Categories

Recent Posts

Favourites

Speed up SMB transfers in El Capitan Mac OS 10.11.x

Until recently, I’ve been working on a Mac using Yosemite 10.10.5 and was quite happy with it, but since Sierra 10.12.2 was out, I knew I had to move on in my life, so I decided to make a clean installation (dual boot) of El Capitan to the latest available version 10.11.6 including all recent updates from Apple. However, I soon realized that my connections to both network backup HDDs via SMB was painfully slow, evidently much slower than I was used to, when synchronizing files from my Mac to my Western Digital network drives.

This meant that Apple most likely fiddled again with SMB (Samba) protocol in this OS X release, and once more we had to find a fix for returning to “status quo”. After all, I was using on my Gigabit home LAN two different WD network storage devices, namely MyBook II World (2x1TB) and MyCloud (1x2TB), most likely with different SMB implementations each.

I had read that in the older days, a quick solution to force Mac OS X to use older SMB versions, was to use CIFS protocol; but today, this didn’t work. So, this time I mounted via Finder both drives (Cmd + K) forcing the smb:// protocol:

Next, in Terminal.app the following output was presented, after running the needed query command smbutil per volume:

This showed that older MyBook World II negotiates with SMB 1.x protocol (latest firmware v01.02.14 available) and later MyCloud storage asks for SMB 2.x protocol (firmware v03.04.01-230 kept on purpose) therefore causing a possible performance issue with latest Mac OS X systems, due to their newer and seemingly more secure SMB implementation.

After digging around, I read that there’s a hidden fix for SMB, just like the one posted by Dan Roncadin in his related article, which apparently increases transfer speeds due to the fact that it disables “client signing”. As Dan Roncadin writes:

The issue seems to come down to Apple’s SMB forcing default enabling of “client signing” which ruins performance.

The fix consists of setting a parameter in file nsmb.conf in folder /etc/ with sudo privileges, forcing the system to obey the parameter on the next use of SMB protocol (and after each reboot, obviously):

The way to implement this parameter is to quickly open Terminal.app and apply this command as your administrator password will be requested:

Читайте также:  Окно блокирует запуск windows

sudo printf «[default]\nsigning_required=no\n» | sudo tee /etc/nsmb.conf >/dev/null

Then, either restart your Mac (if you’re used to do this, due to some older Windows habit like mine) or simply unmount and re-mount your SMB shares. Please note that on a clean installation of El Capitan, this file (and therefore, parameter) does not exist, due to the fact that Apple considers this a lesser security measure; but for home connections, it is fine by me.

Through the application “GoodSync” I was able to re-check the speed and it seems things returned to normal; I didn’t go into much detailed speed measurements, but I am sure any improvement is welcome at this stage. Also, this is confirmed to have a positive effect on speed, as mentioned by users over at Computer Audiophile where they post their (positive) results after applying this fix.

Finally, should you wish to reverse the “fix”, simply remove this file (better via Teminal, again) by running:

Источник

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.

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.

Читайте также:  Windows environment in visual programming

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.

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

One thought on “ Fix SMB connection problems for Mac ”

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.

Источник

macOS: Fixing SMB Windows File Sharing Not Working On Mac

SMB Windows file sharing not working on Mac after upgrading to macOS 10.13 High Sierra or macOS 10.12 Sierra or setting up a new Mac or MacBook via iCloud is easily fixed. For SMB windows file sharing, you need to select a user for activation. Sometimes, you cannot select the user because the user is grayed out. The real cause of this problem is that you most probably use the same password for accessing your Mac and as your iCloud password. Due to security reasons, you cannot use the same password for both your Mac and iCloud anymore. This fix also applies to Mac OS X 10.11 El Capitan.

Читайте также:  Требуемое устройство не подключено или недоступно 0xc000000e windows 10

Fixing SMB Windows file sharing not working_user grayed out

Background: How to enable SMB Windows file sharing on your mac

Go to the  Apple menu and choose ‘System Preferences‘ from the drop down menu. To enable File Sharing in macOS or Mac OS X, open the ‘Sharing‘ pane of ‘System Preferences‘ and select the option for ‘File Sharing‘. Windows computers and Macs can then see your computer on the local network. If you want to add an existing user for SMB file sharing open ‘Options…‘ for selecting and activating the user. For details see Apple’s support document.

Problem: Cannot select and activate user for SMB Windows file sharing on my Mac

You cannot activate SMB Windows file sharing because the user is grayed-out. The reason for this is that you got the same password for both your iCloud account and your mac (local password). I guess you set up or upgraded your macOS or Mac OS X and chose your iCloud account and password to access your Mac locally. This iCloud password login was removed in Mac OS X 10.11.4 El Capitan (I think due to security reasons). It doesn’t forcibly remove it from existing accounts, but if you turn it off, you can’t turn it back on.

Fixing SMB Windows file sharing not working_cannot connect to iCloud

Some user will see the pop-up message ‘This mac can’t connect to iCloud because of a problem with ‘Your iCloud email‘. Open iCloud preferences to fix this problem.‘ The fix for this is the same as for SMB Windows file sharing.

How to fix Mac cannot access user account for SMB Windows File Sharing

For enabling SMB windows file sharing, you need to change the password of your local account on your Mac and NOT the iCloud password:

  1. Go to the  Apple menu and choose ‘System Preferences‘ from the drop down menu. Click on ‘iCloud‘ and then sign out from iCloud.
  2. On the next pop-up choose ‘Stop using iCloud…‘.
  3. Now you need to use a separate password for your local Mac account. Click on ‘Use separate password‘ and give the local account on your Mac a new password different from your iCloud one!
  4. On the next window ‘Do you want to keep a copy your iCloud data on your Mac before signing out?‘ select ‘Cancel‘. You’ve already changed the password of your local account and you really need not to sign out from iCloud.
  5. Next, go back to ‘System preferences‘ > ‘Sharing‘ >’File sharing‘ and click on ‘Options…‘. The user is not graded-out anymore and can be activated. Select the user and click on ‘Done’.
  6. Now you have to type in the newly generated local password from step 3 and click on ‘OK‘.
  7. Finally, the user activated for SMB windows file sharing on your Mac.

Fixing SMB Windows file sharing not working_user not grayed-out anymore

Choosing a new password for your local account on your mac different to your iCloud account will fix that SMB Windows file sharing is not working on Mac after upgrading to macOS 10.13 High Sierra, macOS 10.12 Sierra, Mac OS X 10.11.3 El Capitan or setting up a new Mac or MacBook via iCloud before Mac OS X 10.11.4 El Capitan.

Источник

Оцените статью