63

I am unable to map a Windows network drive in Ubuntu. I executed 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.

karthick87
  • 84,513

6 Answers6

103

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/
  • Note- If you receive the error: wrong fs type, bad option, bad superblock on... make sure you have cifs-utils installed, it may not be installed on your distro by default.

    sudo apt-get install cifs-utils

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.

fossfreedom
  • 174,526
34
  • open a Nautilus window
  • click Go in the menu, or alternatively press Ctrl+L
  • enter smb://remote_host/share_name
  • Go to Bookmarks and click add
houss
  • 441
3

I use @fossfreedom's answer in one line command use this :

echo '<your su pasword>' | sudo -S mkdir /mnt/sharedfolder/ | sudo -S mount -t cifs -w -o username=nabed -o password=nabed //192.168.0.58/sharedfolder /mnt/sharedfolder/
2

Download VisiPics and install it with Wine.

Mount the shared folder if it exists:

sudo -S mkdir /mnt/sharedfolder/ 
sudo -S mount -t cifs -w -o username=nabed -o password=nabed //192.168.0.58/sharedfolder /mnt/sharedfolder/

Then go to VisiPics and open Z: drive and folder /mnt. Inside you will find the network data.

Geeqie does great job too and has an Ubuntu version.

Eliah Kagan
  • 119,640
Frank
  • 21
  • 2
1

As of 2020 this is what works for me on Ubuntu 18.04:

  • open the Nautilus file manager
  • press Ctrl+l to write into the address bar
  • insert sftp://your_user_name@target_ip_address where target_ip_address should have the form 102.69.35.384 , then just press Enter to confirm

Now you will be asked for the log-in user name and password. That's it, you should now have a graphical connection in Nautilus to the drive

NeStack
  • 295
  • 3
  • 13
0

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.

Edit for 2018 and beyond: After 14.04, ubuntu seems to no longer use .gvfs, so the above might not work for you. Some folks got really mad that something changed and my old answer didn't work.

Check out this comment: ~/.gvfs moved to /run/user/[UID]/gvfs/blahblah. After using Nautilus to make a location using sftp://host:port, the remote server's file system showed up there.

Krista K
  • 353