Here's the way I do it (from smb.conf):

print command = /usr/common/LPRng/bin/lpr -P%p
-CSOURCE=SAMBA,REMOTEIP=%I -r %s

The 'class' argument can be picked up by anything which has access to
the 'control file'.

I have several possible 'sources' and so must include an indication of
what generated the 'lpr' command.

-Rick

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.
> 
> -----------------------------------------------------------------------------
> 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.
> -----------------------------------------------------------------------------

-- 
|Rick Cochran                                   phone: 607-255-7618|
|Cornell CIT - Systems & Operations - Net-Print   FAX: 607-255-8521|
|730 Rhodes Hall, Ithaca, N.Y. 14853        email: [EMAIL PROTECTED]|

-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

Reply via email to