Print file from terminal via smb So UI printing fails with no reason as always.

I hope that I can get more details by printing from command line.

Tried

smbutil print //user@host/share file


got:

smbutil: unknown command print


Do I have to install something?

(I have OS X 10.10)
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"