1
  • the domain: is foo.bar.local
  • full hostname is: bla.foo.bar.local
  • 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 bla.foo.bar.local (10.11.20.135) 56(84) bytes of data. 64 bytes from bla.foo.bar.local (10.11.20.135): 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 bla.foo.bar.local.

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.

2
  • Do you have DNS enabled?
    – Mitch
    Jun 27, 2012 at 8:38
  • yes, DNS is enabled. I reach internet with no problems. only local intranet stuff doesnt work. Jun 27, 2012 at 9:21

2 Answers 2

2

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:

[global]

        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!

1

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

2
  • 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 127.0.0.1 search dhcp.inet.fi I guess I'm not supposed to edit it ;) Jun 27, 2012 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! Jun 28, 2012 at 20:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .