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 not able to cd into the samba like I would normally do:

cd smb://server/folder

It says: "bash: cd: smb/..." No such file or directory.

But if in nautilus I go to the folder and right click it, the location shown in the properties is:

smb://server/folder

Why isn't this working? Thanks

share|improve this question

3 Answers 3

The shell (bash) does not use unique resource locators (URLs).

In addition to other answers that tell you how to mount samba shares manually, if you can access it with the file manager, it has already been mounted using gvfs. You will be able to access it throught the .gvfs/ directory in your home directory:

cd ~/.gvfs/
ls

If I'm correct, you should see a directory called folder on server/.

share|improve this answer

You cannot use just cd smb://server/folder from a terminal.

To access the folder from terminal you need to mount the folder first.

sudo mkdir /mnt/server

sudo mount -t cifs //remote/folder /mnt/server -o username=user uid=name

Or just type smbclient //hostname/folder and type the username/password. After successful login you will able to access the folders.

share|improve this answer
    
how do I set up to automount it with fstab? Currently looks like: smb://folder /media/folder nfts defaults 0 0; It says Failed to access volume, no such file or folder. But I got the "smb://folder" path from the automatically mounted in the network list. –  Totty Oct 9 '12 at 13:09
    
I would recommend you to use autofs instead of fstab. Please refer this link to automount. –  devav2 Oct 9 '12 at 13:15
    
mount.cifs doesn't use URLs, but UNCs - you would use //remote/folder rather than smb://remote/folder –  jelmer Oct 11 '12 at 20:59
    
Yes I have mentioned that smb:://remote/folder wont work –  devav2 Oct 12 '12 at 6:16

The smb protocol cannot be used like this from bash. If you want to use it, you have to mount the smb share with the mount command, or to add it to your /etc/fstab, for example (taken from my fstab):

//server/smb-share /my/path/where/to/mount/it cifs  guest,uid=1000,iocharset=utf8,codepage=unicode,unicode  0  0

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.