[Samba] Clarifying CUPS Printing

Kurt Pfeifle kpfeifle at danka.de
Sat Nov 2 00:14:01 GMT 2002


SMITH Gregory C.wrote in a message on Samba-digest:

 > Message: 6
 > From: "SMITH Gregory C." <gsmith at ahbl.ca>
 > To: "'samba at lists.samba.org'" <samba at lists.samba.org>
 > Date: Fri, 1 Nov 2002 13:26:42 -0800
 > Subject: [Samba] Clarifying CUPS Printing
 >
 > We have been using CUPS to handle printing and have run into some "features"
 > some of which a fresh install of the responsible server will probably fix.
 > However there are some disparities between the documentation and our
 > practical experience for which a clear statement would help others.

Which exact version of Samba and CUPS are you running? On which OS ?

 > The docs state when using CUPS the relevent lines of SMB.CONF

To be exact, the name of the file is all lower case....

 > should look
 > like this:
 >
 > printing=cups
 > printcap=cups
 >
 > And that any manual printing command are ignored.  However, if we set
 > printcap = cups nothing happens and we cannot see any printers.

Did you also check the relevant CUPS documentation? If so, you've probably
missed the requirement to have "Printcap /etc/printcap" (or similar)
in "/etc/cups/cupsd.conf". This directive would ask CUPS to create
and keep current a (minimal) printcap file containing the names of
all printers, for the benefit of legacy applications which won't print
without a printcap file and also for the benefit of Samba (which looks
into the printcap to list the available printers)...

Did you check if your Samba is compiled against "libcups"? Please check
by running (as root):

   ldd `which smbd` | grep libcups

Above quoted 2 simple settings only work if you have a Samba that is
aware of the CUPS library and uses it....

 > What we do have is the following:
 >
 > printer admin = @DomainAdmins,root
 > load printers = yes
 > printing = cups
 > printcap= /etc/printcap

Hmmm... this contradicts what you say you read in the docu: that it
should be "printcap = cups" (which is the correct setting). It just
says that the one printcap should be used which is created by CUPS
(in case your "cupsd.conf" directive names "Printcap /etc/my_cups_printcap"
this would automatically match this non-standard name for the printcap
file too....)

 > print command = lpr.cups -r -P%p -o raw %s
 > lpq command = lpstat -o %p
 > lprm command = cancel.cups %p-%j
 >
 > See any problems with this?

Yes. It confuses me if you say you've read the docus and you quote it
(by and large correctly) and still use a different setting. Above
anything else, these settings are ignored, if you have

--a: Samba linked against libcups
--b: "printing = cups" in smb.conf
--c: "printcap = cups" in smb.conf
--d: "Printcap /etc/printcap" in cupsd.conf

Cheers,
Kurt




More information about the samba mailing list