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
  • the domain: is
  • full hostname is:
  • short hostname is: bla

  • I installed winbind.

  • here is my smb.conf:

    name resolve order = lmhosts host wins bcast

  • here is my nsswitch.conf:

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

when I try to ping full hostname, I get: "ping: unknown host"

when I ping short hostname it works and shows me

PING ( 56(84) bytes of data. 64 bytes from ( icmp_req=1 ttl=62 time=49.7 ms

*notice that it manages to get the full hostname!? :S

now the only reason I need it is cuz I'm trying to reach intranet websites. when I type short hostname "bla" in firefox address bar, it automatically changes it to the full hostname (which is good, right?!) but then it says:

Server not found Firefox can't find the server at

what am I doing wrong? it's driving me nutz. so if you are wandering then yes, it is company intranet I'm trying to reach from ubuntu. If I use my crappy winxp everything is working perfectly well.

share|improve this question
Do you have DNS enabled? – Mitch Jun 27 '12 at 8:38
yes, DNS is enabled. I reach internet with no problems. only local intranet stuff doesnt work. – Nimrod Dayan Jun 27 '12 at 9:21
up vote 2 down vote accepted

I managed to solve it. There are essentially 3 steps required to get Ubuntu to fully communicate with Windows based intranet machines.

  1. Install Samba and Winbind
  2. modify /etc/samba/smb.conf like this:


        workgroup = DOMAIN_NAME

        server string = %h server (Samba, Ubuntu)

   wins server = WINS_IP_ADDRESS

        dns proxy = no

   name resolve order = wins lmhosts host bcast

*notice the last line, "wins" comes first in the order!

  1. modify /etc/nsswitch.conf instead of having:

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

change it to:

hosts:          files dns wins mdns4

restart computer (or restart samba and network) that's it, enjoy!

share|improve this answer

Please make sure that the first line of your resolv.conf file is: search

share|improve this answer
this is the content of my resolv.conf file: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver search I guess I'm not supposed to edit it ;) – Nimrod Dayan Jun 27 '12 at 16:23
I found out that I can do the same thing through the network manager but anyhow, it doesn't solve the problem, it actually made it worse so I can't ping other hostnames at all! – Nimrod Dayan Jun 28 '12 at 20:20

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.