I recently tried to access some Windows 10 shares from a Linux host using smbclient. Instead, I received the following error:

smbclient: tree connect failed: NT_STATUS_INSUFF_SERVER_RESOURCES.

The simple (but entirely non-obvious) solution that I found on Ask Ubuntu, is to increase (or create, if it doesn't exist) the following Registry value:

HKEY_LOCAL_MACHINE
\SYSTEM
 \CurrentControlSet
  \Services
   \LanmanServer
    \Parameters
IRPStackSize DWORD 0x0000000f (15)

The default value is 15, but it should be increased to the (supposedly maximum) 50, after which the LanmanServer service needs to be restarted.