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 am unable to map a Windows network drive in Ubuntu. I have entered the following command in the terminal:

karthick@karthick:~$ sudo mount -t cifs -o username=raghu //172.29.32.184 /media/Data/
Password: 
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

But it returned an error. I hope someone can sort this out. Thanks in advance.

share|improve this question

2 Answers 2

up vote 10 down vote accepted

I think you need to also pass the windows share name as well as confirm that you've created /media/Data

sudo mkdir /media/Data

Use something like

smbclient -L //172.29.32.184 

to list the shares, then append the share name to your mount

sudo mount -t cifs -o username=raghu //172.29.32.184/sharename /media/Data/

If you need to mount your windows share permanently then there is an excellent HowTo by dmizer UbuntuForums Staff (scroll to the permanent mount section)- I wont reproduce the advice here because its got some excellent debugging hints and tips and other workarounds that you may encounter.

share|improve this answer
2  
Spot on. In order to map a share (even using Windows as the client) you have to point directly at a share. You can't mount the entire computer and you can't [directly] mount a subdirectory of the share. –  Oli May 31 '11 at 9:55
    
It works like a charm. But after a restart the drive is gone, how to map it permanently ? –  karthick87 May 31 '11 at 12:47
    
@karthick87 - edited my answer –  fossfreedom May 31 '11 at 13:12
    
I have followed your instruction, but i am getting the following error.mount error(11): Resource temporarily unavailable Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) –  karthick87 May 31 '11 at 23:25
    
@karthick87 - thats a new one on me - maybe worth posting that one on that active forum thread. The only google search on this error that I found that vaguely might be related is this one: linuxquestions.org/questions/linux-server-73/… –  fossfreedom Jun 1 '11 at 20:23

Another way is to use the file browser to connect to a network location. Then it is mounted under ~/.gvfs

From there, you can mkdir ~/winbox and then ln -s ~/.gvfs/blahblahblah ~/winbox.

I recall there being some permanence to this, but I forget the details. :P I was developing php/odbc app for Quickbooks which needs to be run on the Quickbooks computer.

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.