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. The docs state when using CUPS the relevent lines of SMB.CONF 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. What we do have is the following: printer admin = @DomainAdmins,root load printers = yes printing = cups printcap= /etc/printcap 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?
SMITH Gregory C.wrote in a message on Samba-digest: > Message: 6 > From: "SMITH Gregory C." <gsmith@ahbl.ca> > To: "'samba@lists.samba.org'" <samba@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
> The docs state when using CUPS the relevent lines of SMB.CONF > 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. > > What we do have is the following: > > printer admin = @DomainAdmins,root > load printers = yes > printing = cups > printcap= /etc/printcap > 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?Cups printcap is installed in "/etc" by default. We use the following settings for quite a while now: printer admin = @root print command = /usr/bin/lpr -r -cups -P %p %s printing = cups load printers = Yes printcap name = /etc/printcap lpq command = /usr/bin/lpq -P%p lprm command = /usr/bin/lprm -P%p %j lppause command = /usr/bin/lp -i %p-%j -H hold lpresume command = /usr/bin/lp -i %p-%j -H resume queuepause command = /usr/bin/disable %p queueresume command = /usr/bin/enable %p Samba spool files get deleted just fine as requested by the "-r" switch ... (somebody mentioned spool files where left after jobs completed)
Ulrich Kohlhase wrote on Samba-digest:> Message: 8 From: Ulrich.Kohlhase@t-online.de (Ulrich Kohlhase) > To: <samba@lists.samba.org> > Date: Sat, 2 Nov 2002 03:34:18 +0100 > Subject: [Samba] RE: Clarifying CUPS Printing > >> The docs state when using CUPS the relevent lines of SMB.CONF >> 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. >> >> What we do have is the following: >> >> printer admin = @DomainAdmins,root >> load printers = yes >> printing = cups >> printcap= /etc/printcap >> 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? > > > Cups printcap is installed in "/etc" by default. We use the following > settings for quite a while now: > > printer admin = @root > print command = /usr/bin/lpr -r -cups -P %p %s > printing = cups > load printers = Yes > printcap name = /etc/printcap > lpq command = /usr/bin/lpq -P%p > lprm command = /usr/bin/lprm -P%p %j > lppause command = /usr/bin/lp -i %p-%j -H hold > lpresume command = /usr/bin/lp -i %p-%j -H resume > queuepause command = /usr/bin/disable %p > queueresume command = /usr/bin/enable %p > > Samba spool files get deleted just fine as requested by the "-r" switch > ... (somebody mentioned spool files where left after jobs completed)Ulrich, it would help a lot if you gave the version numbers of CUPS and Samba. Also, which operating system are you using? Is your Samba linked against the libcups? Cheers, Kurt
Kurt, Thanks for pointing to the samba docs, last time I read the relevant parts regarding printing and cups is a couple of months ago ;-). We did have a working configuration already, but I changed smb.conf slightly just in case ... Setup: SuSE Linux, XFS, 2.4.18 kernel, cups 1.1.16 smb.conf: ... load printers = Yes printcap name = cups lpq cache time = 10 lpq command = /usr/bin/lpq -P%p lprm command = /usr/bin/lprm -P%p %j lppause command = /usr/bin/lp -i %p-%j -H hold lpresume command = /usr/bin/lp -i %p-%j -H resume queuepause command = /usr/sbin/reject %p queueresume command = /usr/sbin/accept %p ... printer name = ljfach2 print command = /usr/bin/perl /usr/local/samba/lib/printhp2100.pl %p %s %u %m %I %T ... We now have --a: Samba linked against libcups --c: "printcap = cups" in smb.conf --d: "Printcap /etc/printcap" in cupsd.conf and omitted --b: "printing = cups" in smb.conf to make sure our custom print commands are used.