- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Commands for removing jobs from printer queue
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
Discussions
Forums
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
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
тАО07-06-2001 06:26 AM
тАО07-06-2001 06:26 AM
I need a simple command to completely clear a printer queue when logged in as a printer control user "pfix".
I know that I can delete everything in the /var/spool/lp/request/xxxx directory to clear the queue, but when logged in as the printer control user "pfix" with groups "user" and "lp", I am not able to delete the files. The files are user "lp" and group "lp" with 440 perms so only root can cleanly delete the files.
I need user "pfix" to be able to delete the files. As the files are created with perms 440, this is a problem. So is there a command that will allow pfix to delete the files or is there a way to change the perm set used when generating the files so that the group user has the rights to delete the file cleanly.
I have written a script to run as pfix to do the task but of course, the files remain due to the 440 perms.
Thanks,
Craig A. Sharp
Roush Industries.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:28 AM
тАО07-06-2001 06:28 AM
Re: Commands for removing jobs from printer queue
man cancel
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:33 AM
тАО07-06-2001 06:33 AM
Re: Commands for removing jobs from printer queue
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:38 AM
тАО07-06-2001 06:38 AM
Re: Commands for removing jobs from printer queue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:39 AM
тАО07-06-2001 06:39 AM
Re: Commands for removing jobs from printer queue
There are generally jobs from multiple users in the queue. Sometimes, they can number 30-50 jobs. I am thinking that the cancel -e command would work. What do you think?
Joseph,
The user pfix does belong to the group lp but the files that the printing system generates are perm 440 so even user lp cannot delete the files without confirmation.
Craig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:45 AM
тАО07-06-2001 06:45 AM
Re: Commands for removing jobs from printer queue
I changed my script to use the cancel -e command. I send a print job to the printer as another user. When I run the script and it hits the cancel -e command, it errors and says that i must have root capability to use this option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 06:54 AM
тАО07-06-2001 06:54 AM
Solutionother response.
if you assign pfix to lp group
then
chmod 775 /var/spool/lp/request/printername
rm -f /var/spool/lp/request/printername/* would work.
A million ways to skin a cat............
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2001 07:05 AM
тАО07-06-2001 07:05 AM
Re: Commands for removing jobs from printer queue
Perfect!!!!
That is what I needed. Changing the perms on the /var/spool/lp/request/xxx dirs did the trick. I had already added pfix to the lp group but had neglected to change the permissions. I was trying to change the perms on the files themselves rather than the directory.
Thanks to all for your replies.
Craig