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 a samba server and I want to access it by name from my windows machine. Currently if I can use the ip address e.g. \\192.168.0.104 (although it does not appear automatically in network) to access the machine from windows, but I would like to access it by name. My understanding was that the simplest way to do this was using a hosts file.

I have tried adding

127.0.0.1 myservername

and

192.168.0.104 myservername

to the server, but this does not allow me to access by //myservername or ping myservername. I understand I can edit the hosts file on my windows machine and give the ip a name, but ideally I would like the name to be set by the server so I do not need to modify every other machine. I think I have done this before using the hosts file but am no longer sure how it works exactly.

So how can I give my samba server a name accessible from windows?

Thanks

share|improve this question
    
Samba server is running on which distro? Did your package manager also install nmbd? –  Tim Dec 29 '11 at 17:52
add comment

1 Answer

You need to use a name service server like DNS, WINS or NetBIOS Name Service. Nowadays Windows is favoring DNS over WINS and NetBIOSNS is obsolete.

Add an A record for your samba server in the local DNS, make sure that all DNS clients are configured to use the same sub-domain. You can configure your DHCP server to send the proper DNS configuration to the clients.

To be able to see the server in My Network Places list, you might need to configure the same workgroup for all computers as it is on the samba server.

share|improve this answer
    
Add a DNS server on the same machine as the samba server? –  zenna Dec 29 '11 at 15:48
    
You can but I would suggest adding it to your dhcp server instead. –  Nunya Dec 29 '11 at 18:58
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.