Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2263  / 3 Years ago, thu, september 16, 2021, 10:08:23

  • 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.


More From » windows

 Answers
1

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!


[#37246] Friday, September 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
smelrop

Total Points: 263
Total Questions: 122
Total Answers: 108

Location: Saudi Arabia
Member since Thu, Jan 28, 2021
3 Years ago
smelrop questions
Mon, Mar 13, 23, 07:22, 1 Year ago
Sun, Feb 5, 23, 13:02, 1 Year ago
Tue, Aug 31, 21, 00:50, 3 Years ago
Sat, Dec 18, 21, 15:18, 2 Years ago
;