I do a lot of ftp coding but am now faced with learning samba/smbclient since our new Win servers won't have ftp running on them. My source system (the one from which I'm trying to connect) is an AIX v5 box.
What I need to do is connect to a Win server using the smbclient version of the way I did it under ftp:
I see in the man page for smbclient that I can use -c followed by a list of commands separated by semicolons and I suppose that would work it that's the only way - however, before I get that far I need to get the password to the smbclient and that's where I'm having problems right this minute. Latest version of my attempt:
Fails miserably.
Note that I also tried putting the <password> on a line under the smbclient call - basically replicating the ftp process above - also without success.
Until I can get some better docs on smbclient, does anyone have a quick way to replicate the ftp approach detailed above?
Tnx.
Tom
"My mind is like a steel whatchamacallit ...
What I need to do is connect to a Win server using the smbclient version of the way I did it under ftp:
Code:
ftp -n <server IP> << EOF
user <username> <password>
cd <new directory.
put <file>
...
quit
EOF
I see in the man page for smbclient that I can use -c followed by a list of commands separated by semicolons and I suppose that would work it that's the only way - however, before I get that far I need to get the password to the smbclient and that's where I'm having problems right this minute. Latest version of my attempt:
Code:
smbclient \\<service> -U <username> <password>
Fails miserably.
Note that I also tried putting the <password> on a line under the smbclient call - basically replicating the ftp process above - also without success.
Until I can get some better docs on smbclient, does anyone have a quick way to replicate the ftp approach detailed above?
Tnx.
Tom
"My mind is like a steel whatchamacallit ...