On Mon, 3 Jun 2002, Dan Finch wrote:
> This is more of a samba question but I thought I would see if someone here
> might know how to do this. I am wanted to capture either the IP Address or
> machine name of the client printing in the acct logs. The log file is
> capturing a host but its the host of the samba server not the machine doing
> the printing. I am currently using the accounting.pl script to get most of
> the info I want but would really like to get this last piece of information.
> Any tips would be appreciated.
I use the -Z option of lpr to pass in "special" information to my
accounting.pl script. Here is my samba print command:
print command = /private/lprng/bin/lpr -P%p -r -l -Z'win:%m' -J'%m:%s' %s
This passes the netbios name of the host printing through samba, which I
then use in accounting.pl to send a message back to the host when their
print job has successfully printed (using smbclient -M).
It should be fairly easy to change the print command to use the IP address
of the host. I don't remember which % code that is right now, but you
could look it up in the smb.conf man page.
Andy
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------