error using samba

Yasir Sualeh yasir.sualeh at gmail.com
Fri Dec 22 11:10:48 GMT 2006


here a tiny shell script:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Verify Availability
WINHOST=YasirSualeh
SHAREFOLDER=edbbackup
CREDINTIALS=backup%backup
FILE=work.s

#CONNECT=$(echo "Testing SAMBA Connectivity for $WINHOST " | smbclient -M
$WINHOST)

if echo "Testing SAMBA Connectivity for $WINHOST " | smbclient -M
YasirSualeh | grep -q "Connected"
then
        if [[ -e $FILE ]]
        then
                smbclient //$WINHOST/$SHAREFOLDER -U $CREDINTIALS -c "put
$FILE"
        else
                echo "$FILE do not exist, No transfer."
                exit 1
        fi
else
        echo "Connection Refused to $WINHOST"
fi
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

it works fine with hard code server name but do not send messages to to
server if use variable.

Any hint????




-- 
View this message in context: http://www.nabble.com/error-using-samba-tf2870174.html#a8022087
Sent from the Samba - smb-clients mailing list archive at Nabble.com.



More information about the smb-clients mailing list