I am having trouble with a bash script, here is the code:
Code:
#!/bin/bash
#--------------Environment variables for laptop--------------------
USERNAME1=Doug Milburn
PASSWORD1=hello
#
DRIVE=/var/autofs/zip.1/zip.1
#
TARGET_MACHINE=Doug
#
mkdir $DRIVE/$TARGET_MACHINE
cd $DRIVE/$TARGET_MACHINE
#
smbclient //$TARGET_MACHINE/Outlook $PASSWORD1 -U $USERNAME1 -c "recurse;prompt;mget *;"
#
tar cvpz $DRIVE/$TARGET_MACHINE > Doug_c.tar.gz
rm -rf $DRIVE/$TARGET_MACHINE
#
I get an error like it is trying to connect to smb right after this line:
smbclient //$TARGET_MACHINE/Outlook $PASSWORD1 -U $USERNAME1 -c "recurse;prompt;mget *;"
this is what happens, I get this:
smb>
Does anyone have any ideas? Does it have anything to do with the space in the username??
Thanks,
Dennis