PDA

View Full Version : Can't resolve windows hostname.



leinad177
August 16th, 2011, 07:28 PM
I was using this guide here (https://wiki.ubuntu.com/MountWindowsSharesPermanently) about mounting network drives and i get this error.


daniel@daniel-laptop:~$ sudo mount -a
[sudo] password for daniel:
mount error: could not resolve address for daniel-computer: No address associated with hostname
No ip address specified and hostname not foundThis is the entry i put into /etc/fstab

//daniel-computer/Movies /media/Movies cifs guest,uid=1000,iocharset=utf8,codepage=unicode,uni code 0 0

I can ping the laptop via the hostname on the computer but not the other way around.

Can anyone tell me how to fix this?

bodhi.zazen
August 16th, 2011, 07:30 PM
Add your windows box to /etc/hosts or add a dns server to your network.

leinad177
August 16th, 2011, 07:47 PM
Could you explain how to do that?

Thanks :)

bodhi.zazen
August 16th, 2011, 07:54 PM
gksu gedit /etc/hosts

Add in your windows box, save the file.

The synatax is :

IP address hostname

111.22.3.444 windows_host_name_goes_here

HermanAB
August 16th, 2011, 07:54 PM
Edit the hosts file:
$ sudo gedit /etc/hosts

Then add a line like this:
192.168.1.100 daniel-computer

Get the IP address of the Windows machine with a DOS box:
C:\> ipconfig