[Samba] Problems with the Samba Client

Alain Jimeno ajimeno at ntclick.com
Fri Jun 20 07:36:17 GMT 2008


Hi.
I've been experiencing some problems when I try to use the "smbclient" command 
in a bash script. My local computer runs under Kubuntu 8.04 and I'm trying to 
access a server running Ubuntu 7.10 Server.

The issue comes when I try to send some files to the server automatically with 
this script via crontab. The command looks something like this:

yes | smbclient -E //backupserver/backups -U user passwd -c "cd 
user/lastbackup; lcd /home/user/backup; mput *.tar.gz"

Apparently the files are sent and everything looks OK. But now I'm trying to 
implement an error log by retrieving the exception thrown by the different 
commands via "echo $?". Every command throw a 0 value indicating that 
everything went fine, except for this one that throws a 141 value, even when 
it sends the files properly.

I run the same command in another script, just changing the local and 
destination folder and throws a 0 value. 

Any ideas?

Thanks.
-- 
Alain Jimeno
www.axios.es



More information about the samba mailing list