pcnfsd(8) pcnfsd(8)
NAME
pcnfsd - PC-NFS authentication and print request server
SYNOPSIS
/usr/sbin/rpc.pcnfsd
DESCRIPTION
pcnfsd is an RPC server that supports ONC (Open Network Computing)
clients on PC (DOS, OS/2, Macintosh, and other) systems. This page
describes version two of the pcnfsd server.
rpc.pcnfsd can be started from /etc/rcX.d/SYYnfs. It reads the confi-
guration file /etc/pcnfsd.conf if present, and then services RPC
(Remote Procedure Call) requests directed to program number 150001.
This release of the pcnfsd daemon supports both version 1 and version
2 of the pcnfsd protocol.
AUTHENTICATION
When pcnfsd receives a PCNFSDAUTH or PCNFSD2AUTH request, it "logs
in" the user by validating the username and password and returning the
corresponding uid, gids, home directory, and umask.
By default, pcnfsd only allows authentication requests for users with
uids in the range 101 to 60002. (This corresponds in SVR4 to the range
for non-system accounts.) To override this, add the following line
uidrange range[,range] ...
to the /etc/pcnfsd.conf file. Here, each range is of the form
uid
or
uid-uid
indicating an inclusive range.
PRINTING
pcnfsd supports a printing model based on the use of NFS to transfer
the actual print data from the client to the server. The client system
issues a PCNFSDPRINIT or PCNFSD2PRINIT request, and the server
returns the path to a spool directory which the client may use and
which is exported by NFS. pcnfsd creates a subdirectory for each of
its clients: the parent directory is normally /var/spool/pcnfs and the
subdirectory is the hostname of the client system. If you wish to use
a different parent directory, add the following line
spooldir path
to the /etc/pcnfsd.conf file.
Page 1 Reliant UNIX 5.44 Printed 11/98
pcnfsd(8) pcnfsd(8)
Once a client has mounted the spool directory using NFS and has trans-
ferred print data to a file in this directory, it will issue a
PCNFSDPRSTART or PCNFSD2PRSTART request. pcnfsd 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
which is to be used. If you wish to define a non-standard way of pro-
cessing print data, you should define a new printer and arrange for
the client to print to this printer. This is outside the scope of this
discussion. In addition, pcnfsd includes a mechanism by which you can
define virtual printers known only to pcnfsd clients. Each printer is
defined by entering the following line in the /etc/pcnfsd.conf file:
printer name alias-for command
name is the name of the printer you want to define. alias-for is the
name of a "real" printer which corresponds to this printer. For exam-
ple, a request to display the queue for 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 "-" for this field. (See the defin-
ition of the printer "test" below for an example.) command is a com-
mand which is executed whenever a file is printed on name. This com-
mand 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:
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.
$OPT Replaced by the options given from the client system.
Page 2 Reliant UNIX 5.44 Printed 11/98
pcnfsd(8) pcnfsd(8)
Consider the following example /etc/pcnfsd.conf file:
printer rotated lw /usr/local/bin/enscript -2r $FILE
printer test - /usr/bin/cp $FILE /usr/tmp/$HOST-$USER
If a client system prints a job on the printer "rotated" the utility
enscript will be invoked to pre-process the file $FILE. In this case,
the -2r option causes the file to be printed in two-column rotated
format on the default PostScript printer. If the client requests a
list of the print queues for the printer "rotated", the pcnfsd daemon
translates this into a request for a listing for the printer "lw".
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 "-". In order to make this printer
known to the PC, it is necessary to create a subdirectory of the
/etc/lp/printers directory with the same name as the printer. In this
case, therefore, the directory will be /etc/lp/printers/test.
RECONFIGURATION
pcnfsd will detect when printers are added or deleted and will rebuild
its list of valid printers. To do this, it checks the modification
time of /etc/lp/printers. However, it does not monitor the file
/etc/pcnfsd.conf for updates; if you change this file, it is still
necessary to kill and restart pcnfsd in order that the changes can
take effect.
FILES
/etc/pcnfsd.conf
SEE ALSO
lp(1), lpstat(1).
Page 3 Reliant UNIX 5.44 Printed 11/98