+:x:-:s5:-:n:10:-:-:Allow all connections
As the comment at its end makes clear, this entry grants all remote
systems access to the local printers. The first field defines the
name of the host being granted access. When a plus sign (+) is used
in this field, it means all hosts.
The fields in an /etc/lp/Systems entry are
separated by colons (:). The field containing an x
and all of the fields containing a dash (-) can be
ignored. These fields are unused.
The fourth field identifies the type of operating system used on the
remote client. It contains either s5 for System V
computers that use LP to print jobs, or bsd for
BSD systems that use LPD.
The n in the sixth field indicates that this
"connection" should never be timed out and removed from
the system. A timeout period in minutes could be entered in this
field, but this is not usually done. Keep the connection available as
long as the local server is up. The 10 is a
related value. It indicates that if a connection to a remote system
fails, it should be retried after 10 minutes. This is a good value:
it is long enough to give the remote system a chance to restart after
a crash. Both n and 10 are the
defaults and don't usually need to be changed.
Don't directly edit the /etc/lp/Systems
file. Modify it with the lpsystem command. To
remove a system from the Systems file, use
lpsystem with the -r
hostname command-line argument,
where hostname is the value in the first
field of the entry you wish to delete. For example, to remove the
plus sign (+) entry from the default
/etc/lp/Systems file, type:
# lpsystem -r +
To add an entry to the Systems file, use the
lpsystem command without the -r
option. For example, to add a BSD system named
clock, enter:
# lpsystem -t bsd -y "Linux PC in room 820" clock
The command adds the following entry to the
Systems file:
clock:x:-:bsd:-:n:10:-:-:Linux PC in room 820
The -t command-line option defines the operating
system type. The -y option defines the comment;
clock is, of course, the hostname. We accepted
the default values for the timeout and the retry intervals. These
could have been modified from the command line using the -T
timeout and the -R
retry options. See the manpage
for lpsystem for more information.
Figure 9-1. Printer Manager
Clients select Add, then Access to Printer from the Edit menu, and
enter the name of the remote printer and its server in the window
that appears. Servers share printers simply by selecting Add, then
LocalPrinter in the same menu and configuring a
local printer.
All Unix systems provide some technique for sharing printers. The
network administrator's task is to ensure that the printers are
accessible via the network and that they are properly secured.