Share over Samba using \\\hostname

Hi all,

I would like be able to type “\\osmc” (exactly) to access the shared folder of my Raspberry Pi. However, Windows cannot seem to find the Pi using its hostname. See this image in which I ping osmc

Windows can access the shared folder (and ping it) via its IP-address \\ (not static). Also, the address smb://osmc redirects to the correct IP, but in that case, Windows does ask for an app to open it.

Do you understand my issue? Can it be solved?

Kind regards,

Edit your c:\Windows\System32\Drivers\etc\hosts file (as Administrator) and enter: osmc

check the samba config file on your pi and check if the below line is present under the Global section

wins support = yes

If you don’t have any other wins server configured on your network (you have if you did it) it will turns your RPI as wins and give windows the ability to solve the RPI’s name

Dear ooZee and shamael,

Thanks a lot for your replies. They are short and to the point which is good. However, I didn’t get it to work yet.

@ooZee: I prefer to configure it only once for the network. So it must be done on the Raspberry Pi itself in stead of all different devices.

@shamael: this is what I did following your advice.

  1. Install the WINS server role:
    sudo apt-get install winbind

  2. change the samba config:
    sudo nano /etc/samba/smb.conf


  3. Restart samba:
    sudo service smbd restart

Even a full reboot didn’t work. So, is there anything else I need to do?

This is the complete global section of the smb.conf:

#======================= Global Settings =======================


## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

And this is a line from /etc/nsswitch.conf
hosts: files myhostname mdns4_minimal dns mdns4 wins [NOTFOUND=return]

Hi CorK

in samba config under global do you have the Windows workgrou defined?
wins support = yes
workgroup = WORKGROUP

Adapt the value to your workgroup name and restart smbd and nmbd services.

Ps: I guess netbios ports are not blocked between you and the OSMC server too

Update: forgot to mention after the change above nmbd.service needs to restarted too

Yes, the correct workgroup is defined in the global section. as you can see in my previous reply.
Still no difference, even after restarting smbd, nmbd or the entire pi.

For the netbios ports I should check the modem/router I assume. I wouldn’t know that yet.

Your router should not be blocking traffic on any port between devices that are on your LAN.

It’s a while ago and I have been looking into it but I think my router is not blocking anything on the (local) LAN. I even turned off the firewall for a moment.

Is there anything else I can try? Or do you maybe know anyone who already solved this issue?

I’m having issues with Windows 10 myself since I updated to 7.01 stable, I installed SMB on the Pi but I can’t get my windows 10 box to find the external HDD I have attached to my Pi, the harddrive is working fine playing movies, it’s just that I need to transfer them over to it.

Are you sure you’re actually using OSMC?
7.01 sounds like OE/LE, not OSMC.

1 Like

I’m using whatever the newest stable I would have gotten from your OSMC app, if you could just tell me how to get Windows 10 to read/write to the external harddrive connected to my Pi OSMC that would be great. I’m very frustrated that everything was working and that update happened and ruined everything and now I’ve got to configure everything because of it.

I can ping OSMC and it gives me results, windows finds OSMC just fine but .kodi/media which is where I read my external hdd should show up is blank.

The update which ruined everything was the March update with Kodi 17. If you could tell me how to get my Windows 10 to read the HDD attached to my Pi that would be great.

/media is where drives would appear, not .kodi/media.

But I am asking again for a final time for logs.
There is no version of OSMC called 7.0.1.

You have consistently failed to provide the information we require to properly diagnose and fix your issue. Please posts logs or we’ll have to close this thread. How to submit a useful support request - General - OSMC

\OSMC\osmc is the path I have on Windows 10. I’ll get you the logs shortly.

And you haven’t installed any Windows updates between February and March, right?

Correct! I could easily drag and drop files from a folder on my Windows 10 PC to my OSMC attached external hdd even TODAY before I had formatted my Pi to the new install of the March Stable OSMC.

I installed Samba Server as I figured that was required for this to work.

Are my logs.

EDIT Apparently it’s SSH that you need NOT Samaba. I’m good file closed.

I can share the logs as described in your link, but that’s about Kodi/OSMC. Are you sure the samba sharing is related to that and not just to the sub laying Linux system?

They provide info about both Kodi and OSMC.

Are you sure you understand the difference between Kodi and OSMC? Because, Kodi is Kodi, OSMC is exactly “the sub laying Linux system.”

Err thanks. My bad. However, it just seemed that the issue isn’t due to either Kodi or OSMC at all!

I had to change HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\DhcpNodeType
from 2 to 8 to set the Node Type to hybrid. It used to be Peer-Peer.
I’m not sure what it means and why it was wrong, but Peer-Peer seems to skip the WINS server.

Thank you all for your help and input.
Finally, the problem is solved!