LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-13-2012, 07:37 AM   #1
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
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?

Thanks.
 
Old 03-13-2012, 12:26 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,509

Rep: Reputation: 176Reputation: 176
Find out where the lp command is with:

which lp

Then check the permissions on the lp command to make sure that you have execute permissions for lp.

--------------------
Steve Stites
 
Old 03-13-2012, 12:40 PM   #3
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35
Seem like correct permissions

-rwxr-xr-x 1 root root 13540 2011-09-12 10:41 /usr/bin/lp
 
Old 03-13-2012, 03:12 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,509

Rep: Reputation: 176Reputation: 176
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

-------------------
Steve Stites
 
Old 03-14-2012, 06:13 AM   #5
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35
-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
cnorton@steamboy:~$
 
Old 06-27-2012, 11:30 AM   #6
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Original Poster
Rep: Reputation: 35
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.

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.


 
  


Reply

Tags
10.04, lp, ubuntu, unauthorized


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 01:55 PM
snmptrap return error: No community name UltraSoul Linux - Software 0 10-07-2008 05:06 AM
"HELP!!" yum error [Errno 14] HTTP Error 401: Unauthorized chennavarri Fedora 2 05-14-2008 10:29 AM
openssl return error android6011 Linux - Software 4 05-05-2007 06:20 PM
parse error before ; and } and , and return gogettergary Programming 4 05-12-2005 05:20 AM


All times are GMT -5. The time now is 08:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration