Samba scripting question

N

nbauer

Guest
Hello all,

I have written this bash script that allows me to tar-ball my home directory and then use smbclient to upload it to my server ( sort of ). This script works fine on SCO, Debian Linux, Ubuntu, and OpenBSD, having used it on all of those a number of times.

Now I am trying to use it on OS 10.3 and the thing keeps bombing on me in this one section.

Heres the code
Code:
smbclient -l username \\\\server\\share -A /path/to/authenticationFile/  -c ; cd SubdirectoryOfShare ; put /local/file /remote/file; exit;

so heres whats going on. It connects to the share, then changes to the subdirectory I want it to go to. The part that keeps bombing is when it trys to use the put command in the script. For some reasons it does not like put or mput. Yet if I do all of it manually it works fine.

I have spent three days Googleing and testing all kinds of crap, but it still bombs on me. Any help would be appreciated.

Thanks in advance,

Norm
 
Joined
May 22, 2005
Messages
2,159
Reaction score
67
Points
48
Location
Closer than you think.
Your Mac's Specs
Performa 6116 2GBSCSI 8MB OS 7.5.3
I used

smbclient //Server/Share -A ~/AuthFile to login into smbclient

When I run that with -c put /local /remote I get
put <filename>

When I run put after another command like -c ls; put /local /remote I get
-bash: put: command not found
yet ls runs correctly

When I run the commands manually my put command results in a zero kb file

smb:\>put local /remote
putting file local.pdf as \/remote.pdf (0.0 kb/s) (average 0.0 kb/s)

Sounds like a bug. Are you using OS X as the smb client or server? What ver

I'm 10.4.2 smb server and client
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top