cancel
Showing results for 
Search instead for 
Did you mean: 

lprm permission denied

Paul Sperry
Honored Contributor

lprm permission denied

I have a script for a user to use to remove print spools. It looks like this:

#!/usr/bin/bash
export PATH=$PATH:/usr/local/bin:/usr/bin
echo -n Please enter Printer :
read printer
lpstat -o$printer
echo -n Which Job number to cancel, CR for none :
read cancel
super lprm -P$printer $cancel

My /usr/local/etc/super.tab
has this entry.


lprm /usr/bin/lprm prntmgr:@earth

When I run the script as root it works but
when ran as the user prntmgr I get the
permission denied message.

We are running OSF1 V5.1 732 alpha
12 REPLIES
Ralf Puchner
Honored Contributor

Re: lprm permission denied

please check permission of lprm
it should be:

-rws--x--x root bin lprm

Help() { FirstReadManual(urgently); Go_to_it;; }
Paul Sperry
Honored Contributor

Re: lprm permission denied

thanks for the input the permissions look ok
bash-2.04# ls -al lprm
-rws--x--x 1 root bin 67328 Apr 12 2001 lprm
Ralf Puchner
Honored Contributor

Re: lprm permission denied

but in this case lprm have root permission so it seems the error message goes into wrong direction.

Please check if the lpc command works or also fails.
Help() { FirstReadManual(urgently); Go_to_it;; }
Paul Sperry
Honored Contributor

Re: lprm permission denied

I didn't see any way for lpc to remove print jobs. So I tried the cancel command but still get the permission denied error when ran as the user prntmgr. I did add cancel to my super tab file as well.

cancel /usr/bin/cancel prntmgr:@earth

bash-2.04$ super cancel 6 lj_1
cfA006earth: Permission denied
Ralf Puchner
Honored Contributor

Re: lprm permission denied

please check the lpr.log file for problems with permissions and check /usr/lbin/lpd permission (-rws--x--x root bin).

Hopefully you have created the printqueues with the lprsetup command, otherwise create a test queue and check again.

If lprm and lpc runs with full privileges (s-bit on executable) there can be no "permission" problems at all!

Help() { FirstReadManual(urgently); Go_to_it;; }
Roberto Polli
Trusted Contributor

Re: lprm permission denied

Paul,
did you succeed?

Pax, R.
Paul Sperry
Honored Contributor

Re: lprm permission denied

Yes,

In the super.tab file I had to set

uid=root

Then everything worked fine. Thanks for all of the input.
Ralf Puchner
Honored Contributor

Re: lprm permission denied

what the hack is super.tab? I've seen you used the command "super" in front of lprm.

But this is not an "official" program like dop - so maybe you ask for a solution not really a Tru64 problem.

PS: If you are an outsider of the real world, create your own!

Help() { FirstReadManual(urgently); Go_to_it;; }
Paul Sperry
Honored Contributor

Re: lprm permission denied

Ralf,

Your correct this probably wasn't a tru64 problem but since lprm is a tru64 command and not a hp-ux command I posted my question here. And yes the solution was the super.tab file. Thanks again for all of the input.

Ralf Puchner
Honored Contributor

Re: lprm permission denied

Paul,

not "lprm" was the problem, the tool "super" was it. Without knowing the tool "super" nobody can solve the problem - that's the difference!

"super" is not part of Tru64 and shareware and opensource tools are best supported by their authors or organisations...


Help() { FirstReadManual(urgently); Go_to_it;; }
Paul Sperry
Honored Contributor

Re: lprm permission denied

Ralf

I see your point but it has been my experience that I get more support at this forum than I do at shareware/opensource sites. There are several posts on this forum on shareware/opensource products as well as database "oracle" posts. None of these products are part of the OS but people post their questions here because of the vast knowledge of the forum members.

But I do agree with you, this was not a TRU64 problem. But I did solve the problem whith the help of all the great members here.
Ralf Puchner
Honored Contributor

Re: lprm permission denied

Paul,

Oracle is a product official certified and supported. There is a list of software which is opensource but adopted or modified by HP itself - so supported in parts (like setup, Apache customization etc. is unsupported).

This forum is for HP products only. In your case "DOP" is the equivalent to "super". The solution for your problem was OS independent because it was a problem of handling "super" not "lprm". For all non HP supported products please use the forums of the company or organisation which supports the product.
Help() { FirstReadManual(urgently); Go_to_it;; }