Mac Resolving Ubuntu Hostname on Windows Network

1

I have a wired network using the workgroup of PAPERTECH with the following machines:

  • Windows XP (hostname: WinXP)
  • Ubuntu 12.10 (hostname: WebServer) - via Samba
  • Mac OS X 10.9 (hostname: MacMini)

The problem is that the Mac cannot resolve the hostname for the Ubuntu web server as it cannot ping it.

Ping Summary:

  • From the Windows machine I can ping MacMini and WebServer.

  • From the Ubuntu machine I can ping WinXP.PAPERTECH.local but cannot ping MacMini.PAPERTECH.local.

  • From the Mac machine I can ping WinXP.PAPERTECH.local but cannot ping WebServer.PAPERTECH.local.

Mac Setup

I've set the workgroup using the Network settings under: System Preferences > Network > Ethernet (Advanced ...) > WINS. I've also enabled 'Share files and folders using SMB' under: System Preferences > Sharing > File Sharing.

Despite the above settings the Mac is still unable to ping or connect to the server using the hostname: WebServer (NOTE: it is able to ping the IP address it resolves to).

Any other ideas?

paperclip

Posted 2014-01-28T12:29:29.053

Reputation: 111

Answers

1

Did you remember to add the line

 netbios name = your_pc_name

in the file /etc/samba/smb.conf, and to restart the services nmbd and smbd and/or to reboot?

MariusMatutiae

Posted 2014-01-28T12:29:29.053

Reputation: 41 321

1I tried adding this below [global] settings and restarted both nmbd and smbd but it didn't seem to make a difference.

I then also tried a reboot after making the changes but it didn't seem to make a difference either. – paperclip – 2014-01-28T15:27:30.647

0

If you can ping by IP, then the issue is a DNS resolution issue.

There are two ways to resolve your issue if you want to use names.

Set up a DNS server to be used by all your machines.

Update your hosts files on the Linux and Mac boxes. This is located in /etc/hosts

Deesbek

Posted 2014-01-28T12:29:29.053

Reputation: 303

The hostname's mentioned above are the FQDN's on the network so I would have thought that I don't need to edit the /etc/hosts. – paperclip – 2014-01-28T15:24:06.630

FQDN or not, if you cannot resolve a name to an IP you will not be able to connect. Did you try @MariusMatutiae s answer? – Deesbek – 2014-01-28T16:29:23.617

Yep, tried @MariusMatutiae's suggestion but it didn't appear to make a difference.

I guess I'm expecting that I should be able to resolve the FQDN on both Windows and Mac as they are both part of the same network and workgroup. – paperclip – 2014-01-28T16:35:02.177

1For FQDN to work you need to have a DNS server set up as I specified. Or you have to configure your DHCP server to provide the full DNS info. – Deesbek – 2014-01-28T16:52:13.657