From: Peter Van Lone (petervl_at_gmail.com)
Date: Tue Sep 12 2006 - 06:33:32 CEST
Message-ID: <68b791330609112133q6c2c1efie9975c42e8fb51e2@mail.gmail.com> Date: Mon, 11 Sep 2006 23:33:32 -0500 From: "Peter Van Lone" <petervl@gmail.com> Subject: Re: [suse-sles-e] smbclient copy from linux box to windows
On 9/11/06, Black, Alain <ablack@bloodsystems.org> wrote:
>
> You can use any character string that you like, I personally like EOF.
> You're telling smbclient to read input until it reaches the EOF string
> again. It's a way of automating some processes which normally aren't.
> You could also have used expect, but this is faster, if not as clean.
>
> The translate command translates from Linux/Unix text files to Windows
> based text files. Handles all of those nasty Ctrl-M's for you. You may
> not need this, but since you were talking log files, I thought I'd throw
> it in.
Ok, thank you again. I've made some progress, but I am getting output
that I am not sure what to make of:
p02-dcs13:~ # ./smbput.sh
Domain=[COREY] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
smb: \> smb: \> smb: \dell\> smb: \dell\> NT_STATUS_ACCESS_DENIED
opening remote file \dell\/root/test.txt
smb: \dell\> p02-dcs13:~ #
I have opened a terminal in my linux laptop, and su - to root
then I created the following script "smbput.sh" in /root
#!/bin/bash
/usr/bin/smbclient //192.168.2.101/c matthew -U mshome/corey <<EOF
cd dell
translate
put /root/test.txt
exit
EOF
it looks like the "put" command is confusing the source and
destination. I want to copy /root/test.txt to c:\dell
What is wrong with the script as I have it?
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com
This archive was generated by hypermail 2.1.7 : Tue Sep 12 2006 - 06:33:47 CEST