How to make lp and lpr run as if I were root
I'm running Ubuntu 10.04. If I or applications that use lp or lpr try to print, an Unauthorized error is received. I've posted the error on launchpad.
I'd like to know how to get lp and lpr to run as if I or the applications I'm running were root. lp and lpr run fine, if I preface them with sudo. I've tried setuid with no luck. What else can I try? Thanks. |
As root, or use sudo to chmod lp and lpr. The command would look like this.
chmod 777 /usr/bin/lp and do the same for lpr. You have to verify the path to the files, or change directory to the files. |
Need lp and lpr to act as if root ran them
Your suggestion works, but applications can't do that running as me. I need these two commands to act as if root ran them. I've tried setuid and it does not work or I was (probably the reason) not setting
the uid bit correctly. |
Quote:
|
I can print as root, not as me
I can print as root. I want to set the permissions in such a way, that my using lp or lpr is as if I were logged in as root.
|
What groups does your use ID blong to? Open a konsole and run the command 'id youruser' ( without the quotes ) and post the results. You probably need to add yourself to the lp group, or what ever group ubuntu uses for printing.
|
Will try lp group
am already part of lpadmin, though.
|
Quote:
To make an application run as root for any user. For example type Code:
sudo chmod 4777 path-to-file -rwsrwxrwx Also, check if lp and lpr are not symlinks to the actual program(s) |
do NOT I repeat do NOT chmow chown or in any other way change the file properties
Your user should be in lpadmin, lp, and scanner groups Quote:
Printers - Community Ubuntu Documentation - https://help.ubuntu.com/community/Printers NetworkPrintingWithUbuntu - Community Ubuntu Documentation - https://help.ubuntu.com/community/Ne...tingWithUbuntu |
Even with group privs, does not work
Thanks for answering. My Ubuntu system does not have a scanner group, but cnorton is in lp and lpadmin.
I still can't print a file at the command line. Quote:
|
Tried setting UID
Thanks for answering. lp and lpr are not symlinks. I tried setting the UID per your instructions, and I get the same error.
Quote:
|
With the printer plugged in to USB port, and turned on, please run this command, copy and paste the results here.
'ls -l /dev/usb/lp* /dev/bus/usb/*/*' run the command without the quotes, just what is between them. |
No local printers
Thanks for responding. I've got network printers. One's an SMB. I'll gladly grab whatever you need an post it.
Quote:
|
All times are GMT -5. The time now is 06:48 PM. |