It should be smb://domain;username:password@servername/foldername
domain
username
password
servername
foldername
This is the proper syntax if everything works. So, if I want to connect to my fantasy share, it will be :
smb://acmedefenses.com;caliban:12345678@battleplansserver/worlddomination
Not that this share exists, of course. :)
EDIT : updated answer with a short primer on how to use smbclient to test connectivity
To use smbclient to test connectivity, you can issue this command
smbclient //servername/foldername -U domain/username
smbclient //battleplansserver/worlddomination -U acmedefenses.com/caliban
To mount a SAMBA share in fstab, try this
//*servername*/*foldername* /mnt/samba smbfs username=*domain*/*username*,password=*password* 0 0
//battleplansserver/worlddomination /mnt/worlddom smbfs username=*acmedefenses.com/caliban,password=12345678 0 0
I am able to do this. For comparison, here is an entry of one of my shares:
[Music] ; user="jlacroix"
force user = jlacroix
path = /home/jlacroix/Music
writable = no
public = yes
Be sure to replace "jlacroix" with the username you use. It should force it to use that user despite what user is actually using the file. So you may need to change "jlacroix" to root. However, I don't advise sharing in this way because you should be careful about what can access root permissive files.
Best Answer
Found a way to do this without mounting the drive.
smbclient -U USER //IP/Share -c 'allinfo "ADS_FILE"'
followed byget "ADS_FILE:PASSWORD:$DATA"
downloads the file.