Is $LD_LIBRARY_PATH set? The shared library loader is actually looking for libsmbclient.so.0, so you either don't have it, or the loader needs help finding it. For example, if libsmbclient.so.0 is in /usr/local/lib, try setting $LD_LIBRARY_PATH in your environment before running your script, e.g.:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH