Operating System - HP-UX
1755143 Members
2974 Online
108830 Solutions
New Discussion юеВ

Remove 'restrict cancel' feature from a print queue?

 
Vince Pooley
Advisor

Remove 'restrict cancel' feature from a print queue?

Have a HP-UX 11.23 box with around 300 Jetdirect printers setup.
I've just noticed that one of those queues has been setup with the restricted cancel option on (equivalent of 'lpadmin -orc') which means that only the owner of the print job can cancel the job.

Therefore I have a couple of questions that man pages and Google haven't answered...


1. Is it possible to remove this option from a queue without recreating the queue?

2. Also I want to find out how many of our printers have been setup this way, how can I see whether a printer has this option set?

Chz
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Remove 'restrict cancel' feature from a print queue?

Hmm, nothing is obvious from the man pages. How did you notice the -orc, you couldn't cancel it?
I couldn't see the info from lpstat -t.

If you are on 11.31 (or possibly later?), you can do:
lpadmin -pprinter -orc n
But you have to stop the spooler. (This doesn't seem to be true on 11.31?)

Perhaps there you just use: lpadmin -pprinter
Vince Pooley
Advisor

Re: Remove 'restrict cancel' feature from a print queue?

I noticed the restriction after I had written a script for our helpdesk staff so they can view and cancel print jobs.

The script uses 'cancel' to cancel a job, yesterday I was made aware that they couldn't cancel jobs on one specific queue.
When I tried with the cancel command I got the following error...

request "printername-1234" not cancelled: not owner

... so I had to cancel it as root.

However I may have found a workaround but as yet I'm unsure of it's success as it just one print queue.
Otherwise I haven't found any definitive way of finding out if cancel restrictions has been set on a queue.


Anyway this workaround I think I've found is to do with a variable I found in /hpnpl/admin/exportvars.ksh. If run it exports some printer related variables, one being the CANCELOPT variable which the script declared as...

CANCELOPT="-orc"

... however I don't think this script ever gets run.

I've done a little test this morning and added...

CANCELOPT=""

... to my script disabled the print queue, queued up a bunch of jobs on it and the helpdesk staff was able to cancel my print jobs.
Any clarifications of the validity of this variable would be appreciated.

Cheers
Dennis Handly
Acclaimed Contributor

Re: Remove 'restrict cancel' feature from a print queue?

>CANCELOPT="" Any clarifications of the validity of this variable would be appreciated.

It this is being passed to lpadmin to recreate the printer, this may undo the -orc as I suggested.
kamaleswaran
Occasional Advisor

Re: Remove 'restrict cancel' feature from a print queue?

If you are root you can cancel the Q using this short way

go to

#cd /var/spool/lp/request/

Here you will find the printer name for example lpexample

#cd lpexample

Here you will get some file like .sendingstatus and .remotestatus as well some file for printer q. If you remove that files your printer q will go.

for safe you can take backup of that directory.
Vince Pooley
Advisor

Re: Remove 'restrict cancel' feature from a print queue?

Thanks kamaleswaran but I know how to cancel a print job, that's not what my query is about.