samba3 way of knowing ip of who is printing?

Jeff Sadowski jeff.sadowski at gmail.com
Thu Nov 10 08:41:38 MST 2011


my smb.conf file looks like so
[global]
 workgroup = WORKGROUP
 server string = %h server
 dns proxy = no
 log file = /var/log/samba/log.%m
 max log size = 1000
 syslog = 0
 panic action = /usr/share/samba/panic-action %d
 encrypt passwords = true
 passdb backend = tdbsam
 obey pam restrictions = yes
 unix password sync = yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 pam password change = yes
 map to guest = bad user
 usershare allow guests = yes
[temp]
 comment = Temp Directory
 browseable = yes
 path = /tmp
 read only = no
 guest ok = yes
[postscript]
 comment = Print to create PDF
 printing = LPRNG
 path = /tmp/
 printable = yes
 print command = /usr/local/bin/dump.sh "%s" "%f" "%p" "%u" "%H" "%J"
 guest ok = yes


my /usr/local/bin/dump.sh looks as follows

#!/bin/bash
echo $* >> /tmp/dump.txt

after test printing I get the following in /tmp/dump.txt

smbprn.00000026.E6rHhP smbprn.00000026.E6rHhP postscript nobody
/nonexistent Local Downlevel Document

What I would like is for my script to get the ip address or better yet
the machine name of the windows machine printing to the [postscript]
printer is there a way to send that information to my scrpt?


More information about the samba-technical mailing list