Operating System - HP-UX
1833397 Members
3841 Online
110052 Solutions
New Discussion

Re: Cancel a print job cont'd...

 
Jacqueline Nguyen
Occasional Advisor

Cancel a print job cont'd...

I forget to mention in my prior question. I want to release the cancel command to my user login and not give them the "root" login privileges and my company (government) is very limited on adding costly software to make it working.

Thanks.
5 REPLIES 5
Michael Tully
Honored Contributor

Re: Cancel a print job cont'd...

I forgot to mention that the use of the 'sudo' product is free!!

It is quite easy to set it up too. Have a look at the link from the porting centre.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.2b1/
Anyone for a Mutiny ?
A. Clay Stephenson
Acclaimed Contributor

Re: Cancel a print job cont'd...

Hi Jacqueline:

Here is a 3 minute C program which wrappers the cancel command and allows a regular user to become super user to execute this command and then instantly revert to regular user status. This is a very simplified version of what sudo does.

compile it like this as root:
cc cancelprint.c -o cancelprint
chmod 4755 cancelprint

If you copy this file make sure that the setuid bit is preserved. For example if you copy it to /usr/bin. chown root /usr/bin/cancelprint chmod 4755 /usr/bin/cancelprint

Your users would use it like this:
(after using lpstat to get the printjob)
cancelprint printera-909 printerb-23 ...

Regards, Clay


If it ain't broke, I can fix that.
Roger Baptiste
Honored Contributor

Re: Cancel a print job cont'd...

Jacqueline,

You have two free choices.

Install Free Sudo software and allow
the users to use the cancel command. Sudo
is easy to setup and configure.

OR

Use restricted SAM - In SAM you
can configure the cancel command as a separate
application and let users run it through
restricted SAM. It is an easy process too.
We used to do it in an earlier customer site.
But, only catch here is user would need to
run SAM just to cancel printjobs. If it
is a small number of users, it should be fine.

HTH
raj
Take it easy.
Frank Slootweg
Honored Contributor

Re: Cancel a print job cont'd...

I have not looked for your "prior question", but I do not understand the problem/question: Normally, users can cancel any print job, including those of other users. Only if you specifically disable that functionality, they can not. See the "-orc" option of the lpadmin(1M) command for details.
Frank Slootweg
Honored Contributor

Re: Cancel a print job cont'd...

I just saw your "prior question" (http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x7eb6a1abbac8d5118ff10090279cd0f9,00.html). See Thierry's response in that thread on how to do this with SAM (I already gave a solution with lpadmin).