This is the command I use to connect to a Samba share that prompts you for a password:
smbclient -U mycompany/myusername //myshare -D my/directory
If you do not want to be prompted for the password, it turns out that you can use the -U flag like this:
smbclient -U 'mycompany/myusername%mypassword' //myshare -D my/directory
Of course, remember that this will mean that your password will be shown in your shell history.