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

Asked by cmnorton

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:
Last query:
Last reply:
Revision history for this message
Miha Gašperšič (miha.gaspersic) said :
#1

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

Revision history for this message
cmnorton (octopusgrabbus) said :
#2

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