Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

cenovusjim

Reviews(2)
bycenovusjim, October 19, 2015
1 of 1 people found this review helpful
Thanks for the great script. Made the following updates to deal with files in subdirectories:

$ diff check_smb_file check_smb_file-orig
18c18
$PROGNAME -H -W -s -f -u -p -S -E
57,59d56
";;
82c79
onErrorMessage="ERROR: File \"//"$host""$sharePathToTest"$fileToTest\" does not exists."
89c86
smbclient //"$host""$sharePathToTest" -U "$user"%"$password" -W "$workgroup" -c "get '$fileToTest' /tmp/"$fileToTest""
92c89
rm -f /tmp/"$fileToTest"
bycenovusjim, October 19, 2015
Love the script! Had and issues with accessing files in subdirectories so made the following changes to the script:
1. sub-directories in the share
2. added full path to commands used

$ diff check_smb_file check_smb_file-orig
18c18
$PROGNAME -H -W -s -f -u -p -S -E
57,59d56
";;
82c79
onErrorMessage="ERROR: File \"//"$host""$sharePathToTest"$fileToTest\" does not exists."
89c86
smbclient //"$host""$sharePathToTest" -U "$user"%"$password" -W "$workgroup" -c "get '$fileToTest' /tmp/"$fileToTest""
92c89
rm -f /tmp/"$fileToTest"