Why does lp return Unauthorized Error?
I am running Ubuntu 10.04. My username is in adm and lpadmin.
All of a sudden, I can't print from the command line using lp.
lp: Unauthorized is returned.
What puzzles me is gedit can print.
What does this message mean, and how can I correct it?
Find out where the lp command is with:
Then check the permissions on the lp command to make sure that you have execute permissions for lp.
Seem like correct permissions
-rwxr-xr-x 1 root root 13540 2011-09-12 10:41 /usr/bin/lp
The next thing that I would check is your lpoptions. Maybe these users are blocked from using the printer. As root issue these commands:
lpoptions -U adm
lpoptions -U lpadmin
-U doesn't work
Thanks for following up on this.
cnorton@steamboy:~$ sudo -i
root@steamboy:~# lpoptions -U adm
Usage: lpoptions [-h server] [-E] -d printer
lpoptions [-h server] [-E] [-p printer] -l
lpoptions [-h server] [-E] -p printer -o option[=value] ...
lpoptions [-h server] [-E] -x printer
However, when I run lpotions for me and one of the printers, I get this.
lpoptions -d LaserJet4200-TurboPrint
auth-info-required=none copies=1 device-uri=socket://10.100.0.80:9100 finishings=3 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1331657097 marker-colors=#000000,none marker-levels=48,97 marker-names='Black\ Cartridge\ HP\ CC364A,Maintenance\ Kit\ HP\ 110V-CB388A,\ 220V-CB389A' marker-types=tonerCartridge,fuser media=iso_a4_210x297mm number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info=HP_LaserJet4200 printer-is-accepting-jobs=true printer-is-shared=false printer-location='IT Office' printer-make-and-model='HP_LaserJet4200 TurboPrint' printer-state=3 printer-state-change-time=1331657097 printer-state-reasons=none printer-type=10621012 printer-uri-supported=ipp://localhost:631/printers/LaserJet4200-TurboPrint sides=one-sided
Here is the answer to this problem. I've copied the text from that link here.
I have tested this, and it works.
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.
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.
|All times are GMT -5. The time now is 07:38 PM.|