Handles service requests from PC-NFS (Personal Computers Network File System) clients.
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 /etc/pcnfsd.conf configuration file, if present, then services RPC requests directed to program number 150001. Once the rpc.pcnfsd daemon is started, all print requests go to the default print spooling directory (/var/spool/pcnfs).
When it receives a PCNFSD_AUTH or PCNFSD2_AUTH request, the rpc.pcnfsd daemon logs in a user by first validating the user name and password, and then returning the corresponding user ID (UID), group ID (GIDS), home directory, and umask specifications. A record of logins is appended to the /var/adm/wtmp file. To disable the login record feature, add the following line to the /etc/pcnfsd.conf file:
The rpc.pcnfsd daemon uses the Network File System (NFS) to transfer print data between clients and servers. The client system first issues a PCNFSD_PR_INIT or PCNFSD2_PR_INIT request. The server then returns a spool directory path for the client to use.
Note: The spool directory must be exported by NFS, using the exportfs command and the /etc/exports file.
The rpc.pcnfsd daemon creates a subdirectory for each of its clients. The default parent directory is /var/spool/pcnfs, and the subdirectory is the host name of the client system. To use a different parent directory, add the following line to the /etc/pcnfsd.conf file:
When the spool directory is mounted and the print data is transferred to a file in this directory, the client issues a PCNFSD_PR_START or PCNFSD2_PR_START request. The rpc.pcnfsd daemon handles this (and most other print-related requests) by constructing an enq command. The daemon adopts the identity of the personal computer user to execute the print request command. Since 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:
|$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.|
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.
|/etc/inetd.conf||Contains the TCP/IP configuration file that starts RPC daemons and other TCP/IP daemons.|
|/etc/pcnfsd.conf||Contains the rpc.pcnfsd daemon configuration file.|
|/var/spool/pcnfs||Contains the default print-spooling directory.|
The enq command, last command.
The inetd daemon.
The umask subroutine.
Network File System (NFS) Overview for System Management in AIX Version 4.3 System Management Guide: Communications and Networks.
Printer Overview for System Management in the AIX Version 4.3 Guide to Printers and Printing.
List of NFS Commands in AIX Version 4.3 System Management Guide: Communications and Networks.