Can’t print in evince, GEdit, Claws-Mail.

I’ve got a printer connected on my Windows machine and it’s shared so I can print from my Ubuntu Intrepid machine as well using Samba. It works pretty well. I usually only print from OpenOffice 3 but today I had to print an email (Claws mail) and it failed. I got the Printer selection box but when I clicked on print an error message popped up, “Can’t prompt for Authorization”. I checked my printer settings and everything looked fine, so I tried again, another error message popped up: “Too many failed attempts”.
After sending an email to the Claws Mail list, Colin Leroy pointed out it could be a bug in GTK as I also couldn’t print from Gedit. I did some searching on the Internet and found several reports similar to mine but no solution.
I started to do some researching on my laptop and I found a work around to solve the problem.

I started by checking my logs and in the /var/log/cups/error_log I saw this message “Print-Job: Unauthorized”.

Checking the cups configuration file printers.conf, which holds the definition of your printers.
These are the first few line of my printer definition of the printer I had a problem with.

AuthInfoRequired username,password
Info Canon_PIXMA_iP8500
DeviceURI smb://Guest@Home/Desktop/CanonPIX

It looks like cups requires authentication as username and password. Unfortunately you can’t enter a password because of a bug somewhere which throws the error message “Can’t prompt for Authorization”.
Now the DeviceURI line already has a username build in to it, Guest. My Guest doesn’t require a password, in other words cups doesn’t have to ask me for a username and password.

Here’s my working configuration:

#AuthInfoRequired username,password
Info Canon_PIXMA_iP8500
DeviceURI smb://Guest@Home/Desktop/CanonPIX

Thanks to polarizer for this extra info. Before you edit your printers.conf make sure to stop the cups daemon:

sudo /etc/init.d/cups stop

Make your changes

sudo vi /etc/cups/printers.conf

and start the cups daemon again

sudo /etc/init.d/cups start

This works fine for me.
I haven’t tried this but I’m pretty sure if you don’t have a user on your URI line you can just add it and comment out the AuthInfoReuired line. And if your user needs a password, you could add this as well like this: smb://Bob:NotSoSecret@…
I understand it could be a security issue in a business environment but it’s perfectly fine here at home.

This article is filed under the category Desktop and has the following tags associated with it: , , , , , , , , , , .
  • Thanks! This seems to have worked at my office. You are the healer of many headaches.

  • Peter

    @ Blaise
    You’re welcome.
    Hmmm, maybe I should change the name of the blog to Aleve or Tylenol 😉

  • Thomas

    The Problem for me is that the /etc/printers.conf is recreated everytime my printer (or server?) restarts and the “#” is gone 🙁

  • Try the following:
    Modify your printer settings through the CUPS webinterface http://localhost:631/
    Select Printers
    Select Modify Printer
    Keep clicking Continue ’till the last screen where you can only select Modify Printer

    Now edit the /etc/cups/printers.conf file
    Add the user on the SMB line of your printer

    Let us know if that works for you.

  • Thomas

    I don’t know if I get it right.

    I changed “DeviceURI smb://WORKGROUP/DiskStation/usbprinter” to DeviceURI smb://thomas@WORKGROUP/DiskStation/usbprinter

    This didn’t solve the problem. I also went through the “Modify Printer” but there I only could change the path and driver.

  • @Thomas
    What if you delete the line:
    AuthInfoRequired username,password

    all together?

  • Thomas

    Thanks for the swift reply. The file is recreated all the time.

    The DeviceURI was changed back, too.

    Printing in OpenOffice works, acroread too.

    It is not working in evince or firefox.

  • @Thomas:

    Contact me through the contact page using your email address. It will be easier to communicate through email.

  • Jason R.

    Can someone please post a reply as I am still having this problem. Thank you!


    • @Jason

      What problem would that be?

  • Jason R.


    The printing issues. I edit the printer.conf file by adding the comment symbol in front of the Authorization line. It changes back to what it was before. I have also copied the printer as indicated by another workaround, and it works for a few time and then I get the same error….
    “Can’t prompt for authorization”

    Thanks for your help.

    • @Jason R.

      What Distro are you using?
      Do you have a local printer attached to the desktop?

  • Gilberto Olimpio

    There is a bug reported for this issue:

    I have the same problem here.

  • Jason

    I am using Ubuntu 8.10. The printer is connected to my windows desktop running vista 32bit ultimate.


  • This is the bug that causes all this trouble ( it is in GTK )

    One have to stop the cups daemon before uncommenting this line in /etc/cups/printers.conf.
    If you modify the line while cups is running it will reset your modification.

    #AuthInfoRequired username,password

    Then start cups again /etc/init.d/cups start

    Hope that helps

    • Thanks for the tip polarizer.

  • jonbonjovi

    I can confirm that the Polarizer’s method does work!

  • Jason

    Thank you for the help with this.

    As I am very new to Ubuntu and Linux, how do I stop the “cups” process?

    Thanks for your help.

    • Open a terminal
      Type; sudo /etc/init.d/cups stop
      To start it again
      Type: sudo /etc/init.d/cups start

  • Jason


    I was able to edit the printers.conf file after stopping it. The file would overwrite itself after the first print job??

    It seems that this workaround does just not work for me.
    After the first print job the printers.conf file removes the “#” from infront of the Authorize line in the conf file.

    This is a little frustrating.


  • modeltweaker

    Had this problem with Ubuntu 8.10 – the Intrepid Ibex. Stopped cups, used Gedit to comment out the line, restarted cups and everything works. As a Linux rookie I have to count on the community for help. Thank you so much.

  • jonbonjovi

    @modeltweaker: how many times have you tried ti print? does the workaround work after the first print?

  • Jordan

    Thank you so much, I have had this problem for a while, but have not really taken the time to fix it.

    found your article, took me two minutes. Thanks so much.

  • Thanks for your post, would have taken me ages to find the solution without it 🙂

  • Autonomouse

    I had this problem where it kept overwriting the /etc/cups/printers.conf file. I got around it by simply adding a username and password, even though it didn’t need one (it had to be a real username and password of course).

    Dunno if this will work in every situation, but it may be an easy fix for someone else too, so I thought I’d mention it

  • GARoss

    I have a home network. All PCs are Ubuntu 9.04. The PC with the printer, prints fine. The PC using the printer via the network is where the problem is. I’ve had no success using…
    sudo /etc/init.d/cups stop
    sudo gedit /etc/cups/printers.conf
    Change line to #AuthInfoRequired username,password
    sudo /etc/init.d/cups start

    It rewrites itself back to AuthInfoRequired username,password
    I also tried this, sudo vi /etc/cupsd/printers.conf but I don’t have a cupsd folder so the terminal acts rather strange so I closed it.

    • I’m sorry GARoss, the cupsd was a typo but it shouldn’t make a difference if you use vi or gedit.

      Try changing the line to:
      AuthInfoRequired none

      Let us know if it worked please.

      • Basia

        Hi 🙂
        I had also similar problem: printers.conf was recreated each time after adding # or erasing of line:
        AuthInfoRequired username,password

        Finally, after using your last idea of
        AuthInfoRequired none

        It works for me, at least after first restart.
        Thanks for advise 🙂