Return code from smbclient ver. 2.0.3

Tuan Nguyen tng at
Wed Jan 31 15:25:22 GMT 2001


First, thanks to all of you for a good samba.

I observed that even the transmission from Unix to NT fails, the return code 
($? from korn shell) is also zero. It must
be different from zero.

I want to use the return code for "checking" the transmission. I will repeat 
the loop at least three times. Please look at my code.

Is this possible for you to make this chane in future release.

Thanks on advanced.

Best Regards,
Tuan Nguyen

The code:

/usr/local/samba/bin/smbclient //fs02/public -U"XXX%YYY" -c "prompt off;mput 
Marketing_manager*.txt" -d 4 if [[ $? != 0 ]]
/usr/local/samba/bin/smbclient //fs02/public -U"XXX%YYY" -c "prompt off; mput 
Marketing_manager*.txt" -d 4
if [[ $? != 0 ]]
/usr/local/samba/bin/smbclient //fs02/public -U"XXX%YYY" -c "prompt off; mput 
Marketing_manager*.txt" -d 4
if [[ $? != 0 ]]; then
Mail -s "From Error (after 3 times) in smbclient from 
UNIX to NT. Please retransmit the fi
le again." $ADMIN_MAIL </dev/null
exit 1

Output on the terminal:
$ smbclient //fs02/public -U"XXXX%YYYYY" -c "prompt off; put a" -d 4
Added interface ip= bcast= nmask=
Client started (version 2.0.3).
resolve_name: Attempting lmhosts lookup for name fs02<0x20>
startlmhosts: Can't open lmhosts file /usr/local/samba/lib/lmhosts. Error was 
No such file or directory
resolve_name: Attempting host lookup for name fs02<0x20>
Connecting to at port 139
session request ok
Domain=[MOBILIX] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
session setup ok
tconx ok
prompting is now off
dos_clean_name [\\a]
putting file a as \a Error writing file: code 0
( kb/s) (average kb/s)
$ echo $?

Køb, sælg eller efterlys varer i det nye auktionshus på nettet:
Køb ind på nettet - prøv det på
Få din egen gratis email på

More information about the samba mailing list