How to restart SMB client on macOS Catalina? (Finder not connecting to shares)

Once in a while Finder stops connecting to SMB shares.

FinderCmd+KConnect → It shows a window like this infinitely: Finder dialog box connecting to SMB infinitely

What I've tried already:

  1. I have tried connecting to multiple shares (Linux, Windows), Finder didn't connect to any of them
  2. Connecting with an alternative client works. For example, Kodi media player includes its own SMB client and it connects just fine.
  3. Connecting from other running Mac works too
  4. Reset Finder settings by deleting ~/Library/Preferences/com.apple.finder.plist
  5. Kill Finder with killall Finder command
  6. Add username and password explicitly into the Cmd+K connect to server dialog: smb://myusername:[email protected]/MyFiles

I assume this is a macOS SMB client issue.

This issue will go away with a reboot. I'd like to fix the issue without restarting macOS – how can I restart SMB services only?


Solution 1:

As stated by @yssup - Using the mac "Activity Monitor" tool to stop "NetAuthSysAgent" solved the problem for me.

Note that stopping "netbiosd" did not solve the problem.

Ideally one would do this by clicking on a shortcut to a shell script which could stop "NetAuthSysAgent" more quickly and efficiently. However, I cannot figure out the correct shell command to stop "NetAuthSysAgent" programmatically. Perhaps someone else can answer that here.

Solution 2:

I had the same problem, solved it by launching Activity Monitor and stopping netbiosd process, it gets restarted and then the connections started working immediately. It's possible that I also stopped NetAuthSysAgent process as well, so if it doesn't work for you with the netbiosd process only, try stopping NetAuthSysAgent as well.

Solution 3:

Alternatively you can achieve this with sudo pkill -i netauthsysagent. -i makes it case-insensitive.