HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] removing jobs



"Eric Wood" <eric@interplas.com> wrote:
> Okay, apparently root can't delete jobs from different users.  This is going
> to be a hassle.
> Can't root cancel print jobs from different users?

I've written a wrapper script that su's to a userid 'hylafax' (which has a 
restricted shell and no password) to send all faxes as below...

===============================================================================
#! /bin/sh
#
# hylasendfax.sh - Send a fax as userid hylafax
#
# Modification History
#
# Who             When       What
# --------------- ---------- --------------------------------------------------
# Sam Paakki      01/03/2000 Created
#

HYLAFAX=${HYLAFAX-/usr/local/HylaFAX-v4.0}
export HYLAFAX

su hylafax -c \
    "${HYLAFAX}/bin/sendfax -i $1 -m -N -s a4 -n -d $2 $3"

===============================================================================

NOTE: Using the -N, the no-one gets notified by e-mail upon delivery.

I then use the following script to delete a job...

===============================================================================
#!/bin/sh
#
# hylafaxrm.sh - Delete a fax as userid hylafax
#
# Modification History
#
# Who             When       What
# --------------- ---------- --------------------------------------------------
# Sam Paakki      01/03/2000 Created
#

HYLAFAX=${HYLAFAX-/usr/local/HylaFAX-v4.0}
export HYLAFAX

su hylafax -c \
    "${HYLAFAX}/bin/faxrm $1 2>/dev/null" \
    >/dev/null 2>&1

===============================================================================

Of cause this is all (ie, submit and possible delete) being done on the one 
Unix host.

You might be able to change the owner of sendfax and faxrm to hylafax (using my 
example) and then do a SUID on the 2 executables to achieve the same effect?  
Hmmm, I might give that a try if I get some spare time...

HTH,
Sam.

Sam Paakki                     E-mail: smp@varacom.com.au
Senior Consultant               Phone: +61-7-3861-5099
Varacom Pty Ltd                   Fax: +61-7-3861-5098
   Visit us on the Web at: http://www.varacom.com.au/
Any opinions expressed or implied are mine and mine only.



____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null




Project hosted by iFAX Solutions