Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an unbuntu 9.10 server and have set the hostname to "fileserver" When I try to ping fileserver from a client machine it doesn't find it, however I can ping by the IP my router assigns it. I have tried changing the ip in /etc/hosts from this:

127.0.0.1    fileserver

to this:

192.168.1.109    fileserver

which is the ip being assigned. I had a previous install of this server and i had no issues with this - only difference in this install is i did not select any of the options such as LAMP, OpenSSH, etc during the install process. I can access the machine fine by ip using PuTTY. Any ideas?

share|improve this question

migrated from stackoverflow.com Mar 28 '10 at 5:01

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

If it is the case that you're putting that entry in the server's hosts file: The hosts file is changed on the client side, not the server side. When a computer tries to resolve a hostname, it first checks its hosts file; if an entry is in there that matches the desired hostname, the IP of that entry is immediately returned. However, a server's hosts file does not determine the DNS lookups of any other computer; that's left for the DNS server to figure out.

Some certain environments will check the entire local IP netmask in search of a computer with a hostname that matches the requested one, but it isn't always guaranteed to work.

If the client is a Windows computer, you might have more luck if you enable the Samba service on the Ubuntu machine, and make sure that the Samba hostname is set to fileserver.

share|improve this answer
    
i installed samba and that fixed it. thanks! –  Tone Mar 28 '10 at 5:22
    
Good to hear! If you don't mind, please click the checkmark under the voting number to the left of this answer to mark it as accepted. –  Ricket Apr 1 '10 at 20:27
    
hmm.. i can't maybe because this was migrated from stackoverflow?? –  Tone Apr 8 '10 at 12:44
    
No worries, it's not a big deal :) thanks for trying! –  Ricket Apr 14 '10 at 18:47
add comment

Your Answer

 
discard

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.