From: aldrich@leland.Stanford.EDU (Jeff Aldrich)
Subject: can't print to sparcprinter from remote hosts
Keywords: sparcprinter, newsprint
Organization: Stanford University
Date: Wed, 9 Sep 92 19:16:04 GMT

I am in a state of total confusion with a SPARCprinter installation.
I have a (hopefully) vanilla setup consisting of Sun printer, NP 2.0
and OW3 on an IPX running 4.1.1b.  It works fine.

The print host is one of several NIS clients that are configured in a
similar manner.  None of the other clients in this domain is able to
print to the SPARCprinter.  However, all of these clients are able to
print to any of several other printing devices via rm/rp on a
different server.  All of these other printers are LaserWriters on
LocalTalk net, not directly connected to a UNIX host.

One other machine in the local domain *is* able to print to the Sp: it
is the NIS master, and also the spooling host for all other printers.
Printcap isn't part of the NIS maps in this domain.

Spooldir organization is of the form /var/spool/lpd/<printer_name> on
all machines except for the Sp spooling host, where there is a link
/var/spool/lpd/leroy -> /usr1/spool/lpd/leroy.  Setup to accomodate the newly-arrived printer was the same on all machines, limited to creating
the local spool dir, editing /etc/printcap, and restarting lpd.  

Local printcap entry:

leroy|Leroy|LEROY|leroy, a SPARCprinter:\
	:lp=/dev/lpvi0:\
	:sd=/usr1/spool/lpd/leroy:\
	:lf=/usr1/spool/lpd/leroy/log:\
	:af=/usr1/spool/lpd/leroy/acct:\
	:if=/usr/newsprint/lpd/if:\
	:gf=/usr/newsprint/lpd/gf:\
	:nf=/usr/newsprint/lpd/nf:\
	:tf=/usr/newsprint/lpd/tf:\
	:rf=/usr/newsprint/lpd/rf:\
	:vf=/usr/newsprint/lpd/vf:\
	:cf=/usr/newsprint/lpd/cf:\
	:df=/usr/newsprint/lpd/df:\
	:of=/usr/newsprint/lpd/of:\
	:mx#0:\
	:sf:\
	:sh:

Remote printcap entry, identical on all machines:

leroy|Leroy|LEROY|leroy, a SPARCprinter:\
        :lp=:rm=sprocket:rp=leroy:sd=/var/spool/lpd/leroy:\
        :lf=/var/spool/lpd/leroy/errs:

This works on a 4/330 NIS server running SunOS 4.1.1, and fails on
4/{40,50,65,75,260,670MP} clients running SunOS 4.{1,1.1,1.1b,1.2}.
The failure mode: a print job's cf and df files are placed in
/var/spool/lpd, and not in /var/spool/lpd/leroy.  Once there, they are
recognized by lpq and removable with lprm, but are never shipped off
to the printer host.

Lots of more-or-less silly attempts to remedy include manually
depositing the cf and df files where they ought to be, redirecting all
print jobs to the 4/330 that *is* able to use the printer, checking
and adjusting permissions and ownerships everywhere, trying
alternative release levels of lpr and lpd, reducing printcap to a
single entry referring to the SPARCprinter, and so on and on and on.
So why does lpr (I guess) insist on using its default spooling dir,
instead of the one defined in the printcap?  Why does lpq inform me
that there is no daemon present, when in fact there is?

As further grist, probably related but I don't know how: after
rebooting two of the clients-that-can't-print, lpc on those two hosts
informs me that every single printer *except* the new SPARCprinter is
"unknown".  These two machines are a 4/65-4.1 and a 4/670-4.1.2.  Both
machines continue unable to print to the SPARCprinter, of course.

Although I'm reasonably certain that, after having been examined by
two independent judges for over six hours, at least permissions and
ownerships are correct, I would be happy to provide further info in
that regard to anyone who thinks it might be interesting.  Ditto
checksums, dates of manufacture, etc., for relevant binaries, output
from trace, whatever.  Thanks, in profusion, for any insight.

................................................
 Jeff Aldrich    <aldrich@sunrise.Stanford.EDU>
 R&D Engineer    Center for Design Research
                 Stanford University
Newsgroups: comp.sys.sun.misc