4

When trying to access a samba share with smblcient -L //localhost from my local Samba Server, I get after a delay the error message

protocol negotiation failed: NT_STATUS_IO_TIMEOUT

What are the debugging steps to get to the root of this problem systematically?

Background:

For my own training purposes I am setting up a simple shared folder over a samba server on a CentOS 7 virtual machine.

I added following lines to the smb.conf file and created the directory, selinux configuration and firewall rule.

[sambashare]
comment = sambashare
path = /sambashare
public = yes
writable = yes
write list = +users

3 Answers 3

2

Solution:

You haven't configured DNS name resolution for your servername and have to set the servername either in the /etc/hosts manually or in your DNS server.

Debug process:

In the case of NT_STATUS_IO_TIMEOUT try to use a network traffic analyser like tcpdump. (ex. tcpdump -i >network interface<)

If following lines appear:

07:57:54.726390 IP 10.0.2.9.39939 > 10.0.2.1.domain: 20986+ A? server.example.local. (38)
07:57:54.726648 IP 10.0.2.9.39939 > 10.0.2.1.domain: 44015+ AAAA? server.example.local. (38)
07:57:54.727069 IP 10.0.2.9.48743 > 10.0.2.1.domain: 34381+ PTR? 1.2.0.10.in-addr.arpa. (39)
07:57:54.732388 IP 10.0.2.1.domain > 10.0.2.9.39939: 20986 NXDomain* 0/0/0 (38)
07:57:54.733400 IP 10.0.2.1.domain > 10.0.2.9.48743: 34381 NXDomain* 0/0/0 (39)
07:57:54.733642 IP 10.0.2.9.53191 > 10.0.2.1.domain: 24458+ PTR? 9.2.0.10.in-addr.arpa. (39)

This means that the smbclient isn't able to resolve the servername server.example.local which is a DNS resolution problem.

0

I have added the following line in /etc/samba/smb.conf and it works :

guest ok  = yes

in the section of my share parameters.

Then I've restarted the service and it works perfectly

1
  • 7
    For future readers: this gives everyone on the network guest access to your shares without a password, don't use guest ok if you care about security
    – Paradoxis
    Oct 23, 2019 at 10:57
0

For me on Fedora Rawhide 33 I needed to use one the following in "/etc/samba/smb.conf":

client min protocol = CORE

or

client min protocol = NT1

and define the host in "/etc/hosts":

<ip_address>   REMOTE_DEVICE
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.