"openHABianDevice" too long for Windows

In case you do a clean openHAB 3 install and want to access Pi’s file system from a Windows PC:
the name openHABianDevice is too long for Netbios (max. 15 characters allowed) - you need to enter


in your file explorer or change Pi’s hostname.

Just for completeness - add this to your /etc/samba/smb.conf

security = user
encrypt passwords = yes
client min protocol = SMB2
client max protocol = SMB3

and restart smbd

sudo service smbd restart
1 Like

Thanks for passing the tip. I’ve moved it to the solutions category where it should be easier for users to find.

Which Windows version does this apply to ?

The limitation is not OS-specific it is a Netbios limitation.
To be precise Netbios limits hostnames to 16 characters where Microsoft only uses 15. The 16th character is reserved for accessing services.

interesting but my question is which Windows version this applies to ?
Who needs to apply this ?

all Windows versions

I cannot reproduce your problem with a fresh openHABian install and a Win 10 client.
openHABian installs the most current Samba (4.9.5 I think) and does not set any of the parameters you have suggested to set.
SMBv1 is disabled anyway, that’s what Samba does since 4.11 hence little point in setting client min protocol = SMB2.
And client max protocol = SMB3 shouldn’t be needed either as SMB4 isn’t using Netbios, is it.

that was just additional information for users who might not know how get access to a raspberry Pi from a Windows PC. It has nothing to do with the problem/solution.
My point is the following:
the new default hostname is openhabiandevice
normally you would enter \\openhabiandevice into Windows’ file explorer’s bar.
this does not work
you need to enter \\openhabiandevic

EDIT: note the missing “e” at the end

yes it does at least on my windows client so I wonder how much of an issue that really is and whether it’s worth to change the default hostname

I just installed openHABian and also didn’t have a problem with the default hostname.

no, it is not worth. I just wanted to have it filed in the forum if someone else is wondering why \\openhabiandevice just not works

I doubt that we are talking about the same.
This is related to accessing Raspberry Pi’s file system from a Windows client over SMB which requires Netbios.
If you do not have problems, you probably use NFS, Webdav, FTP or anything else.

I’m definitely using the default Samba shares that were set up by openHABian. I’m pretty sure I’d know if I intentionally set up an alternative method for accessing my RPi, and I have no reason to do so.

From this conversation, it sounds like this is not an issue in Windows 10 unless you have services that are dependent on NETBIOS.

Don’t understand what you mean.
Tell me, why
\\openhabiandevice results in an error while
\\openhabiandevic is working without problems on a freshly installed Windows 10 machine.

My conclusion: the underlying protocoll of SMB is Netbios (which is activated on every Windows 10 machine), which has limitations (see my post a little bit above)

I’m just trying to figure out why it would work on my Windows 10 computer and not on yours. Since you need to be convinced that this is the case, here’s a screenshot of me accessing my RPi by typing \\openhabiandevice into a Windows 10 File Explorer window:


So, I can confirm that the default hostname appears to work at least in some cases, and the link I posted provides an explanation of why that might be the case. I’m not saying it’s definitely the correct conclusion, but it’s certainly a possibility.

And the link you posted says nothing else what I have been saying since the beginning of this post.

Interesting to know what makes the difference

The text I thought might be relevant from the link I posted is:

If you choose a hostname longer than 15 characters, it will work without problems as long as you don’t use any services that depend on NETBIOS. Windows will generate a shorter, 15 character name for NETBIOS and you will have a different NETBIOS-name than hostname. If you have no dependand services in use, or disabled NETBIOS entirely in your network, you can safely use longer hostnames.

Add this to some points from @mstormi’s earlier post:

So if SMB4 doesn’t use Netbios, and openHABian installs SMB4, then that’s why Markus and I aren’t having an issue with the longer host name.

ok - makes sense.
I removed client min/max protocoll entries from smb.conf and restarted.
Windows still refuses to accept \openhabiandevice

Any clue?

Maybe Windows now thinks that Netbios is required, even though that isn’t the case? Or perhaps you have another service that’s using Netbios.

You could try disabling it to see what happens. It’s easy enough to re-enable if that causes other problems.

Personally, I’d just change the host name in openhabian-config and not worry about it.

Tried that already. Without Netbios I can’t get any connection - even with 15 characters.

This is what I said, it is not a big problem. I am sure that this problem will come up with some other users