Ubuntu Intrepid "Too many failed attempts" printing error

There is a known bug in GTK used by Ubuntu Intrepid's 8.10 desktop environment Gnome that causes trouble when printing from a GTK application, such as evince or gedit. The applications do not print and an error occurs: Too many failed attempts. OpenOffice against it, and even the test page tool in cups administration won't show that behavior.

Check your error log:

tail -f /var/log/cups/error_log

E [26/Jan/2009:10:45:13 +0100] Print-Job: Unauthorized

The message "Print-Job: Unauthorized" indicates the problem. Here is how to fix it:

1. Stop the cups daemon to prevent cups from reseting your modifications

sudo /etc/init.d/cups stop

2. Edit your cups configuration with the editor of your choice and comment out these lines

sudo vi /etc/cups/printers.conf

#AuthInfoRequired username,password

EDIT:

To prevent cups to place thoose lines again in your config file you may want to make it immutable with

sudo chattr +i /etc/cups/printers.conf

3. Start cups again

sudo /etc/init.d/cups start

4. Try to print with gedit - it should work now.

Did it work for you? Drop a comment...

Comments

Unknown said…
I tried this fix, but the printers.conf file reset itself and over-wrote my changes.

I cannot print again??

Thanks,
Jason
Anonymous said…
Thanks, worked perfectly.
Admin's Day said…
@Jsunn

Did you stopped the cups service before changing the settings?! That does the trick - at least for me.
Unknown said…
This worked for me only once. Any time after that and printers.conf reset itself as Jsunn mentions
Admin's Day said…
@astjohn:

Hmm - strange. I'd the effect only when i did not stop the cups service while changing the "printers.conf".

You may want to set the file attribute "immutable" with the "chattr" command to leave changes as they are?
Unknown said…
This workaround will work for just one time only when printing on Samba printer. File is always reset after printing. See here:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/283811
Anonymous said…
Thanx a lot
Rangoli said…
Nope, 'chattr' doesn't work either - the file remains unchanged, but I get the error "Too many failed attempts" attempting to print. I have to bounce CUPS every time. Tedious.
Darren Hoyland said…
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
Anonymous said…
This helped me. Thanks. Several documents now but no shutdown and restart. I had been printing to networked printr on an XP machine from my Ubuntu box for months without a problem until yesterday.

Thanks again,

John C
FNog said…
Worked for me also. Many thanks
Unknown said…
This works for me(print in intrepid using samba and printer is connected to a Win 2003 box). Thanks a lot!
Anonymous said…
This solution worked perfectly for me, however, my /var/log/cups/error_log was empty.
Oudeis said…
It has worked fine to me! Thanks a lot. I have printed in a samba-device. The modifications I have made, according to your indications, have not been reseted by the system. Perhaps in my Ubuntu there's no more this bug?

Thank you very much!
Anonymous said…
Excelent! It worked for me too. Thanks a lot!
Anonymous said…
Worked for me too, thanks a lot!

(The strange thing is I had no problem printing until today; still don't know why it stopped working)
Thanks, worked a treat!
Anonymous said…
Don't usually leave comments on blogs, but this problem was annoying and your solution worked beautifully (wonders what two seconds of googling can do). Thanks alot!
Bob said…
Worked for me with 9.10 printing to HP printer on XP network.

Thank you.
Vlad said…
Thank you!

This fix really did the trick on my Fedora 10. Does anyone know why this happened in the first place? I was able to print just fine until today when I got the error. Is it possible that a Fedora update could break this? Or maybe I am getting this wrong and this is a feature not a bug...

Anyway, thankx!
Wladston Viana said…
thanks a LOT, made it work for me.

really man ... THANKS! if you had ads on your site i'd click them :D
basher501 said…
Your fix did the trick for me. I'm running Ubuntu 9.04 and I'm using Samba to print on a printer connected to a Windows XP box. It was weird, I could print a test page but I could not print using gedit or firefox.
SirWombat said…
Genius !!!! Thanks so very much. Took me a while googling to find this page. Greets,...
Anonymous said…
Perfect! Worked for me! (Ubuntu 9.04 with Windows-shared printer in my network)
Anonymous said…
thankyouthankyouthankyou....
곰삼촌 said…
thanks alot. it works for me.
Anonymous said…
Worked great for me. Thanks!
Anonymous said…
It works! It works!
Thank you for your help
gregorej said…
Worked like a charm. Thanks!
Stephen Elson said…
Worked like a charm, thanks for the tip.
Luc Dens said…
Thanks, After a long search I finally got an effective fix for this bug that plagued me since I moved up to the newest version of Ubuntu..;
Anonymous said…
Just wanted to let you know that this tip is still helping people. Thanks!
Unknown said…
Worked great for me on Jaunty! Thanks!
Anonymous said…
My .conf file doesn't even have that line... this is annoying!
Anonymous said…
Thank you very much! -- dmbasso
Anonymous said…
Lifesaver - Thanks for sharing!!!
Anonymous said…
How do you add a username and password?
Keermalec said…
Does not work for me on Jaunty. Actually it works but only once. As soon as I try to print a second document from for example gedit, I note that printers.conf has been reset to its original values. How to disable this automatic resetting of printers.conf at each print?
Christophe LG said…
I'm using a samsung-CLX-3170 printer and now it works for me!
Thank you so much!
hagen said…
It helps for one single print job. Only restart of cups helps, but also only for one single print job. no updates for cups available
Ludo said…
In the file "printers.conf" there is no line with "#AuthInfoRequired username,password".
Unknown said…
Thanks! Works with Ubuntu 9.04. In samba if you configure the printer with the guest user (put "guest@" and the path of printer - smb://guest@ipmachine/printername) this print error don't appear.
Unknown said…
Doubt: can i change #AuthInfoRequired username,password by AuthInfoRequired none ?
Anonymous said…
Does not work for me on Jaunty. But at least now I know it's a bug. :)
Anonymous said…
Thank you for the good advice. This solved my problem. It took me quite a while to realise that the file to be changed was on the client machine not on the samba server machine. Both machines run cupsd in my setup.

Tuomas
Brad Fallon said…
What's the difference between printing to standard output and printing to standard error?

Popular Posts