Operating System - Tru64 Unix
1748165 Members
3754 Online
108758 Solutions
New Discussion юеВ

Re: 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 12
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.