Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Ubuntu 12.10 installed in VMware Workstation as a guest. The VM's network adapter is set up as "bridge", so effectively, it should look like it is connected directly to the switch all my computers are connected to.

I am trying to make the VM connect to shares on the host. The host has a computer name of MyComp and workgroup of WORKGROUP. The host is running Windows 7 64-bit.

In Nautilus, I choose File > Connect to server. I then set it to Windows Share and try to connect to my computer. If I set MyComp as the server name, the connection will fail with Failed to retrieve share list from server. If I set it to the ip address 192.168.1.7, then it works.

I have done a bit of research and discovered that maybe it is because I don't have nmbd installed on the system. However, I believe it is part of the samba packages, which I do have:

user@ubuntu:~$ sudo apt-get install samba-common-bin smbclient samba-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
samba-common is already the newest version.
smbclient is already the newest version.
samba-common-bin is already the newest version.

Is there anyway I can connect to the windows share using the computer name?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Finally found a solution to this after fiddling with some other things.

  1. Install Winbind if it has not been installed:

    sudo aptitude install winbind

  2. Edit /etc/nsswitch.conf and change hosts: files dns to hosts: files wins dns.

You may after to restart your system after changing this.

share|improve this answer

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.