[YLUG] mv and cp to NAS via samba

mike cloaked mike.cloaked at gmail.com
Fri Feb 20 08:48:11 UTC 2009


I don't know what version of linux you are using but I use automount
(I use Fedora) and provided the autofs package is installed you can
add a line to /etc/auto.misc of the form:

mynasshare -fstype=cifs,rw,noperm,user=username,password=mypassword,uid=mike,gid=mike
://sharedom/sharename

Then simply referring to mynasshare will mount it -
eg ls /misc/mynasshare
will list the files on the drive

or
mv mylocalfile.txt .misc/mynasshare/

should do what you wanted

 - and if the mount is not used for some period then it automatically
umounts - which is a nice feature.

Perhaps this will work on your system.  If you are using Ubuntu
perhaps a Ubuntu user on this list will chime in and say whether the
automount works in a different way to how I describe for Fedora?

HTH


On Fri, Feb 20, 2009 at 8:17 AM, nigel white <xm2 at btinternet.com> wrote:
> Thanks for these ideas Gary. Here's the results -
>
> sudo mkdir -p /media/qserver/q
> worked fine. A new directory was created.
>
>
> sudo mount -o mode=666 smb://qserver/q /media/qserver/q
> got
> mount: wrong fs type, bad option, bad superblock on smb://qserver/q,
>       missing codepage or helper program, or other error
>       (for several filesystems (e.g. nfs, cifs) you might
>       need a /sbin/mount.<type> helper program)
>       In some cases useful info is found in syslog - try
>       dmesg | tail  or so
>
> All greek. What next?
>
> When we get this mounting process working smoothly, will it need to be
> done after each boot, or will it remember the mount?
>
> I've noticed that some wizardry seems to mount things on the fly - eg
> once I have browsed to /q once after each boot, using the gui file
> browser, an icon called "q on qserver" appears on my desktop, and also
> in the list of "places" in the gui sidebar. Something similar happens
> when there's a CD in the drive. Its a handy feature. Is this an example
> of a mount? Is this sambas' doing?
>
> Many thanks
> Nigel
>
>
>
>
>
> On Thu, 2009-02-19 at 13:30 -0500, Chunky Kibbles wrote:
>> On Thu, Feb 19, 2009 at 01:25:25PM -0500, Chunky Kibbles wrote:
>> > sudo mkdir -p /media/qserver/q
>> > sudo mount -o mode=666 smb://qserver/q/temp /media/qserver/q
>>
>> correction:
>> sudo mount -o mode=666 smb://qserver/q /media/qserver/q
>> You want to mount the *share* called "q", not a subdirectory of it [which
>> doesn't work over smb, last I checked].
>>
>> > cp /home/nigel/Documents/other/test2.txt /media/qserver/q
>>
>> Gary (-;
>>
>> _______________________________________________
>> York mailing list
>> York at lists.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/york
>
>
> _______________________________________________
> York mailing list
> York at lists.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/york
>



-- 
mike



More information about the York mailing list