Stefan-Michael. Guenther (in-put GbR)
2005-Mar-30 07:00 UTC
[Samba] Samba or Cups-Problem ?
Hi, I'm using some kind of pseudo printer on our samba server to automatically produce PDF files. The smb.conf looks like this (the samba server is successfully conteced to an ADS): [global] workgroup = ADS netbios name = pc103.ads.local realm = ADS.LOCAL security = ADS password server = win2ksrv.ads.local log level = 2 winbind separator = + template homedir = /home/%U idmap uid = 10000-20000 idmap gid = 10000-20000 winbind enum users = yes winbind enum groups = yes winbind enable local accounts = yes template shell = /bin/bash log file = /var/log/samba/log.smb.%U max log size = 500 printing = cups printcap name = cups cups options = raw [pdfprinter] comment = Minolta Color PageWorks/Pro Ps path = /samba/pdfprinter print command = /samba/pdfprinter/pdfscript "%s" printable = yes public = yes writeable = yes [printers] comment = All Printers load printers = yes browseable = no printable = yes public = yes read only = yes create mode = 0700 directory = /tmp My problem is, that the script doesn't produce any PDF file. In the logfile I find the following message: [2005/03/29 19:31:44, 0] printing/print_cups.c:cups_queue_get(900) Unable to get jobs for ipp://localhost/printers/pdfprinter - client-error-not-found Okay, this is an error from cups, but what has cups to do with it? I don't want to use cups for printing, but a simple script. I have used this construction already about two years ago with older versions of samba and cups and I of course compared the configuration files and all file/dir permissions. Samba is version samba-3.0.9-2.3, cups is version cups-1.1.21-5.6, the system is SuSE 9.2. Do I really have to set up some kind of dummy printer to use a script as a printer in samba? Thanks for any help, Stefan -- ***************************************** in-put GbR - Das Linux-Systemhaus Stefan-Michael Guenther Moltkestrasse 49 D-76133 Karlsruhe Tel./Fax : +49 (0)721 / 83044 - 98/93 http://www.in-put.de *****************************************
Stefan-Michael, Stefan-Michael. Guenther (in-put GbR) wrote:> Hi, > > I'm using some kind of pseudo printer on our samba server to automatically > produce PDF files. The smb.conf looks like this (the samba server is > successfully conteced to an ADS): > > [global] > workgroup = ADS > netbios name = pc103.ads.local > realm = ADS.LOCAL > security = ADS > password server = win2ksrv.ads.local > log level = 2 > winbind separator = + > template homedir = /home/%U > idmap uid = 10000-20000 > idmap gid = 10000-20000 > winbind enum users = yes > winbind enum groups = yes > winbind enable local accounts = yes > template shell = /bin/bash > log file = /var/log/samba/log.smb.%U > max log size = 500 > printing = cups > printcap name = cups > cups options = raw >The samba HowTo in chapter 20 says (^^^^ emphasis mine): "ldd `which smbd` libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000) libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000) libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) [....] The line libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) shows there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups is set, then any otherwise manually set print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ command in smb.conf is ignored. This is an important point to remember! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Tip Should it be necessary, for any reason, to set your own print commands, you can do this by setting printing = sysv. However, you will lose all the benefits of tight CUPS/Samba integration. When you do this you must manually configure the printing system commands (most important: print command; other commands are lppause command, lpresume command, lpq command, lprm command, queuepause command and queue resume command)." So what you need is> [pdfprinter] > comment = Minolta Color PageWorks/Pro Psprinting = bsd> path = /samba/pdfprinter > print command = /samba/pdfprinter/pdfscript "%s" > printable = yes > public = yes > writeable = yesand you'll also need a lpq command=/bin/true otherwise your printer is going to show offline and jobs won't clear from the queue on the clients. HTH, Regards, Urs Rau