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
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?