Paul <[EMAIL PROTECTED]> writes:

> Hi,

> I am probably missing the obvious here but how do I get a script to
> recognise a network usb2 disk?  I konqueror I can read and write
> using smb:// xxx.yyy.com but if I define the backup disk the same I
> get the error message that there is no such file or directory.

The shell (that the script starts) doesn't know about smb protocol.
Konqueror has code that talks smb.
You might be able to script smbclient with expect or something but 
assuming you have this USB device setup as a windows share:

One way would be to mount the disk locally using cifs.  See 
`man mount.cifs' for details but the syntax looks like this:

>From /etc/fstab (This is all one line in fstab)
//harvey/harvey-c  /mnt/harvey-c cifs noauto,username=reader,\
credentials=/etc/samba/CifsCredentials

Those are `UNC' paths like you would use with smbclient. (But not
Kanqueror). 

A command line might look like:

  mount -t cifs -o user=reader%XXPASSWDXX //harvey/harvey-c /mnt/harvey-c

The directory /mnt/harvey-c has to be created ahead of time.
The user reader needs to have an account on that windows machine.

You'll need a windows user account username and password.  If you
don't use passwords for windows shares I think you can just leave out
the %SECRET_PASS, but I'm not sure exactly.

Once the device is mounted locally you can read/write to/from it in
scripting, then umount it at the end of the script.



-- 
gentoo-user@gentoo.org mailing list

Reply via email to