Ubuntu: Cannot access Samba share from windows 7 using hostname



Question:

I've been trying for days to get this working, and everywhere I look online it seems no one has a definitive answer, so here is the run down:

I have an external drive attached to my ubuntu 12.04 machine, "nicholas-desktop." I have the entire drive shared over the network via SAMBA. If I try to access the drive from windows 7 by using "\nicholas-desktop" it fails saying it cannot locate "nicholas-desktop." However, if I use the current IP address assigned to my machine by my router's DHCP server by typing "\192.168.2.XXX" I have no problems accessing the share. if I try to ping my ubuntu machine's hostname from windows it fails.

The same happens if I try to ping my windows machine, "nicholas-laptop" from my ubuntu machine. Again, if I use either machine's assigned IP address it works fine. Can someone please help me get this working? I don't want any workarounds like setting a static IP, or DHCP reservation, I want to be able to resolve hostnames from both sides. I have tried enabling SAMBA'a WINS server so I could resolve the hostnames using netBIOS, however that didn't work either, I may have made a mistake setting it up though.


Solution:1

Windows Live Signin Assistant can cause that problem. I'd found it on Google, deleted it, and problem solved. Now I'm having it again on a new laptop running Ubuntu. Can access shares on the Windoze machine from Ubuntu, but not the reverse.

I'm thinking a myriad of Windoze updates reinstated the problem, but I don't know yet. The Windows Signin Assistant is gone.


Solution:2

This seems to be completely missed. Resolving IP addresses to hostnames is done via DNS. Run a DNS server and your problem will be resolved.


Solution:3

Hi a couple of thoughts,

  1. you don't need name for windows share to access. \\<desktop_ip_address>\nicholas_share works just as fine.
  2. as other pointed out, you don't have a DNS server to resolve name to IP. If your router acts as a DNS server, since it does DHCP, check if it has any options to add names to IPs, or register host names on DHCP. It all depends on the router.
  3. how do you keep the current IP for the desktop. If the desktop acts as a server, then it should have a reserved lease IP address or a static IP address. Once a name is cached to the IP, sometimes it remains cached, and when the IP changes, wondrous things can happen.
  4. Have you checked that your windows has network discovery enabled for the home network? It should otherwise windows smb client acts weird and quirky.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »