The third special section is called
[printers]
and is similar to
[homes]
. If a client attempts to connect to a share that isn't in the
smb.conf file, and its name can't be found in the password file, Samba will check to see if it is a printer share. Samba does this by reading the printer capabilities file (usually
/etc/printcap) to see if the share name appears there.[] If it does, Samba creates a share named after the printer.
Like
[homes]
, this means you don't have to maintain a share for each of your system printers in the
smb.conf file. Instead, Samba honors the Unix printer registry if you request it to, and provides the registered printers to the client machines. There is, however, an obvious limitation: if you have an account named
fred
and a printer named
fred
, Samba will always find the user account first, even if the client really needed to connect to the printer.
The process of setting up the
[printers]
share is discussed in more detail in Chapter 7,
Printing and Name Resolution.