Score:1

Cannot access samba Ubuntu server via hostname UNC path (IP works) in Windows explorer

cl flag

Setup

We have an AD server running on Windows Server 2012 (ad01.<domainroot>). There is a Samba file server running on Ubuntu 20.04 (fs02.<domainroot>). The file server is domain joined using winbind.

In this post I'll be using <domainroot> to be the equivalent placeholder of AD.EXAMPLE.ORG and <workgroup> for the workgroup.

Problem

We're unable to access the samba server / shares via its hostname, we get a network error claiming it's unreachable:

enter image description here .

The issue is the same if using the FQDN.

If I navigate to it via it's IP (\\<fs02 IP>), it works without issue, so the shares themselves seem to be correct. (smb.conf added below)

What I've tried

My initial thought was to check DNS, but nslookup fs02 gives me the correct response. I can also ping it without issue.

I've also tried to fiddle with the smb.conf, this is the configuration I'm currently using:

[global]
security = domain

workgroup=<workgroup>
realm=<domainroot>
netbios name = fs02

# === logging config ===
log file = /var/log/samba/%m.log
log level = 1

# === Backend setup ===

idmap config * : backend = tdb
idmap config * : range = 2000-9999
idmap config <workgroup> : backend = rid
idmap config <workgroup> : range = 10000-30000

winbind use default domain = yes
winbind nested groups = yes
winbind refresh tickets = yes

inherit owner = yes
vfs objects = acl_xattr
map acl inherit = yes
store dos attributes = yes

unix extensions = yes

# === Share definitions ===
# ... pruned ...
Manu avatar
us flag
The SMB client might add the DNS-suffix. Does nslookup work with the DNS-suffix. Do client and server have the same DNS-suffix?
ricekab avatar
cl flag
nslookup works with both `fs02` or `fs02.<domainroot>`, I'm planning on setting up a separate test server next week to see if I can recreate the issue.
Score:0
cl flag

Issue in my case was due to a faulty NTP configuration causing time drift between various servers. Resetting the clock manually verified the issue, and fixing the NTP configuration prevented drift from being an issue again.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.