4

I know this is already asked but I can't find a clear answer. I put a new Ubuntu server in my LAN and I can't ping it but the hostname. I don't want to edit all my LAN windows hosts's file (+40 pcs) and add the entry. Perhaps I have another Ubuntu server and I can ping it by hostname without change anything.

All servers and client are using another internal DNS server based on an old redhat installation.

The hostname in the server that I can't ping is setted. What I have to do/check?

Kreker
  • 458
  • 4
  • 10
  • 22

4 Answers4

8

You've got two options, of which you can do either or both:

  • Install Samba (apt-get install samba) and activate the nmbd component, this will make the Ubuntu server answer broadcast NetBIOS name requests from Windows clients without further configuration.

  • Add a record to your DNS server. You mentioned the DNS server is RedHat EL 4 so will quite likely be running ISC Bind. The configuration is in /etc/named and RedHat compatible manuals are still available here: http://www.centos.org/docs/4/html/rhel-rg-en-4/ch-bind.html

Edit: The second of these is preferable, you shouldn't rely on NetBIOS to do name resolution for you.

James Yale
  • 5,182
  • 1
  • 17
  • 20
  • Thanks I'll give it a try. I think the difference between the 2 ubuntu servers is that the pingable one has samba installed (!) the other one nope. You win! – Kreker May 16 '12 at 09:32
  • sorry, can you help me how to add a entry in the named file? I don't figure out how to add only one simple lan ip with the hostname:\ – Kreker May 16 '12 at 12:16
1

Add an entry into DNS on your domain controller in forward lookup zones for the Ubuntu machine, this is what I normally do.

boburob
  • 1,174
  • 8
  • 23
0

hostname.local should work, and if not, refer to Ubuntu Zeroconf guide.

Sašo
  • 1,494
  • 2
  • 10
  • 14
0

See this answer: https://askubuntu.com/a/516533

  1. sudo apt-get install winbind
  2. sudo apt-get install libnss-winbind
  3. sudo gedit /etc/nsswitch.conf and append "wins" after "files"

    hosts: files wins mdns4_minimal [NOTFOUND=return] dns

ping WinComputer shoud work from your ubuntu machine.

And from WinComputer you should be able to ping UbuntuComp

mircea
  • 1