Running smbclient -L localhost on the Samba server host machine returns:

Unable to initialize messaging context
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE

Wondering if I'm doing some thing really stupid or not. Google turned up nothing. Looking for any help I can get.

Relevant information listed below. Let me know if there's anything else I can provide.

Server is running Ubuntu 19.04 Live Server with Samba 4.10.0.

systemctl status smbd.service and systemctl status nmbd.service both return Active: active (running) and Status: *mbd: ready to serve connections... so it seems like they're running fine.

Using the server's local IP address from ifconfig (i.e. 192.168.1.xxx) instead of localhost doesn't work.

Adding client max protocol = SMB3 to the global config settings does nothing. server max protocol = SMB3 already seems to be a default. Adding client min protocol = SMB3 and server min protocol = SMB3 in addition to the client max line doesn't work either.

Running smbclient -L localhost as root results in the Unable to initialize messaging context line disappearing, but the protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE line still gets printed.

Filesystem for the relevant directory is a ZFS zpool, made up of a striped mirror of four HDDs. zfs set sharesmb=on and zfs set sharenfs=on was set for all filesystems.

Network interface is eno1, but adding that to the config file with interfaces = eth0 eno1 and bind interfaces only = yes does nothing.

Don't think it matters here since this step isn't even reached, but samba account passwords were created for all user accounts already using smbpasswd.

Don't think it matters here either, but ufw is configured with ufw allow from to any app Samba, but disabling ufw outright also doesn't help anyway.

/etc/samba/smb.conf file:

   workgroup = REDACTEDGROUP
   server string = REDACTED Samba Server v%v @ %h
   hide unreadable = yes
   read only = no
   hosts allow =
   hosts deny =
   log file = /var/log/samba/log.%m
   logging = file
   map to guest = Bad User
   max log size = 1000
   obey pam restrictions = Yes
   pam password change = Yes
   panic action = /usr/share/samba/panic-action %d
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   passwd program = /usr/bin/passwd %u
   server role = standalone server
   unix password sync = Yes
   usershare allow guests = Yes
   idmap config * : backend = tdb

   comment = REDACTED file hosting
   path = /box/REDACTED
   valid users = @groupa, @groupb, @wheel
   write list = @groupa, @wheel
   read list = @groupb
   guest ok = no
   create mask = 0774
   directory mask = 0775

   comment = REDACTED public file hosting
   path = /box/public
   guest ok = yes
   create mask = 0775
   directory mask = 0775

testparm on the config file revealed no issues.

2 Answers 2


I added -m SMB3 to the smbclient command and the problem has disappeared. I found the solution here: https://github.com/dperson/samba#troubleshooting


Just to add the original explanation linked in the answer from @hugues-antoine-rabany, which worked for me (sorry, still cannot comment):

Attempting to connect with the smbclient commandline tool. By default samba still tries to use SMB1, which is depriciated and has security issues. This container defaults to SMB2, which for no decernable reason even though it's supported is disabled by default so run the command as smbclient -m SMB3, then any other options you would specify.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .