Can't access windows/samba share by hostname but access by ip works

Asked by gklein.atc@gmail.com

Hello

I installed Ubuntu 14.04.
I want to access my Windows shares through my LAN.
When browsing the network in Ubuntu's default file browser or the nemo browser, all my computers on the LAN are displayed, I can successfully connect to my Windows 7 computer's shares, but I can't connect to my Synology NAS shares.

When I click on the Win7 computer icon, it shows the availableshares and then username/password prompt.
When I click on the NAS icon, it stalls for a few seconds and then I get this error

(french) Impossible de monter l'emplacement
 L'obtention de la liste des partages du serveur a échoué : Connexion refusée

(it should translate to this in english) Unable to mount this location
Failed to retrieve the share list from server : access denied

However, the weird thing is : when i manually try to access smb://<ip of the nas> , it works.
I tried manually typing smb://<hostname of the nas> , I get the same error as when browsing the network and clicking the NAS's icon.

What can I do ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

If you add an entry in /etc/hosts to resolve the name to an IP that way. Sounds like DNS is falling short. The name you use will then translate to the IP you use.

Revision history for this message
gklein.atc@gmail.com (gklein-atc) said :
#2

Thanks actionparsnip, that solved my question.