You can capture a lot of info about the client using the built in variables. Here is what I log each time a client logs into one of the shares on my home samba server. Since I use guest logins with ftp as the guest user, ftp shows up a lot in this list. Just echo those variables you want to save via a preexec parameter in your printer share to a log file. Joel
client machine NetBios name = jhammer6 (%m) Primary goup name of U = ftp (%G) IP address of client = 192.168.0.6 (%I) Netbios name of server = jhammer6 (%L) Internet DNS of client= jhammer6.jhammer.org (%M) NIS home directory= jhammer6 (%N) Protocal level = NT1 (%R) Current time and date= 2002/05/31 20:47:47 (%T) Session user name (one the client wanted)= jlh (%U) Architecture of remote machine= Samba (%a) Process ID of current server= 32136 (%d) Internet DNS hostname of server= jhammer6 (%h) Path of services home directory from NIS= (%p) Samba version= 2.2.1a (%v) Home directory of user in u= /home/ftp (%H) Root directory of current service = / (%P) Name of current service = public (%S) Primary group name of u in share = ftp (%g) User name of current service = ftp (%u) On Mon, Jun 03, 2002 at 08:25:47AM -0500, 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. -----------------------------------------------------------------------------
