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.

This post is related to Why do lp and lpr return unauthorized error? However, I am asking this question to find a workaround to my problem.

I can use lp and lpr using sudo. I'd like to know how I can change permissions, so applications can run lp and lpr as if they were root. For that matter, I'd like to be able to do the same thing.

I've entered a bug on launchpad to cover this, but have not heard back.

Thanks.

share|improve this question
    
I assume this relates to launchpad bug 955103, as well. There the error log lists pairs of: E [14/Mar/2012:07:38:14 -0400] [cups-polld 10.100.0.100:631] Unable to connect to 10.100.0.100 on port 631: Connection refused E [14/Mar/2012:07:38:14 -0400] [cups-polld 10.100.0.71:631] Unable to connect to 10.100.0.71 on port 631: Connection refused Are these both addresses of the computer you are doing the lp and lpr commands from, printer servers, or something else? Can you connect to to 10.100.0.100:631 and 10.100.0.71:631 from your browser? –  John S Gruber Jun 8 '12 at 1:40
    
That may be part of search in CUPS. I can print as root, but not as myself. I'd like to be able to do that. –  octopusgrabbus Jun 8 '12 at 12:04

1 Answer 1

up vote 1 down vote accepted

Without knowing what is causing your problem it's hard to devise a good workaround.

I should add that I'm not sure applications normally execute the lp or lpr commands in order to print. I assume they use a library interface. An example would be this.

While it's not recommended for security reasons, you can set permissions so that when you run lpr or lp command, they run with the same permission as the user-id they belong to or the group they belong to (root):

sudo chmod u+s /usr/bin/lp /usr/bin/lpr

Whether or not it helps applications print it should help you use these commands without using sudo each time, assuming you decide to bear the risk. Wikipedia mentions those risks, and a reference, here.

share|improve this answer
    
However Acrobat Reader (Linux) and some other appications print, they are not able to print. But gnome-edit and Evolution can. Again, this happened after an update. I will try your suggestion Monday and report back. Thanks again. –  octopusgrabbus Jun 8 '12 at 20:09

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.