Can't connect to SMB share from Linux

Status
Not open for further replies.
Joined
Jul 13, 2013
Messages
286
Been using the FreeNAS box from Windows for ages, working basically fine.

But started trying to connect to an existing share from a Linux box the other day, and it never works. Played with a lot of things, not seeing anything that gives me any ideas.

For testing, smbclient seems to be the easiest / quickest way to go through ideas. With debug level set at 5, I'm finding consistently that it's getting the error "protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE" just before the final failure.

The last thing in the log (after stuff about successfully looking up the right IP address for the server) is:

Code:
Connecting to 192.168.1.205 at port 445
Socket options:
   SO_KEEPALIVE = 0
   SO_REUSEADDR = 0
   SO_BROADCAST = 0
   TCP_NODELAY = 1
   TCP_KEEPCNT = 9
   TCP_KEEPIDLE = 7200
   TCP_KEEPINTVL = 75
   IPTOS_LOWDELAY = 0
   IPTOS_THROUGHPUT = 0
   SO_REUSEPORT = 0
   SO_SNDBUF = 87040
   SO_RCVBUF = 372480
   SO_SNDLOWAT = 1
   SO_RCVLOWAT = 1
   SO_SNDTIMEO = 0
   SO_RCVTIMEO = 0
   TCP_QUICKACK = 1
   TCP_DEFER_ACCEPT = 0
 session request ok
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE


This happens for both attempts to connect to a service (x0, one I created just for this testing) and for attempts to list services with the -L option.

Some of the shares have no IP addresses in the hosts allow box on the server; that must default to allowing everybody to connect, because that's the way the ones Windows uses regularly are configured. Is that true? (I can't really find anything in the docs on what those mean). As a test, I tried listing the IP of the linux box I was running my smbclient tests from in the config, and that didn't change anything. So that doesn't seem like it's the problem.

Any thoughts?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
<snip>
Some of the shares have no IP addresses in the hosts allow box on the server; that must default to allowing everybody to connect, because that's the way the ones Windows uses regularly are configured. Is that true?
Yes
(I can't really find anything in the docs on what those mean). As a test, I tried listing the IP of the linux box I was running my smbclient tests from in the config, and that didn't change anything. So that doesn't seem like it's the problem.

Any thoughts?
What's the exact smbclient command you're using?
 
Joined
Jul 13, 2013
Messages
286
Commands I've tried included:

Code:
  4  smbclient '\\fsfs\
  5  smbclient '\\fsfs\x0'
  6  smbclient '\\fsfs\x0' -d 5
  7  smbclient '\\fsfs\x0' -d 5 -U guest
  8  smbclient '\\fsfs\x0' -d 5 -U guest -I 192.168.1.205
  9  smblient -L fsfs
  10  smbclient -L fsfs
  11  smbclient -L fsfs -d 3
  12  smbclient -L fsfs -d 5


Host fsfs resolves to 192.168.1.205, I can see that in the log file and test it at the command line with ping or host.

I ran these logged in as user ddb, which is also a valid user on fsfs.

I had configured service x0 to allow but not require guest login.
 
Joined
Jul 13, 2013
Messages
286
What's the server's min protocol set to? Try smbclient -L -m SMB2 //192.168.1.205

Your syntax appears to be off (initially this gets an error saying there are insufficiently many backslashes in the service name), but after fixing that, this no longer errors out. Well, something slightly different from this, adding your "-m SMB2" to one of my previous commands, no longer errors out.

Code:
ddb@ldev:~$ smbclient -L fsfs  -m SMB2
WARNING: The "syslog" option is deprecated
Enter ddb's password:
Domain=[FSFS] OS=[] Server=[]

   Sharename  Type  Comment
   ---------  ----  -------
   ddb  Disk   
   fsfsddb  Disk   
   public  Disk   
   x0  Disk   
   x1  Disk   
   IPC$  IPC  IPC Service (FreeNAS Server FSFS)
Domain=[FSFS] OS=[] Server=[]

   Server  Comment
   ---------  -------

   Workgroup  Master
   ---------  -------


This isn't completely insane, since in fact I've configured SMB2 as the minimum protocol level on the server. I had understood it was supposed to negotiate, and it should have worked so long as the client provided something the server supported, but apparently not.

Okay, gotta run do other stuff, but this gives me a foothold, I should be able to beat it to death from here, or at least come up with a more interesting question. Thanks!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Your syntax appears to be off

Whoops, I messed that up. :D I tested with the command smbclient -m SMB2 -N -L //<server> and then mis-transcribed it here.

This isn't completely insane, since in fact I've configured SMB2 as the minimum protocol level on the server. I had understood it was supposed to negotiate, and it should have worked so long as the client provided something the server supported, but apparently not.
smbclient defaults to a max protocol of SMB1. This is because Unix Extensions are SMB1-only.
 
Status
Not open for further replies.
Top