rpc.pcnfsd Daemon

Purpose

Handles service requests from PC-NFS (Personal Computers Network File System) clients.

Syntax

/usr/sbin/rpc.pcnfsd

Description

The rpc.pcnfsd daemon handles requests from PC-NFS clients for authentication services on remote machines. These services include authentication for mounting and for print spooling. The PC-NFS program allows personal computers running DOS to be networked with machines running NFS. The rpc.pcnfsd daemon supports Versions 1 and 2 of the pcnfsd protocol.

When a PC-NFS client makes a request, the inetd daemon starts the rpc.pcnfsd daemon (if the inetd.conf file contains the appropriate entry). The rpc.pcnfsd daemon reads the umaskspecifications. A record of logins is appended to the exportfs command and the enq command. The daemon adopts the identity of the personal computer user to execute the print request command. Because constructing and executing the command involves user ID privileges, the rpc.pcnfsd daemon must be run as a root process.

All print requests from clients include the name of the printer to be used. The printer name is represented by queue and device definitions in the /etc/qconfig file. Additionally, the rpc.pcnfsd daemon provides a method for defining PC-NFS virtual printers recognized only by rpc.pcnfsd clients. Each PC-NFS virtual printer is defined in the /etc/pcnfsd.conf file with a line similar to the following:

printer Name AliasFor Command

In this format, Name specifies the name of the printer to be defined, and AliasFor is the name of the existing printer that will do the work. For example, a request to show the queue for Name translates into a queue command on the AliasFor printer. To define a printer Name with no existing printer, use a single - (minus sign) in place of the AliasFor parameter. The Command parameter specifies a command run when a file is printed on the Name printer. This command is executed by the Bourne shell, using the -c option. For complex operations, replace the Command parameter with an executable shell script.

The following list of tokens and substitution values can be used in the Command parameter:

Token Substitution Value
$FILE The full path name of the print data file. After the command has executed, the file is unlinked.
$USER The user name of the user logged-in to the client.
$HOST The host name of the client system.

Examples

The following example /etc/pcnfsd.conf file configures a virtual printer on the first line and a null device for testing on the second line:

printer rotated lw /bin/enscript -2r $FILE
printer test - /usr/bin/cp $FILE /usr/tmp/$HOST-$USER

The first line stipulates that if a client system prints a job on the rotated printer, the enscript utility is called to preprocess the $FILE file. The -2r option causes the file to be printed in two-column, rotated format on the default PostScript printer. If a client requests a list of the print queue for the rotated printer, the rpc.pcnfsd daemon translates this request into a request for a similar listing for the lw printer.

The second line establishes a printer test. Files sent to the test printer are copied into the /usr/tmp directory. Requests to the test printer to list the queue, check the status, or perform similar printer operations, are rejected because - (minus sign) is specified in place of the AliasFor parameter.

Files

Item Description
/etc/pcnfsd.conf Contains the rpc.pcnfsd daemon configuration file.
/var/spool/pcnfs Contains the default print-spooling directory.