Re: Copy to smb share

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Tom Ostlund
Date:  
To: Main PLUG discussion list
Subject: Re: Copy to smb share
I would be happy to post the fstab line but it seems that there is no need.

The problem resolved itself when I restarted the computer and the share
mounted just fine.

Thank you all for your help!



On 05/15/2011 05:40 PM, Joseph Sinclair wrote:
> Did you install cifs-utils first? Also, you should use cifs as the filesystem type in fstab instead of smbfs (Matt is correct that cifs is more current; smbfs is just a rename for cifs at this point for compatiblity with older scripts).
>
> Can you post the fstab line?
>
>
> On 05/15/2011 03:18 PM, Tom Ostlund wrote:
>> Under properties the folder does show up as cifs but when you hover in
>> nautilus is shows smb.
>>
>> I have tried to add it to fstab but when I try to mount it I get a
>> message that tells me that it can not find it in fstab or mtab
>>
>>
>>
>> On 05/14/2011 07:05 PM, Joseph Sinclair wrote:
>>> James way works well if you only have to do this once.
>>
>>> If you want to copy files to the smb share regularly (I would assume that given the uri you specify), then installing smbfs (e.g. apt-get install smbfs) and mounting the smb share on a convenient directory (e.g. mount -t smbfs //my-airport-extreme.local/drobo/folder/ /home/shares/drobo/folder/) makes the share part of your file system.
>>> Once you have the share mounted, it's as simple as "cp somefile.ext /home/shares/drobo/folder/".
>>
>>> Once you have it mounted and working, don't forget to add it to /etc/fstab so it's mounted by the system when you're connected to the home network:
>>>     *example* line for /etc/fstab, note the uid and gid parameters, which should be your user uid/gid to make access easy.
>>> //my-airport-extreme.local/drobo/folder/    /home/shares/drobo/folder/    smbfs    file_mode=0644,dir_mode=0755,uid=####,gid=####,credentials=/etc/my-drobo-user.creds,rw    0    2

>>
>>> The file "/etc/my-drobo-user.creds" is needed if the share requires a username/password and you're not running a Domain Controller or Active Directory service on the network.
>>> This credentials file is owned root:root and file mode 400 for security; it contains the user/password/workgroup for your drobo share in plain text:
>>> username=SOMETHING
>>> password=SOMETHING
>>> workgroup=SOMETHING
>>
>>> I know that's not the safest thing in the world, but I find it works well enough for most home users.
>>
>>> Once that's there, if you find it's not connected, then you can just "sudo mount /home/shares/drobo/folder/" to re-establish the connection.
>>
>>
>>> On 05/14/2011 06:26 PM, James Mcphee wrote:
>>>> Unless you've already connected to the smb share, you won't be able to
>>>> access it. You could try smbclient, and do a put. I'm sure there are other
>>>> ways, but that's the quickest to script. Soooooo wrong from a security
>>>> perspective, but eh.
>>>>
>>>> smbclient //target/share password -W domain -u user <<ENDEND
>>>>> cd path
>>>>> put file
>>>>> ENDEND
>>>>
>>>> Something like that.
>>>>
>>>> On Sat, May 14, 2011 at 5:24 PM, Tom Ostlund <> wrote:
>>>>
>>>> Hello All.
>>>>
>>>> I am trying to figure out how to copy a file to a smb share from the
>>>> command line.
>>>>
>>>> The share is
>>>>
>>>> smb://my-airport-extreme.local/drobo/folder/
>>>>
>>>> my way is failing
>>>>
>>>> cp test.txt smb://my-airport-extreme.local/drobo/folder/test.txt
>>>>
>>>> What is the right way to do this?
>>>>
>>>> Thanks,
>>>> Tom
>>>>
>>>> Mesa AZ
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>>>>
>>
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list -
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>>
>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss