Subject: Re: [netatalk-admins] Retrieving Print File name from PAPD

From: [email-masked]
Date: Tue, 27 Oct 1998 12:00:30 -0600 (CST)

on Tue, 27 Oct 1998 Les Barstow wrote:
> 1) Does AppleTalk send filenames, usernames, or systemnames with print
>    requests?  If so, is there a way to get netatalk to pass them on to
>    lpr/lp?

I once saw the Mac name in some postscript... it depends on the driver. 
Print to a file and look through the top of the postscript code, you
might be suprised by what you find.

As for getting the papd to see the username that afpd already knows,
you can check out http://members.tripod.com/~dustbox/authprint.html
for some information about that (but it's based on asun2.0a18.2
instead of asun2.1.0a)

-brad

---

From: Dejan Ilic <[email-masked]>
Date: Tue, 27 Oct 1998 21:24:53 +0100 (MET)

> >    requests?  If so, is there a way to get netatalk to pass them on to

At my computer-pool we use Xinet KaShare/KaSpool (until NetAtalk i
stable enough :-). Anyway in the postscript-file printed from the
Mac-clients there is a line inserted looking something like this

"%%Xinet:xxxxxxxx:nn=65279.136:xxxxx" where nn is the appletalk-node
number.

Armed with that knowledge and with the use of atstat (supplied with
KaShare) and arp I get the TCP-IP of the connected user.

AARP TABLE CONTENTS:
Net     Node    Ether                   Timer   Inter   Flags
..
65279   136     08:00:07:c4:10:c0       0       elx0    COM
..

arp -a:
..
elxl0  mac1.knuten.liu.se   255.255.255.255       08:00:07:c4:10:c0
..

Reverse lookup of the name gives the IP-number.

The I check who is logged in from that computer:

who:
ionne431 KA1.0    Oct 27 20:27 (130.236.240.101)

^^^
User name. The system can be considered as fairly thrused as the user
has to be logged into the server to be able to print, otherwise the
print job is thrown away. I do not trust the information of username
from the client as it can easily be forged.

The system is used for our internal accounting system and users pay in
advance to print anything. The actual counting is done KaSpool, the
administration by small homemade scripts and a gdbm-database.

KaSpool accounting only tells that "root has printed 5 of 5 pages" and
nothing more without my workarounds. After putting intercepts in right
places is says "ionne431 has printed 5 of 5 pages".

I'm hoping to be able to replace the system with NetAtalk and LPRng
within forseable time in future.

=====================================================================
Dejan Ilic, Tech Univ. of Linkoping, Sweden    Phone:+46-13-473 01 06
Email: [email-masked]   Web: http://www.lysator.liu.se/~svedja
=====================================================================
[finger -l [email-masked] for public PGP key]