printer fun and games

Ronan Waide waider at
Wed Apr 30 15:52:13 GMT 2003

Some bugs, or maybe misexpectations, with the printer support:

Samba 3_0 head, currently using NT4 as a client. I'm not sure the
choice of client really makes a difference, thought.

Add Printer works, but I'm adding a printer with a different name to
the share name, so my addprinter script creates smb.conf entries like

;; automatically added printer definition
printer name = HP_LaserJet_4M_Plus
printable = yes
path = /var/spool/samba
;; end of automatically added printer definition

Samba has some explicit coding which basically causes it to disregard
the printer name in most cases except where actually talking to the
back-end (in this case cups) to print, check queues, etc. So the first
(cosmetic) issue is that the Printers folder lists share names rather
than printer names. This is no big deal, and also unavoidable with the
current code setup.

If I pull up properties on this printer (via the Printers folder) and
make a change, the change appears to be written back to a printer
called '\\server\SHARENAME'. The main effect of this appears to be
that my addprinter script gets run again, creating this new printer.

The third problem is that the deleteprinter script, documented as
getting one parameter - the printer name - is in fact passed the share
name, requiring in my instance that the deleteprinter script to trawl
through smb.conf looking for the printer name.

The fourth & final (so far) problem is that the return value of the
deleteprinter command appears to be ignored, so even if the printer
isn't successfully deleted, Samba forgets about it anyway. This causes
some weird inconsistencies which basically amount to the printer
remaining visible in the Printers folder, but you can't actually do
anything with it.

waider at / Yes, it /is/ very personal of me.

"The electronic universe shall be mine, all mine, once I've finished mowing
 the lawn of course." - Mal MacCarthy

More information about the samba-technical mailing list