3

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)

  • print is a windows command - look at lpr for Unix printing. Also what app are you printing with - was there anything ion the console. What promter were you printing to – Mark Oct 13 '14 at 18:13
  • @Mark thank you for reply. I need to print to smb share, and I don't know what is the "promter". I set up the printer in CUPS, and now there it says: pending since <date> "Unable to connect to server". And I have no idea if the problem is in reaching server or authenticating or whatever else. That's why I wanted to try to use command line which usually in verbose mode can give you a log of 2 A4 pages, where you can find something useful. (I was just printing from Preview with standard OS X stuff) – Uko Oct 13 '14 at 18:33
  • I found this for you to try: print [-connection_options] //user@server/share file – Ruskes Oct 13 '14 at 18:35
  • @Buscar웃, yes, but this is part of smbutil, right? That's what I was using and it says that the command is unknown – Uko Oct 13 '14 at 18:35
  • I assume you have the network share option installed/activated ? – Ruskes Oct 13 '14 at 18:39
1

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"
  • Doesn't work at the time of this comment. The samba package has been removed from brew's core formulae. I tried installing it using brew install homebrew/boneyard/samba but that failed too, with the following error: Error: samba was moved to homebrew-boneyard because it has unfixable issues. Please do not file any issues about this. Sorry!. – Ohad Schneider Jan 25 '17 at 16:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .