Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 11.04 installed.

It is joined to a domain. I am able to ping some of my computers by their name, but some I can't. Those I can't are our NAS machines (Readynas Netgear). I can ping them only by IP from my Ubuntu machine. But I can ping them regularly by host name, from any other windows machine.

Please advise what should I check?

share|improve this question
Ok, solved it, just added: WINS to the /etc/nsswitch file – Saariko Aug 15 '11 at 9:11
Add it as a answer and mark it as accepted. – karthick87 Aug 15 '11 at 9:33
up vote 4 down vote accepted

Just add WINS to the hosts: line in the /etc/nsswitch.conf file:

# /etc/nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat lsass
group:          compat lsass
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] wins dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

This tells the system to use WINS in order to lookup netbios. The winbind package has to be installed for this to work.

share|improve this answer

For a more hackish method then the one listed by @Saariko you could edit your hosts file. This is not a robust solution and has to be updated manually, if your network set up changes.

It can also hide network problems if names don't resolve correctly through other tools like wins and dns

Host file on Ubuntu and many other *nix is found


In windows the hosts file is usually found


To make changes in Ubuntu edit the file and put in the ip address and hostnames you want.

sudo vi /etc/hosts servername server2name

In my host file I add all the web severs I set up for my web development local.home local.site1

Then I can ping

$ ping local.home
PING local.home ( 56(84) bytes of data.
64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.037 ms
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.