|
More Complex CUPS smb.conf Settings
The Overriding Global CUPS Settings for One Printer example
is a slightly more complex printing-related setup for smb.conf . It enables general CUPS printing
support for all printers, but defines one printer share, which is set up differently.
Example21.2.Overriding Global CUPS Settings for One Printer
|
[global]
|
printing = cups
|
printcap name = cups
|
load printers = yes
|
|
[printers]
|
comment = All Printers
|
path = /var/spool/samba
|
public = yes
|
guest ok = yes
|
writable = no
|
printable = yes
|
printer admin = root, @ntadmins
|
|
[special_printer]
|
comment = A special printer with his own settings
|
path = /var/spool/samba-special
|
printing = sysv
|
printcap = lpstat
|
print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ; echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ; echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log ; rm %f
|
public = no
|
guest ok = no
|
writable = no
|
printable = yes
|
printer admin = kurt
|
hosts deny = 0.0.0.0
|
hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60
|
This special share is only for testing purposes. It does not write the print job to a file. It just logs the job parameters
known to Samba into the /tmp/smbprn.log file and deletes the job-file. Moreover, the
printer admin of this share is “kurt” (not the “@ntadmins” group),
guest access is not allowed, the share isn't published to the Network Neighborhood (so you need to know it is there), and it
allows access from only three hosts. To prevent CUPS from kicking in and taking over the print jobs for that share, we need to set
printing = sysv and
printcap = lpstat.
|
|