pcnfsd(8) CLIX pcnfsd(8)
NAME
pcnfsd - (PC)NFS authentication and print request server
SYNOPSIS
/usr/ip32/nfs/pcnfsd.lp
/usr/ip32/nfs/pcnfsd.lpr
DESCRIPTION
The pcnfsd daemon processes authentication and print spool requests from
MS-DOS clients.
Two images of pcnfsd are delivered, each supporting a different style of
printing. The pcnfsd.lp supports the System V lp print mechanism. The
pcnfsd.lpr supports the Berkeley 4.3 lpr print mechanism. To enable
pcnfsd to be started during NFS initialization, the appropriate image
(pcnfsd.lp or pcnfsd.lpr) should be linked to /usr/ip32/nfs/pcnfsd.
The pcnfsd daemon is started from /etc/nfs. It reads the /etc/pcnfsd.conf
configuration file, if one exists, and then services RPC requests directed
to program number 150001. This release of the pcnfsd daemon supports
versions 1 and 2 of the pcnfsd protocol.
The requests serviced by pcnfsd cover three categories: authentication,
printing, and other. Only the authentication and printing services have
administrative significance.
Authentication
When pcnfsd receives a PCNFSD_AUTH or PCNFSD2_AUTH request, it will "log
in" the user by validating the username and password and returning the
corresponding uid, gids, home directory, and umask. At this time, pcnfsd
will also append a record to the /etc/wtmp database. To record PC
"logins" in this way, you should add a line with the following format to
the /etc/psnfsd.conf file:
wtmp yes
The /etc/pcnfsd.conf file is delivered with the value of wtmp set to "no."
Printing
The pcnfsd daemon supports a printing model that uses NFS to transfer the
actual print data from the client to the server. The client system issues
a PCNFSD_PR_INIT or PCNFSD2_PR_INIT request, and the server returns the
path to a spool directory which is exported by NFS and which the client
may use. The pcnfsd daemon creates a subdirectory for each of its
clients: the parent directory is normally /usr/spool/pcnfsd (for lpr) or
2/94 - Intergraph Corporation 1
pcnfsd(8) CLIX pcnfsd(8)
/usr/spool/lp/pcnfs (for lp) and the subdirectory is the hostname of the
client system. To use a different parent directory, add a line with the
following format to the /etc/pcnfsd.conf file:
spooldir path
Once a client has mounted the spool directory using NFS and has
transferred print data to a file in this directory, it issues a
PCNFSD_PR_START or PCNFSD2_PR_START request. The pcnfsd daemon handles
this, and most other print-related requests, by constructing a command
based on the printing services of the server operating system and
executing the command using the identity of the PC user. Since this
involves set-user-id privileges, pcnfsd must be run as root.
Every print request from the client includes the name of the printer that
is to be used. To pcnfsd, a printer appears as either a destination
serviced by the system print spooler, or as a virtual printer. Refer to
the lpadmin(8) or lpc(1) manual page for more information on setting up
the system print spooler to handle a new printer. Virtual printers, known
only to pcnfsd clients, are defined in the /etc/pcnfsd.conf file by a line
with the following format:
printer_name alias-for command
The printer_name parameter is the name of the printer you want to define.
The alias-for parameter specifies the name of a "real" printer which
corresponds to this printer. (You can define up to 16 virtual printers).
For example, a request to display the queue for printer_name will be
translated into the corresponding request for the printer alias-for. If
you have defined a printer in such a way that there is no "real" printer
to which it corresponds, use a single dash (-) for this field. (See the
example for printer "test" below.) The command parameter is a command that
will be executed whenever a file is printed on printer_name. This command
is executed by the Bourne shell, /bin/sh using the -c option. For complex
operations you should construct an executable shell program and invoke
that in command. Within command the following tokens will be replaced
dynamically by pcnfsd:
Token Substitution
$FILE Replaced by the full path name of the print data file. When the command has been
executed, the file will be unlinked.
$USER Replaced by the username of the user logged in to the client system.
$HOST Replaced by the host name of the client system.
$PRINTER Replaced by the real printer name.
Consider the following example /etc/pcnfsd.conf file:
2 Intergraph Corporation - 2/94
pcnfsd(8) CLIX pcnfsd(8)
printer aliasfuji fuji lpr -P fuji -J $USER -C $HOST $FILE
printer test - /usr/bin/cp $FILE /usr/tmp/$HOST-$USER
If a PC client system prints a job on the printer "aliasfuji," pcnfsd will
execute the specified print job on the printer "fuji." If the client
requests a list of the print queue for the printer "aliasfuji" the pcnfsd
daemon will translate this into a request for a listing for the printer
"fuji."
The printer "test" is used only for testing. Any file sent to this printer
will be copied into /usr/tmp. Any request to list the queue, check the
status, etc. of printer "test" will be rejected because the alias-for has
been specified as "-".
FILES
/etc/pcnfsd.conf Configuration file for pcnfsd.
/usr/spool/lp/pcnfs Spool directory for lp print requests.
/usr/spool/pcnfsd Spool directory for lpr print requests.
RELATED INFORMATION
Commands: lp(1), lpr(1), nfs(8), passwd(1)
2/94 - Intergraph Corporation 3