Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So my questions are:

What would cause lp or lpr to return Unauthorized?

What can I do to fix this problem?

I'm running Ubuntu 10.04 LTS with latest updates. This worked and then stopped after an update. The problem is I don't remember when it stopped. My user is part of lpadmin, which allows me to create and configure printers through the CUPS interface.

Here are my system's protections for lp and lpr.

root@steamboy:/usr/bin# ls -l lp
-rwxr-xr-x 1 root root 13540 2011-09-12 10:41 lp

root@steamboy:/usr/bin# ls -l lpr
-rwxr-xr-x 1 root root 13540 2011-09-12 10:41 lpr

Only if I sudo can I print something at the command line using lp or lpr.

ics@steamboy:~/icsdev$ lp x.tmp
lp: Unauthorized
ics@steamboy:~/icsdev$ lpr x.tmp
lpr: Unauthorized

(x.tmp is a real file.)

share|improve this question
    
Maybe the user are blocked from using the printer. –  Mitch Jun 7 '12 at 20:55
    
I've edited the original post. This happened after an update. I know of no printer blocked list. –  octopusgrabbus Jun 7 '12 at 21:02
add comment

2 Answers 2

up vote 1 down vote accepted

One thing that might be worth trying is:

sudo apt-get purge cups

That will not only uninstall cups but also delete its configuration files in case one of them is wrong.

Then:

sudo apt-get install cups

Since the configuration files are now fresh you will have to reinstall your printers. If you use any other computer as a print server you may have to do this there as well.

This opensuse link describes what another user had to do to one of his cups configuration files to solve this error message.

share|improve this answer
    
I see you have been struggling with this for quite a while. –  John S Gruber Jun 8 '12 at 19:42
    
I'll also give this a shot Monday. Thanks again, again. –  octopusgrabbus Jun 8 '12 at 20:10
    
Your fix did it. Thanks. –  octopusgrabbus Jun 27 '12 at 16:14
    
Excellent. Glad to hear it. –  John S Gruber Jun 27 '12 at 17:31
    
I've spread the info far and wide, referencing this post. –  octopusgrabbus Jun 27 '12 at 17:32
add comment

Uninstalling and installing cups does NOT cure it. What if you had 50 printers?

In /etc/cups/printers.conf look for AuthInfoRequired it is probably set to negotiate.

There are numerous ways to change this but I do this

/etc/init.d/cups stop
vim /etc/cups/printers.conf 

Remove the line with negotiate in it

/etc/init.d/cups start
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.