samba 1.9.18p1 and print job hashing

Ross Walker rwalker at DPW.COM
Thu Jan 22 18:40:06 GMT 1998


Config: Samba 1.9.18p1 running on SunOS 4.1.4.

I think there is a problem in the current samba with print job
hashing. We have a unique printing system here, so I had to
write a version of the sysv commands to fit our environment.
This worked ok in 1.9.17p4, but in testing 1.9.18p1 I noticed
the following problem.

What happens is, when a print job request is sent to the server
a zero length file is created in the spool directory as
<USER>.<HASH>, but when the job actually gets there it is
spooled as <USER>.<HASH+1>. It prints the job out ok and
deletes the <USER>.<HASH+1> job file, but the initial spool
file <USER>.<HASH> is left behind as a zero length file.

Since we use samba strictly for printing from NTWS clients
(about 1500 of them worldwide) having a zero-length hash
file left behind after each print job would be bad.

(smb.conf file)
[global]
   workgroup = DPW
   security = server
   password server = NT1 NT2 NT3
   password level = 0
   encrypt passwords = yes
   null passwords = no
   os level = 32
   preferred master = no
   domain master = no
   local master = no
   wins proxy = no
   wins support = no
   wins server = xxx.xxx.xxx.xxx
   dns proxy = no
   time server = yes
   server string = DPW SMB Print Server %L
   guest account = nobody
   socket options = TCP_NODELAY
   keepalive = 60
   dead time = 5
   status = yes
   debug level = 1
   syslog = 4
   syslog only = no
   max log size = 100
   lock directory = /var/spool/dpw/dos/locks
   printing = sysv
   load printers = no
   min print space = 8192
   print command = cd /var/spool/dpw/dos/ntspool;
/usr/local/bin/dpwprint -P`cat /var/tmp/%U.printer | sed -e 's/-/_/g' |
sed -e 's/.$//g'` -Tnone %f; rm %f
   lpq command = /usr/local/lib/dpwprint/lp/lpstat -o`cat
/var/tmp/%U.printer | sed -e 's/-/_/g' | sed -e 's/.$//g'`
   lprm command = /usr/local/lib/dpwprint/lp/cancel `cat /var/tmp/%U.printer
| sed -e 's/-/_/g' | sed -e 's/.$//g'`-%j

include = /usr/local/lib/samba/dpw.printers
include = /local/lib/samba/%h.printers


(dom.printers file)
[hp3]
   printer driver = HP LaserJet III
   comment = HP LaserJet IIISi PostScript v52.3
   path = /var/spool/dpw/dos/ntspool
   printable = yes
   public = no
   browseable = yes

[hp4]
   printer driver = HP LaserJet 4
   comment = HP LaserJet 4Si/4Si MX PS
   path = /var/spool/dpw/dos/ntspool
   printable = yes
   public = no
   browseable = yes

[hp5]
   printer driver = HP LaserJet 5Si/5Si MX PS
   comment = HP LaserJet 5Si/5Si MX PS
   path = /var/spool/dpw/dos/ntspool
   printable = yes
   public = no
   browseable = yes


If there is a solution I would like to see it.

-Ross Walker
rwalker at dpw.com




More information about the samba mailing list