Thursday, January 22, 2015

Mac OSX "Hold for authentication" when trying to print

Today I tried to get printing to work from my mac (running Yosemite) to the printers here at work.  The printers are accessed using SMB.

I could easily add the printers, but when I tried to print, it would accept my username and password for the printer, but then revert straight back to saying "Hold for authentication".

Deleting the printers and recreating them didn't fix it.
Nor did deleting the associated entries from the OSX keyring help.

Thus the usually recommended steps failed to fix the problem.

It took a couple of hours of research and experimentation to discover that this page had most of the information needed to solve the problem.

The problem in my case was caused by the print system on the mac from failing to properly negotiate authentication in some way. But here is how I fixed it:

Step 1: Try to print something to this printer.  Then open the print queue for the printer, and click on the refresh (curly-arrow) icon to the right of the job name.  It should prompt you for your username and password for the print server, and then revert to "Hold for authentication".

This is really important. If you don't try to send a print job and have it stuck in "Hold for authentication" first, strange things can still happen after following the procedure below.  For me, I found that the print job would try to print, but the print queue would then immediately become paused, with the print job marked "Ready to print".  Very frustrating.

Step 2: Open a terminal window.  Everything we do from here will be done from in the terminal window.

Step 3: Find out the name of the printer on the command line by typing the following and pressing return:

lpstat -s

Step 4: Find the printer in question in the output. You will see that the names of the print queues have any fancy characters replaced with an underscore.  So your print queue name might have lots of underscores in it.  For example, my printer called "Tonsley : mono" appears in the output of lpstat -s below as "Tonsley___mono" (highlighted below):

$ lpstat -s
system default destination: Tonsley___colour__A3_in_tray_2_
device for GenericScanner: usb://00000000-0000-0000-FA13-000000000000
device for LaserJet_6MP__Jet_Direct_: socket://192.168.1.200/
device for Lexmark_6200_Series: usb://Lexmark/6200%20Series?serial=21B1280030008E5
device for Loopback: socket://127.0.0.1/
device for Samsung_CLP_310_Series: usb://Samsung/CLP-310%20Series?serial=149RBAFZ400869Z
device for Samsung_CLP_315_Series___alfred: dnssd://Samsung%20CLP-315%20Series%20%40%20alfred._ipp._tcp.local.
device for Samsung_ML_1640_Series: usb://Samsung/ML-1640%20Series?serial=3511BAFS501610N.
device for Tonsley___colour__A3_in_tray_2_: smb://tonsprint.isd.ad.flinders.edu.au/mdf-colour

device for Tonsley___mono: smb://tonsprint.isd.ad.flinders.edu.au/mfd-bw
$

Step 5: Force the mac to use username,password authentication for this printer by typing the following command (but don't forget to change the printer name from Tonsley___mono to the name of your print queue that you obtained in the previous step).  

sudo lpadmin -p Tonlsey___mono -o auth-info-required=username,password

When you hit return after typing this command you will be asked for your mac password.  Type it in.

Step 6: Attempt to print using the printer.  It should now work.  If it doesn't try deleting the printer and following the sequence again.  If the print queue keeps pausing itself and saying the print job is "ready to print", read the important note on step 1.

If this information helps you, please consider donating to http://servalproject.org.

23 comments:

  1. After all else failed, this worked for me. Thanks!!

    ReplyDelete
  2. Username: CHB (exactly as it is)
    Computer Name: CHB-PC (exactly as it is)
    Printer Name: Canon LBP3500 (exactly as it is)

    Tried the following variations in preferences as well as CUPS 2.1.0, but nothing works:

    smb://chb:************@chb-pc/Canon%20LBP3500

    smb://workgroup;chb:************@chb-pc/Canon%20LBP3500

    smb://chb-pc/Canon%20LBP3500

    smb://chb/chb-pc/Canon%20LBP3500

    During hold for authentication, tried guest/guest and the actual username/password returned with the following error messages: 'Connection refused', upon selecting print Test Page, 'Connecting to Printer' and then 'Ready to Print', etc.

    Have the up-to-date CAPT drivers installed from the Canon website. Even upgraded my OS X to El Capitan but still no luck.

    ReplyDelete
  3. This was very helpful, thank you very much!

    ReplyDelete
  4. I have a space and a coma in my password and I think it's making this command fail. How can I escape them ?

    ReplyDelete
    Replies
    1. Easiest solution I can think of is to change your password to not have the space. The comma shouldn't hurt anything.

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Thank you! When all else failed, this works for me! And best solution I think.

    ReplyDelete

  7. Hi - unfortunately not working. How do I go back and remove that it askes for password?

    ReplyDelete
  8. Tried all this and variants - still not luck. Still Hold for Authentication. so irritating

    ReplyDelete
  9. same for me. it does not work. i think it's related with the smb not working in elcapitan anymore or because of a combination of elcapitan+win10... sucking....

    ReplyDelete
  10. anyway also on my other old macbook with snowleopard it is not working

    ReplyDelete
  11. This absolutely fixed my problem, thanks!

    ReplyDelete
  12. After having tried almost everything, this solved my problem! THANK YOU!

    ReplyDelete
  13. I receive:

    lpadmin: Unknown argument "auth-info-required=username,password".
    250SSDNPRs-Mac-mini:~ 250ssdnpr$

    ReplyDelete
    Replies
    1. Hello,

      Did you have the -o in front of it? Please copy paste the whole command and output all in one go, so that I can take a better look.

      Paul.

      Delete
    2. i get the same error----> lpadmin: Unknown argument "auth-info-required=username,password".
      here is all of the command and output:
      Last login: Thu Nov 24 10:32:26 on console
      Georges-MBP:~ evans$ lpstat -s
      system default destination: Evans_Home_Printer
      device for Evans_Home_Printer: smb://daddy/Evans%20Home%20Printer
      Georges-MBP:~ evans$ sudo lpadmin -p Evans_Home_Printer -o auth-info-required=username,password
      Password:
      lpadmin: Unknown argument “auth-info-required=username,password”.
      Georges-MBP:~ evans$

      Delete
  14. Hi Paul,

    I tried all above step, I found key icon (locked), so i couldn't entering my password.

    ReplyDelete
  15. Thanks for the post which I attempted but still did not resolve the issue.
    After some time, I eventually found that the problem is related to the protocol that the printer uses. So when adding the printer make sure you select Line Printer Daemon (LPD)

    ReplyDelete