PDA

View Full Version : [ubuntu] Accessing samba windows share in terminal


jockmullin
May 7th, 2008, 10:56 AM
Greetings. I am a total Ubuntu newbie, recently installed Hardy & have p2p networking with win xp & 98 shares working fine.

Hwvr, now wondering how/if these shares are accessible from a terminal session. Can't locate shares in file system.

i.e. looking to do something like:
ls -la smb://winserver/winshare

Is this possible, if so what is syntax, pls. Owise how to access shares from scripts?

Many thanks, Jock

jtrindle
May 7th, 2008, 12:20 PM
You're going to have to either mount the samba volume, or use smbclient and script that somehow.

To mount, the command looks like:

sudo mount -t smbfs //linuxserver/shared /mnt

Then your script navigates to the folders under /mnt

You may need to specify something like -o username=ferd,password=berfle after the -t smbfs for your setup.

jockmullin
May 7th, 2008, 01:03 PM
Hi, jtrindle

OK, thanks I will give that a try.
I thought having mounted the volume on the desktop would already have it mounted.

Thanks again, Jock

jockmullin
May 7th, 2008, 02:23 PM
Yes, it worked!

First I had to get the mount.smbfs helper program by installing smbfs, but the error message I got when I tried the mount said exactly what to do.

I like the way mount allows you to specify where the filesystem from the share will appear in the linux filesystem. Nice.

Jock