How to make lp and lpr run as root when called by non root

Asked by cmnorton on 2012-06-08

I'd like to know how to make lp and lpr run as if root ran them from a non-root process. I've tried the setuid bits, and that did not work. This is because as a non-root user, both return Unauthorized, but root can run them through sudo. That does not help my applications that won't print because they're not root.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cups Edit question
Assignee:
No assignee Edit question
Solved by:
cmnorton
Solved:
2012-09-13
Last query:
2012-09-13
Last reply:
2012-06-08

Hi there,

have you tried using command sudo su? I am aware, that you can't force your application to run as root unless you run it as sudo or su. This is because of security included in Ubuntu. If you make script, then you can simply include sudo command in each row you have and this should do your job. But remember if you want to make some job which requires root privileges, then you will need to authenticate as root if not you can't use this command.

If this helps you solved your question, please mark this thread as solved.

Regards,
Miha

cmnorton (octopusgrabbus) said : #2

I uninstalled and reinstalled CUPS. That fixed this weird problem.