# NetBios Name resolving does not work



## deadeyes (Feb 15, 2008)

Hi all,

I just got my first macbook.

All seems to be working great... except:

When I try to browse to a server in my network with the IP everything works fine. When I use the hostname it cant resolve the name so it fails.
this is very annoying because a shared printer by cups uses its netbios address while this cant resolve.

There is NOTHING wrong with the other systems... they all worked fine.

Does anyone know what I need to change? Or how I can track this down?


----------



## carlitostsu (Jun 2, 2009)

deadeyes said:


> Hi all,
> 
> I just got my first macbook.
> 
> ...


deadeyes,
Were you able to fix this problem? I'm having a very similar problem.
Please let me know if you were able to.

If not here's a workaround which unfortunately the user in my organization does not want to do.

A workaround is the following:
In Terminal type:
sudo open /etc/hosts
edit the hosts file by typing in the ip address and the name you want to tie it to.

I tried to get the user who is having this problem in our network to do it, but he doesn't want to do it (another user was kind enough to bring their own personal MAC to work so that I cant test this out and it resolved the IP address to the NetBIOS name).


----------



## carlitostsu (Jun 2, 2009)

Also, 
A shareware program called hostal can modify your host file if you do not want to do it in Terminal.


----------



## deadeyes (Jun 3, 2009)

carlitostsu said:


> deadeyes,
> Were you able to fix this problem? I'm having a very similar problem.
> Please let me know if you were able to.
> 
> ...


Are you sure it resolves the netbios name to the correct IP through netbios?
Or did it resolve through /etc/hosts?
As far as I know now: the lookup through netbios(smb) works with the nmbd daemon. This is part of samba.
With smblookup hostname you can then check if the ip resolves correct.
THen, your OS (mac os x in your case) should be able to resolve names through nmbd. This can be configured in /etc/host.conf
I dont know if nmbd is the correct configuration directive.
Also, it could be that Mac OS X does not support nmbd as lookup method (look in the man page of /etc/host.conf).

I hope you can fix it!


----------



## carlitostsu (Jun 3, 2009)

It resolved it through the /etc/hosts files only :S

I found this article about samba/group policy object:
http://articles.techrepublic.com.com/5100-10878_11-6127492.html

I'm the network technician, at best , I will talk to my boss who's the IT director here. But I think we're on the right track. 
Thanks for replying!
--------------------------
Did configuring your hosts file help you find the printer?


----------



## deadeyes (Jun 3, 2009)

carlitostsu said:


> deadeyes,
> Were you able to fix this problem? I'm having a very similar problem.
> Please let me know if you were able to.
> 
> ...





carlitostsu said:


> It resolved it through the /etc/hosts files only :S
> 
> I found this article about samba/group policy object:
> http://articles.techrepublic.com.com/5100-10878_11-6127492.html
> ...



I don't know as I have no mac for almost half a year now.
Did putting it in /etc/hosts fix it for you? I should think it would but I don't like statical config. So I hope you can fix it with nmbd.


----------



## carlitostsu (Jun 3, 2009)

It does work by changing it in the /etc/hosts file but the user does not want to modify it. (I tested it on another user's MAC)
I will try nmbd as soon as I get a chance and post the results on this forum.


----------



## ElDiabloConCaca (Jun 3, 2009)

Go to:

System Preferences > Network > [your network adaptor] > Advanced... > DNS

Then add your network's domain (usually something like mycompany.local, where "mycompany" is your company name -- ask the net admin for this information) to the "Search Domains:" list.

See if that helps resolving by name.


----------



## macosx_risk (Jun 5, 2009)

Hi,

My vote goes to /etc/hosts files method to startoff. Later you can do DNS setup as well if you are the system administrator there and dare to get your hands dirty. More Details follow....

Server Names to IP Translation is what can be achieved by multiple mechamisms:
1) simplest and easiest way when there are lesser no of machines - /etc/hosts in unixes. However, its hard to maintain as the no of servers/printers grows - ex change in name or ip address or addition of new servers etc - PRoblem - you need to change the /etc/hosts file on each machine in the network to know about the changes. It becomes impossible and too cumbersome everytime there is any change(add/delete/edit of name or ip addresses) since it needs to be made on all the servers and clients in the network.


This is why long ago DNS came into existence on the then "Internet". Domain Name Service (DNS) is a service that centrally manages the "server name" to "IP address" resolution and vice-versa(reverse DNS). Because of explosive growth of internet, DNS evolved and its currently  a very complex branched hierarchy up in the cloud. However, you can have your own DNS server inside your company and manage your own internal private DNS network from a central admin console/interface.

BIND is a software which comes for most Unixes. you can configure DNS first. You can make your life more easier by supplying your desktops/laptops get DNS details along with dynamic IP using DHCP service. the flow of config:
1) configure DHCP service
2) configure DNS
3) supply DNS server details in DHCP server
4) boot clients using DHCP over network
5) upon booting client will get its own temporary IP from DHCP server and will also get the DNS details from the DHCP Server itself.
6) now you are ready to use server names and need not bother to remember IP addresses of all machines in your network.

PS - Easier said then done.

Regards,
rISK


----------



## enrico (Jul 2, 2009)

On your Macbook open System Preferences, click "Sharing", under "Computer Name" click on "Edit..." and give new name.

If you wish you may then go to System Preferences- click Network- click Advanced- click on tab "WINS" and check new name. In order to see the new name in your hardware router/firewall, you have to restart the Macbook.

Cheers, Heinz


----------



## Satcomer (Jul 2, 2009)

Sharing files between a Windows Vista Home Edition PC and a Mac running OS X Leopard 10.5

Connecting a Macintosh running Leopard (10.5) to SBS 2003 (look at ALL three pages)


----------

