Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using ubuntu and gnome on my computer.

When I open up File Browser, on the left hand rail, I see conveniently a folder called "Work Server". When I mouse over it, the following caption appears "smb://john@69.100.100.1". If I click on that folder, then I can see the contents of that folder. Everything is great.

So now when I open up a terminal/shell, I type in

cd smb://john@69.100.100.1

I get an error saying the directory doesn't exist. How do I enter this directory via shell/terminal?

share|improve this question
add comment

1 Answer

The reason you can't cd in that share is because cd only works on local filesystems*, you have two ways of solving your problem here:

Use smbclient to browse the share:

smbclient -U john //69.100.100.1/SHARENAME

or smbmount if you want to mount the share locally, note that the mount point must exist as a folder:

sudo smbmount //69.100.100.1/SHARENAME ~/shares/SHARENAME -o user=john,iocharset=utf8,noperm

Make sure you adapt SHARENAME to match your environnement.

If your login is part of an Active Directory domain you may want to add its name to those commands, with the second one that would be:

sudo smbmount //69.100.100.1/SHARENAME ~/shares/SHARENAME -o user=YOURDOMAIN//john,iocharset=utf8,noperm`

* The meaning of "local" here is not straightforward, just keep in mind you can't use normal tools before you mount remote FS locally.

share|improve this answer
    
am I supposed to replace USERNAME with the name of my current shell user? And SHARENAME with the directory name i want to cd into? When i tried I got the following error: Connection to john@69.100.100.1 failed (Error NT_STATUS_BAD_NETWORK_NAME) –  John Oct 2 '12 at 15:10
    
yep, you have to specify an 'endpoint' ("SHARENAME") which is the name of the share you can see in your GUI file browser and adapt "USERNAME" (maybe even add your domain before that) to be able to mount the share. –  Shadok Oct 2 '12 at 15:39
add comment

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.