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 Location 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 Location 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.