Accessing windows shares in ubuntu is always a pain . There is always some problem or the other. Sometimes accessing windows shares using the hostname of the windows system can be a problem whereas accessing the same windows machine using ip address works. For example : smb://192.168.1.10 works but smb://prash-laptop does not work. It can be frustrating to remember the ip address of the windows machine always , and it is impossible if the windows machine gets an ip via DHCP as its ip address will change everytime .So here's how you access windows shared folders in ubuntu using hostname :
Step 1 : Go to the Terminal(Applications->Accessories->Terminal) and type sudo apt-get install winbind
Step 2 : Then back in the terminal type sudo gedit /etc/nsswitch.conf
Step 3 : Now the nsswitch.conf file show open in gedit
Step 4 : Now look for the following line
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
and replace it with
hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4
Step 5 : Save the file and close it
Step 6 : Then back in the terminal type sudo /etc/init.d/winbind restart and then type sudo /etc/init.d/samba restart
Step 7 : Thats it , you should now be able to access windows shares in ubuntu using hostname
|
5
comments
]
5 comments
Does this work for hidden shares as well?
well hidden shares will continue to remain hidden , although by using the full link of the shared folder , you may be able to access it..
Got to step 6 and tried to restart samba and got the error message Command not found. Had a look at directory init.d and found a program samba4 not samba. Tried samba4 in the last command but dont know if it worked. There was no error message this time. Went to Places, Network and doubled clicked Windows Network and still get the error Unable to mount location. Failed to retrieve share list from server. What have I done wrong here?
I'm not sure if this works with samba4 havent tried that out..this tutorial only helps in telling ubuntu to recognize the hostname , the failed to retrieve share list from server is a nautilus bug , read this http://www.prash-babu.com/2008/09/how-to-access-windows-shared-folders-in.html
Thanks for that link to your older post. I followed it and was able to mount my windows shared folders using the IP address of the Windows PC. Still having a problem with the hostname recognition but at least I can see my windows shares in Ubuntu now. Thanks again
Post a Comment