I've successfully got Samba and CUPS working together to give nice, consistent printing interfaces with just the Postscript drivers to Windows clients both IA32 and x64 of any variants since 95. The printing related parts of smb.conf are:

   load printers = yes
   printing = cups
   printcap name = cups

And later these shares:

   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

This successfully enumerates all of the CUPS printers and clients can print fine.

The problem I'm having though is that Windows clients almost never see any jobs in the queue other than their own jobs and only for a very short period, presumably whilst the job is spooling to the server. This has the knock on effect that if someone wants to cancel one of their jobs they either power off the printer(!) or ask me to do it.

I was under the impression that the combination of printing = cups and printcap name = cups in [global] alleviated the need to use settings like lpq command to make queue management functionality available since it used libcups directly. On a test server though setting a sensible value for lpq command changes the observed behaviour slightly such that pressing F5 to refresh a queue in windows displays the job(s) momentarily, before they disappear again. What am I missing?

I suspected at one point it was related to the read only setting on the [printers] share. What does the read only = yes part of the [printers] share mean? Is it related to queue administration tasks? I can't see any observable difference when changing it either way, but I'd like to understand rather than just guess! Presumably it's something different to what it means in the usual file share context since the [printers] share has some printing related magic going on behind the scenes. I can't find any specific documentation on this related to printer shares though.

  • Doesn't directly answer your question, but in all windows environments that I manage, the print jobs (even when they're quite a few pages) spool so quickly through the software and then to the printer, there's no way for the user to catch them in time in the print queue to cancel them. When purchasing a printer, I always look for one with a dedicated 'Cancel Job' button on the top. Having said that, there is the rare instance when a job breaks the queue and causes everything else to stop, and the user needs to cancel that job to resume normal print operations. – Dom Oct 8 '11 at 7:03
  • @Dom - I can see the jobs for quite a while via CUPS (e.g. with lpq) on the UNIX side, it's just the Windows clients that seem to be lacking any sort of "global" view of the printer status. – Flexo Oct 9 '11 at 7:43

The local windows spool simply delivers it to the remote spool.

I guess in order for your wish to work (that everybody sees everyone queued stuff) will only work with some Windows Printing Queue, but i am far from a windows expert. I'd look into IPP, i am also not sure if lpd was designed to send the queue back to the client, but rather to only submit your things to the server.

  • Really? I thought the Windows view of the printer queue via Samba should mirror the global view of the printer queue as seen by the Samba server, e.g. if I ran lpq on the Samba server and see 3 jobs I'd see 3 jobs by looking at the queue via \\server\queue in Widows. – Flexo Oct 9 '11 at 7:36

Isn't it possible to setup CUPS so that clients can view and/or cancel their own jobs via the web interface via a specific cancel policy?



  • This is fairly easy to do, but not terribly intuitive for Samba users – Flexo Jan 2 '12 at 19:27

You could try using IPP from windows (define network printers as http://server:631/printers/printer-name and use Generic printer with Microsoft Imagesetter).

I don't remember if it lists all jobs until they are dequeued -- I configure my printers to abort failed jobs on CUPS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.