Print file from terminal via smb
What you are really looking for is a smbclient
alternative using smbutil
but just like you, I couldn't make it work.
So what you can do is to install samba with homebrew like this:
brew install samba
If brew link
complains with:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/auth
/usr/local/lib is not writable.
you can link smbclient manually:
cd /usr/local/bin
sudo ln -sfv ../Cellar/samba/3.6.25/bin/smbclient smbclient
sudo chown -R your_user /usr/local/bin/smbclient
Now you should be able to print like this:
smbclient "\\\\your.server.com\\YourSharedPrinter" -U "Domain\User" -c "print YouFileToPrint"