2.2 Release immenent/2.0.7 possible print issues

Samuel Greenfeld gree3776 at rowan.edu
Tue Apr 10 21:03:22 GMT 2001

   Pardon me for passing the buck, but there are some printing problems I had with 2.0.7 that I was wondering the status of in 2.2.   I have not had time to play with 2.2 much given that we run a quasi-production system, and I personally may be graduating within a month.

   Relevant smb.conf portions:

;this section is commented out to prevent automated printer generation

  comment = "LaserJet ECE Room 201"
  path = /var/spool/samba/ece201
  writeable = no
  guest ok = no
  printable = yes
  browsable = yes
  hosts allow =
  force user = daemon

; This is similar, etc., etc., 

; These lines were originally taken from the LPRng FAQ, and modified:
        print command =      /usr/bin/lpr  -P%p -U%U@%I  -r %s
        lpq command   =      /usr/bin/lpq  -P%p -U%U@%I
# Note this needs a modified lprm executable to work due to a samba glitch :(
        lprm command  =      /usr/bin/lprm -U%U -P%p %j
        lppause command =    /usr/sbin/lpc -U%U@%I  hold %p %j
        lpresume command =   /usr/sbin/lpc -U%U@%I  release %p %j
        queuepause command = /usr/sbin/lpc -U%U@%I -P%p stop
        queueresume command = /usr/sbin/lpc -U%U@%I -P%p start

    The problem seems to come from the handling of the "force user" directive.   This is done so LPRng can be used to log the user and host that printed the print job via scripts and an SQL database.   The following problems were noted with 2.0.7 when "force user" was turned on:

1. While the print job itself is forced to the user, no accessory program used seems to do so.   This is a problem with LPRng, given that only certain users may be given rights to force the username of a print job, and it is desirable to keep that list as small as possible.   Right now, we are living with this, and working around it, but a fix to this would be nice.   This activity was verified by temporarily putting a program in place of /bin/sh (run by system()) that would log the UID, EUID, GUID, command & parameters, etc.

2. Whenever someone requests the printer's status, samba creates a /tmp/lpq.XXXXX file, where XXXXX is a series of eight or so characters.   This file is created as root, but is not deleted.   After a while, this leads to a lot of /tmp/lpq.XXXXX files hanging around that have to be manually cleared.   A new one seems to be created whenever samba feels like refreshing a print queue's status.

More information about the samba-ntdom mailing list