1819794 Members
3082 Online
109607 Solutions
New Discussion юеВ

Cancel Print Jobs...

 
Rafael Mendon├зa Braga
Regular Advisor

Cancel Print Jobs...

Hello There...
We are facing problems using a "users's menu" on a HPUX 11i machine...
The users log on the System and through the "menu" they have access to do the thing... One thing the should do is to cancel print requests...
Well... We don't want to give these users high privileges. The problems is that can't cancel print requests if they are not the owner of the job...
This message is displayed:

"Job xxx not cancelled: Not Owner"

These users have a prymary group and as secondary group we put them on the "lp" group, so they should cancel the jobs don't you think?

Do you know what can I do?
Please help me!

Thanks a lot,

Rafael M. Braga
12 REPLIES 12
Steve Steel
Honored Contributor

Re: Cancel Print Jobs...

Hi

http://hpux.connect.org.uk/

get sudo

Then sudoers with this command can do it


This is the only way

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Robert-Jan Goossens
Honored Contributor

Re: Cancel Print Jobs...

Hi Rafael,

How about a restricted sam session for oyur user ?

start sam -r and add the tasks printers and plottersto your user.

Hope this helps,
Robert-Jan
Victor BERRIDGE
Honored Contributor

Re: Cancel Print Jobs...

Hi,
SInce your users are using a "users menu" driven system, install sudo and create an lpgroup with all your users in then write the script you want the users to use with root privilege using sudo
Add it to your menu script with syntax e.g
/usr/local/bin/sudo -u root -c "

All the best
Victor
Rafael Mendon├зa Braga
Regular Advisor

Re: Cancel Print Jobs...

Hello Guys... Thanks for the answers, but let me try to explain why we can't follow your advices...

Steve:
In our company, the sudo is not homologated to this machine where we are facing the problems...


Robert-Jan:
I gave this suggestion to the guys that take care of security administration on the server and they refused this...


Anyway, Thanks a lot!!!

More tips?!

Rafael M. Braga
Ermin Borovac
Honored Contributor

Re: Cancel Print Jobs...

If printer queues are created with lpadmin option '-orc' then users will be able to cancel their jobs only.

-orc Restricts users to canceling only their own requests. Default is to not restrict the cancel command.

If printer queue is remote printer queue then you can recreate the queue with lpadmin omitting -orc option.

If printer queue is network printer queue created with JetDirect, then you can modify /opt/hpnpl/admin/exportvars.ksh as follows

Change
CANCELOPT="-orc"
to
CANCELOPT=""

and recreate network printer queue.
Rafael Mendon├зa Braga
Regular Advisor

Re: Cancel Print Jobs...

Hello!!!

All the printer queues are remote...

Ermin, is there a way to know if they were created with the "-orc" option, or I will have to recreated them omitting this option to test if it will help me?

Thanks,

Rafael M. Braga
Victor BERRIDGE
Honored Contributor

Re: Cancel Print Jobs...

Rafael,
You should be able to tell us how /(and maybe why..) you created these printers in such way, that is NOT accepting HPUX defaults (all users can remove...).
If you didnt use exotic options then I would suspect the limitations coming from outer-HPUX
You say the are remote, are they novel queues?
(In that case the novell team has the answer...)

All the best
Victor
Ermin Borovac
Honored Contributor

Re: Cancel Print Jobs...

I think this information is stored in one of the binary files in /var/spool/lp and I'm not sure how to check.

You can simply create a test queue with

# lpshut
# lpadmin -p -v/dev/null -mrmodel -orm -orp -ocmrcmodel -osmrsmodel
# lpsched

and verify that without -orc option anyone can cancel print jobs.
Geoff Wild
Honored Contributor

Re: Cancel Print Jobs...

Actually - for hppi printers, the script to modify is:

/opt/hpnpl/admin/addptrtoq

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: Cancel Print Jobs...

You may want to revisit the sudo utility. In addition to providing a solution for this issue right here, there are lots of other issues it can be used for as well.

I am attaching a quick and dirty perl script that was provided for the helpdesk personnel. They do not have the extra system rights and they do not want/need. They can cancel any print job thru the use of sudo.

I have not received 1 request to cancel a print job since!

Rafael Mendon├зa Braga
Regular Advisor

Re: Cancel Print Jobs...

Guys...
I created a printer queue using the SAM utility...
I used it because I asked the guy who created the queues that are with problems how he didi it.... He told me that he used SAM...
So I used SAM too... There I found an option:

"[ ] Allow Anyone to Cancel a Request"

Then I deleted and recreated one of the queues with problem... And set this option to true...
Now it's working!!

I have one more question!

Is there a way to modify the queue without the needing of deletes and recreate it?

Thanks,

Rafael M. Braga


Geoff Wild
Honored Contributor

Re: Cancel Print Jobs...

Rafael - not that I'm aware of - as far as changing...I've been investigating myself...

Interesting thing is, with hppi, if invoked via the TUI, it adds a printer like so:

lpadmin -pW052 -v/dev/null -i/opt/hpnpl/sh/net_genericprinter

Via the command line, it uses the addqueue command.

lpadmin makes use of the CANCELOPT="" in the addptrtoq script....

Seems to be no way to pass the info to the addqueue command...

Also - I can NOT find anything in the /etc/lp/interface/ that stipulates whether or not CANCELOPT is used...

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.