FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 01-08-2009, 04:36 AM
Kevin
 
Default accessing smb folders in terminal

I am able to use GUI (Nautilus and Firefox) to access smb://windows_host/
folder on my Ubuntu 8.10. Can someone please advise how to access the
folder in a terminal? I want to write a script to move files between
windows_host and Ubuntu.

--
-Kevin


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-08-2009, 01:19 PM
Rashkae
 
Default accessing smb folders in terminal

Kevin wrote:
> I am able to use GUI (Nautilus and Firefox) to access smb://windows_host/
> folder on my Ubuntu 8.10. Can someone please advise how to access the
> folder in a terminal? I want to write a script to move files between
> windows_host and Ubuntu.
>

You have 2, possibly 3 choices.

1. You can mount the remote filesystem. You need super user privilages
to do this. Install the smbfs package.

sudo mkdir /mnt/network

sudo mount -t cifs //remote/sharename /mnt/network -o
username=remoteUsername uid=localUsername

2. You can use smbclient, which works much the same was as ftp for
SMB/CIFS network shares. man smbclient.


3. I believe your version of Ubuntu has the new gnome virutal FS that
already mounts your network drives for you somewhere in your /home
directory structure. However, this is probably not predictable enough
to write scripts against.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-08-2009, 03:07 PM
Derek Broughton
 
Default accessing smb folders in terminal

Rashkae wrote:

> Kevin wrote:
>> I am able to use GUI (Nautilus and Firefox) to access smb://windows_host/
>> folder on my Ubuntu 8.10. Can someone please advise how to access the
>> folder in a terminal? I want to write a script to move files between
>> windows_host and Ubuntu.
>>
>
> You have 2, possibly 3 choices.

Four (or more) :-)
>
> 1. You can mount the remote filesystem. You need super user privilages
> to do this. Install the smbfs package.
>
> sudo mkdir /mnt/network
>
> sudo mount -t cifs //remote/sharename /mnt/network -o
> username=remoteUsername uid=localUsername

If the remote filesystems are predictable, add them to /etc/fstab with the
"user" option, you can then mount them as user. I have these:

> //HOST1/shared /home/derek/DF_SHARED cifs
> noauto,user,credentials=/home/derek/.mar,rw 0 0
> //HOST2/D$/Plone3 /home/derek/DF_VDC cifs
> noauto,user,credentials=/home/derek/.vdc,rw 0 0

Using the "credentials" files means that, while a superuser has to do the
actual setup, they don't need to know your passwords.

fwiw, I sometimes have trouble hibernating the system when those shares are
still mounted - you should umount them in ls /etc/network/if-down.d/



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 01-19-2009, 09:56 PM
Tremmolow
 
Default accessing smb folders in terminal

On Thu, 08 Jan 2009 05:36:13 +0000, Kevin wrote:

> I am able to use GUI (Nautilus and Firefox) to access
> smb://windows_host/ folder on my Ubuntu 8.10. Can someone please advise
> how to access the folder in a terminal?

smbclient //ipaddressornetbiosname/share -U usernameonhost


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 11:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org