Samba – smbclient NT_STATUS_BAD_NETWORK_NAME with server OS SpinStream2

cifsnetappnetwork-sharesamba

I'm trying to use Samba smbclient to connect to a file server managed by my technology partner, and I'm consistently getting this error message about tree connect failed. The exact details have been anonymized.

$ smbclient -W DOMAIN -U USER //192.168.0.1/ShareName 'PASSWORD'

Domain=[PARTNER] OS=[SpinStream2] Server=[Windows 2000 Lan Manager]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

(As far as I know, SpinStream2 describes NetApp OnTAP, up to 8.3.2)

I've tried a variety of flags and permutations already. I'm fairly sure authentication is working fine, because I get a different error message if I change the domain, user, or password. I've also tried connecting using the NT server name (ie. //SERVER/ShareName) combined with the --ip-address flag, but that produces the same NT_STATUS_BAD_NETWORK_NAME error.

Is there some other combination of options or flags I need to use?

Best Answer

I discovered that in my case the share was actually a hidden share, and I needed to append a trailing $ to the share name. Once I did that, smbclient connected just fine.