- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cancel print jobs
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:00 AM
04-26-2004 08:00 AM
#!/usr/bin/ksh
export PATH=$PATH:/usr/local/bin:/usr/bin
echo Please enter Printer:
read printer
lpstat -o$printer
echo Which Job number to cancel, CR for none:
read cancel
super cancel $cancel
My super.tab file has the following entry.
cancel /usr/bin/cancel prntmgr:@saturn
When I run it is root it works but when I run it as the prntmgr user I get
request "lj0-15" not cancelled: not owner
Other super commands are working I just can't seem to get the cancel to work
HP-UX 11.11
Any ideas welcome
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:07 AM
04-26-2004 08:07 AM
Re: cancel print jobs
What I did here for our helpdesk, is setup resticted SAM - then have them go into SAM to delete spools....
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:15 AM
04-26-2004 08:15 AM
Re: cancel print jobs
Thanks for the input but
shouldn't the fact that the cancel
command is being ran with super take care
the issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:18 AM
04-26-2004 08:18 AM
Re: cancel print jobs
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:18 AM
04-26-2004 08:18 AM
Re: cancel print jobs
The fact you use "super" to set your effective-id to 0 doesn't change the users login name. So when the remote server is contacted to do the cancel, it only looks at the login name.
my 2 cents
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:34 AM
04-26-2004 08:34 AM
Re: cancel print jobs
These are network printers.
My initent is to let this user manage
other peoples jobs. I did submit another
job as an "ordinary" user and the prntmgr
user sill could not cancel it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:44 AM
04-26-2004 08:44 AM
Re: cancel print jobs
cancel /usr/bin/cancel prntmgr@saturn
or
cancel /usr/bin/cancel prntmgr@{saturn}
http://olympus.het.brown.edu/cgi-bin/man2html?super.tab+5
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:47 AM
04-26-2004 08:47 AM
Re: cancel print jobs
By default, super only changes the effective uid. Some programs (e.g. exportfs under SunOS 4.1.x) require the real uid to be root. In that case, you should put an option like ``uid=root'' or ``u+g=root'' into the super.tab file.
cancel might be the same...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:48 AM
04-26-2004 08:48 AM
Re: cancel print jobs
Also, one other option would be to use sudo. You can get that from:
http://hpux.connect.org.uk/
Then execute:
/opt/sudo/sbin/visudo to configure the sudoers file to give prntmgr access to the cancel command.
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:56 AM
04-26-2004 08:56 AM
Re: cancel print jobs
I did try adding the user into the lp group
but still no luck, I even added the user to the root group and it still didn't work.
I stumped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:04 AM
04-26-2004 09:04 AM
Re: cancel print jobs
super root:cancel $cancel
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:04 AM
04-26-2004 09:04 AM
Re: cancel print jobs
# ll /usr/bin/cancel
-r-sr-xr-x 1 lp bin 36864 Aug 16 2001 /usr/bin/cancel
Also check patches, here is mine:
# what /usr/bin/cancel
/usr/bin/cancel:
$Revision: @(#) all CUP11.11_BL2001_0816_4 PATCH_11.11 PHCO_24701
Thu Aug 16 08:44:08 PDT 2001 $
Sorry, but that's the most I can think of as of now.
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:30 AM
04-26-2004 09:30 AM
Re: cancel print jobs
have tried to run cancel fro command line and still no joy. when I tried
super root:cancel lj0-19 I got
super: Couldn't stat super.tab file `/.supertab': No such file or directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:42 AM
04-26-2004 09:42 AM
Re: cancel print jobs
You might have to write your own script to run "super" on the remote machine.
It might be that "super" only has effect on your local HPUX system. To cancel a job on a remote HPUX system, you might have to run "super" remotelly.
This could have potential security problems depending how you proceede.
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 09:49 AM
04-26-2004 09:49 AM
Re: cancel print jobs
adding uid=root in the super.tab file did the trick.
cancel /usr/bin/cancel prntmgr:@saturn uid=root
Thanks for all the input guys.
Iam glad I can "bunny" this one now and I hope
it will help someone out in the furer.