Smbclient operates like a command-line ftp client which allows sending commands to the samba server. The following syntax worked for me:
/usr/bin/smbclient ‘//anotherserver/myshare’ -D ‘mydirectory/’ -c ‘mkdir “testlog5″‘ -U ‘myusername%mypass’
I got a bit confused when some directories where list with DA rather than D but these extra file attributes appear to be:
A – archiving bit
R – read only
S – system
H – hidden