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] Admin access to faxrm

At 17:20 22.01.2001 -0800, post+hylafax@macallister.grass-valley.ca.us wrote:
>I am having trouble setting up admin access so that I can delete
>a fax job when I need to.  If my reading of the docs is correct
>what I need to do is to add myself to the etc/hosts file, right?
>The passwords there need to be encrypted.  I copied the password
>strings that I found in /etc/shadow on my Redhat 6.2 system and
>still cannot get admin access.  Be great if someone could tell me
>what I am doing wrong.

Password from /etc/shadow works for me with SuseLinux 6.3. This is the way how I did it on my system,
greetings from Bavaria, Germany


1 Give the password "gogogo" to any user on your system (my linuxuser is lippmann):
faxsystem:~ # passwd lippmann
Changing password for lippmann
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
New password: gogogo
Re-enter new password: gogogo
Password changed.

2 Copy the encrypted password into a buffer where you can paste it later:
gatekeeper:~ # grep lippmann /etc/shadow
You need this string which is the encrypted password: /hWI5mZyyHDj2

3 Edit the file /var/spool/fax/etc/hosts.hfaxd and put these lines into it:
# accept faxjobs from all users from the net 10.1.1.x
# Set administrationpassword for all users which connect from localhost

4 Restart hylafax
# /etc/rc.d/hylafax stop
# /etc/rc.d/hylafax start

5 Print a faxjob from your Windows-WHFC-client to a number which does not exist to test how to delete a faxjob:

lippmann> /usr/bin/sendfax -n -d99999 /etc/hosts
request id is 435 (group id 435) for host localhost (1 file)

Find out the jobnumber of the fax, here it's the number 435:

lippmann> faxstat -s
HylaFAX scheduler on sv-bourganeuf.zdf: Running
Modem modem (+49+911+9600157): Sending job 435

JID Pri S Owner Number Pages Dials TTS Status
435 127 R lippma 99999 0:1 0:12

6 Delete the faxjob:

lippmann> ftp 4559
Connected to
220 faxserver.zdf server (HylaFAX (tm) Version 4.1beta2) ready.
Name ( lippmann <--- no password needed!
230 User lippmann logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quote "admin gogogo"
230 Administrative privileges established.
ftp> quote "jkill 435"
200 Job 435 killed.
ftp> quit
221 Goodbye.

If this works, you're on the way to successfully delete jobs by shellscript. 

7 Write script to delete faxjobs like this:

sub deletejob {
my ($adminpass,$killjob)=@_;
my $ftp = Net::FTP->new("", Port => 4559)
|| print "Error: $!";
|| print "Error: $!";
|| print "Error: $!";
$ftp->quot("jkill", $killjob)
|| print "Error: $!";
|| print "Error: $!";

I used this approach to kill printjobs from a webinterface. So I can delete jobs to wrong faxnumbers submitted by my users.

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

Project hosted by iFAX Solutions