Each line in an authorization file must be either the fully qualified name of a host (That is, as returned by gethostbyaddr() would return it) or the name of a domain. If it is a domain, it must begin with a period. A domain name is considered to match all hosts in that domain.
For example, if the file /etc/hosts.lpd contains:
# This is /etc/hosts.lpd
.cs.trincoll.edu
mouse.xc.trincoll.edu
and /etc/hosts.lpd_deny contains:
# This is /etc/hosts.lpd_deny
fiend.cs.trincoll.edu
then the computers ``starbase.cs.trincoll.edu'' and ``mouse.xc.trincoll.edu'' can connect but ``fiend.cs.trincoll.edu'' cannot.
If the -p switch is used, any client can connect and clients not listed in /etc/hosts.lpd or /etc/hosts.equiv need not connect from a reserved port.
If you don't know the fully qualified form of the name of a host you wish to put in one of the authorization files, the --fully-qualify option may be used to determine it:
$ /usr/ppr/lib/lprsrv --fully-qualify=shakti
shakti.cc.trincoll.edu
printer 515/tcp spooler
Then put a line like this in /etc/inetd.conf:
printer stream tcp nowait ppr /usr/ppr/lib/lprsrv lprsrv
Or, if you want to run it in `permissive' mode:
printer stream tcp nowait ppr /usr/ppr/lib/lprsrv lprsrv -p
If you wish to use lprsrv and lpd together, you must either run lprsrv on a port other than 515, or you must arrange for inetd to be started before lpd. If inetd is started before lpd, lpd will be unable to bind to port 515 but will still work otherwise and lprsrv will pass remote jobs to lpr.
/usr/ppr/lib/lprsrv -s printer
If the -A switch is used, lprsrv will pass the switch and its argument on to ppop. The argument is an integer which indicates an age in seconds. Arrested jobs older than the specified age will not be shown in queue listings.
When a client requests a queue listing for an LPR/LPD queue, lprsrv simply executes lpq and returns the output.
When a client requests a queue listing for a System V lp queue, lprsrv runs lpstat. Some lpq options are not supported for lp queues.
The user ``root'' on certain machines may cancel any job from any machine. The list of machines on which root has this privledge is specified with the -S switch. The argument is a colon separated list. The machine names used in this list should be fully qualified. The lprsrv --fully-qualify switch may be used to determine the fully qualified form of a name:
$ /usr/ppr/lib/lprsrv --fully-qualify cberry.trincoll.edu
cberry.cc.trincoll.edu
If no -S switch is used, lprsrv will attempt make a default list containing only the fully qualified form of the name of the host it is running on. This process requires several DNS queries, so you may wish to do it once and add an -S switch to the lprsrv command line. The --hostname switch will determine the fully qualified name of the node it is running on and print the result:
$ /usr/ppr/lib/lprsrv --hostname
mouse.xc.trincoll.edu
This name may then be added to the lprsrv command line in /etc/inetd.conf:
printer stream tcp nowait ppr /usr/ppr/lib/lprsrv lprsrv -S mouse.xc.trincoll.edu
Access control for lpr and lp queues is much more primative. Any user may cancel any job submitted through lprsrv.
This program may invoke ppr(1), ppop(1), lp(1), cancel(1), lpstat(1), lpr(1), lpq(1), and lprm(1).