.NH 1
Printcaps and CHECKPC
.PP
The
.L checkpc
program can be used to validate printcap entries
and to set permissions and ownerships on the various printcap files.
The following is a set of exercises intended to show the
use of the checkpc program.
.Np
Stop the lpd server by sending it a kill signal.
A quick method of doing this is:
.DS
.L
kill `ps -aux |grep lpd | awk '{print $2 }'`
.DE
.Np
Run the
.L checkpc
program.
The following is typical output.
.DS
.L
 LPRng version LPRng-2.2.0
 Get_perms: permissions file '/tmp/LPD/lpd.perms.taco.sdsu.edu'
 Printcap file '/tmp/LPD/printcap.taco.sdsu.edu'
 Printcap file '/tmp/LPD/lpd_printcap.taco.sdsu.edu'
 LPD lockfile '/tmp/LPD/lpd.lock.taco.sdsu.edu'
   checking file '/tmp/LPD/lpd.lock.taco.sdsu.edu'
 t1: Checking printcap entry 't1'
 t1:   checking file '/tmp/LPD/t1/control.t1'
 t1:   checking file '/tmp/LPD/t1/status.t1'
 t1:   checking file '/tmp/LPD/t1/log'
 t1:   checking file '/tmp/LPD/t1/accnt'
checkpc: Warning - permissions of '/tmp/LPD/t1/cfA001taco' are 0644, not 0600
 t1: Checking log file '/tmp/LPD/t1/log'
 t1:    log file 12060 bytes long: no truncation
.DE
.Np
Now try using the 
.L -f
(fix) option
to set permissions and ownership.
.DS
.L
checkpc -f
.DE
.PP
Permissions and ownership will be corrected. 
.Np
As the lpd server executes,
it will put output into log,
status,
and accounting files in the spool directory.
The
.L "checkpc -t "
.I size
command will truncate these files to
.I size
bytes.
For example,
.L "checkpc -t 2k"
truncate these files to less than 2K bytes.
Use this command to truncate the log files.
