Sams Teach Yourself Samba in 24 Hours

ContentsIndex

Hour 8: Printers

Previous HourNext Hour

Sections in this Chapter:

 

The [printers] Share

If you had to create a new printer share every time you added a new printer to your Samba server, administration of the Samba server could become complicated. To simplify life, Samba provides a scheme for printers similar to the [homes] share described in Hour 7. Briefly, when a client requests a connection to a share, Samba uses the following approach:

The [printers] share looks like any other printer share. In fact, you can turn this one into a [printers] share:

[printers]
    comment = All printers on this machine, got from printcap
    path = /var/spool/samba
    printable = yes

When Samba uses the [printers] share because the requested share does not exist as a section and does not resolve as a [homes] share, the [printers] share is cloned and given the name of the requested share and printer name. This means that all such printers defined by the [printers] section take their parameters from the [printers] section.

Where does Samba get the list of printers? From the printcap file. If your system is based on BSD for printing or uses PLP or LPRNG, you have a printcap file in /etc/printcap. However, if your system uses System V printing, you can make a printcap file, or use the printcap name parameter as shown later in this chapter.

Sams Teach Yourself Samba in 24 Hours

ContentsIndex

Hour 8: Printers

Previous HourNext Hour

Sections in this Chapter: