1832275 Members
2213 Online
110041 Solutions
New Discussion

Re: LP cancel command

 
SOLVED
Go to solution
Larry Basford
Regular Advisor

LP cancel command

We used the setuid on cancel command to allow users to cancel any print job on HPUX 10.20
After upgrading to 11.0 this no longer works.
I restored back to 10.20 cancel command to get the results I needed. Is there a better way?
-r-sr-xr-x 1 root bin 842 Sep 5 09:31 cancel
-r-sr-x--x 1 root sys 40960 Aug 30 14:40 cancel.10.20
-r-sr-x--x 1 root sys 40960 Aug 30 11:08 cancel.11.0


I also replaced the /bin/cancel with a shell script to do the cancel with a disable and enable of the printer around it to cancel a job which is already printing.

This is all due to a UNIVERSE program which issues a cancel printername-jobnumber.

Desaster recovery? Right !
13 REPLIES 13
Rick Garland
Honored Contributor

Re: LP cancel command

I would look into the use of sudo to allow users to cancel print jobs as opposed to changing the perms. Using sudo will allow you to log all of the activity, including those relating to cancel lp.

sudo can be obtained from the porting center or from www.courtesan.com
Rick Garland
Honored Contributor

Re: LP cancel command

Use sudo to allow the users to cancel print jobs. It will run the command as root so no need to change the perms. Loggin is very good and will allow you to see who did what and when.

Get from the porting center or from www.courtesan.com
Rick Garland
Honored Contributor

Re: LP cancel command

Use sudo to allow the users to cancel print jobs. It will run the command as root so no need to change the perms. Loggin is very good and will allow you to see who did what and when.

Get from the porting center or from www.courtesan.com
Rick Garland
Honored Contributor

Re: LP cancel command

I tell you, these forums do have their problems. I was only wanting to submit once.
Larry Basford
Regular Advisor

Re: LP cancel command

I'm not sure sudo is the answer and seems a little combersom to run just one command.
But thanks for the response.
sudo may be something to consider in the future.
Desaster recovery? Right !
Alan Riggs
Honored Contributor
Solution

Re: LP cancel command

Actually, unless the printers were created with the -orc flag users should be able to cancel printjobs from anyone without requiring anything special. The exception is for remote print requests, which can only be canceled by the originator.

Since you need this functionality, why not simply recreate the queues without the -orc (assuming it has been set)?
Anthony deRito
Respected Contributor

Re: LP cancel command

Alan, I was wondering the same thing. I am guessing that Larry wants the users to be able to cancel ANY print jobs not just their own. Is this true Larry? If so, this would be done with the cancel -e command and it does require root to do it if the printers were set up the default way.

Also, the cancel -a will work since it cancels only the requests for that user and does not require root privledges.


Tony
Larry Basford
Regular Advisor

Re: LP cancel command

Thanks so much. It's been driving us crazy.
Does SAM use this -orc option by default.
I don't see where in SAM it can be turned off. I found the -ocr in a script written to create printers.
lpadmin -p$1 -v/dev/null -orc -mcrlf
Desaster recovery? Right !
Larry Basford
Regular Advisor

Re: LP cancel command

cancel -e will not work for a regular user.
That's OK
But why do I get this.
Desaster recovery? Right !
Rick Garland
Honored Contributor

Re: LP cancel command

To cancel all jobs in a queue, use the cancel -e in your command.
Rick Garland
Honored Contributor

Re: LP cancel command

To cancel all jobs in a queue, use the cancel -e in your command.
Rick Garland
Honored Contributor

Re: LP cancel command

Use cancel -e to cancel all of the print jobs in a queue
Rick Garland
Honored Contributor

Re: LP cancel command

Use cancel -e to cancel all of the print jobs in a queue