SUMMARY2: lpr on Solaris 2.3

From: David Bailey (david.bailey@aea.orgn.uk)
Date: Wed Aug 24 1994 - 21:53:36 CDT


I have received quite a few replies since I posted the summary, so here's
an update.

Original query:
>Has anyone managed to get lpr working for local printers on Solaris 2.3? I am
>using the 4.3BSD-reno system (lpr-sol2.tar.gz from solomon.technet.sg), as
>described in the comp.answers Solaris2 FAQ.
>
>lpd seems to be misreading the printcap file and giving random error messages,
>such as 'unknown printer' and 'bind: Cannot assign requested address', for a
>printcap file that works on Solaris1.

Some people misunderstood what I was trying to do and thought that I just
could not get the lp print system to work. What I was actually tring to do was
set up the Solaris 2 machine to run lpd and attach a local printer so that
other BSD systems could print to it using lpr. The key point is that the
Solaris 2 machine must be running lpd.
I have given up trying to do this and have substituted a Solaris 1 machine
instead. However, some of the replies I received since posting the summary
look promising and I may try them at some point (but not in the near future!)
I have included the relevant replies below.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: jason andrade <jason@ctpm.uq.oz.au>
you could try using the lpr from ftp.bond.edu.au. It works under solaris.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: sandi@cs.uct.ac.za (Sandi Donno)
I don't have the time to give you diffs right now, but I
can give you the whole source directory. There are still a few problems, lprm
and lpc sometimes dump core but I haven't had the time to look into it.
I would appreciate it if you could provide a clean set of diffs for
distribution. I think I have marked all my changes with the comment
/* SLD */, but check against the original to make sure. You can find my
hacked lpr-sol2.3.tar.gz on ftp.cs.uct.ac.za in ~ftp/pub/local.

I took various sets of sources - a version by David J Hughes
(bambi@Bond.edu.au) on which I based the final product - sorry, I don't have
the name of the original tar file but it is somewhere on bond.edu.au - problem
with this that there was no code for local printers but otherwise it was an
excellent starting point - better than lpr-sol2. I diffed it with lpr-sol2
and patches by James Clark (jjc@jclark.com) which came with his package
lprps, and fixed a bug or two I found, and came up with an lpd that did
everything for me - including 38400 baud rate for a local serial printer.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: wib@cs.uni-kiel.de (Willi Burmeister)
I have a working version of a lpd system runing on my Solaris 2.3 machine.
It's from David J. Hughes (bambi@Bond.edu.au). This lpd compiles and works
fine. You can get it from our FTP-Server:

ftp://ftp.informatik.uni-kiel.de/systems/sun/solaris/lpd.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: Hiroshi NAKANO <nakano@whale.math.ryukoku.ac.jp>
Try ftp.ryukoku.ac.jp:~ftp/Ryukoku/software/svr4-port/lpr-BNR2-svr4.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: Dan Stromberg - OAC-DCS <strombrg@bingy.acs.uci.edu>
The version that's mentioned in the FAQ, has a bad heisenbug (stray
pointer reference, the behavior of which changes when you change the
code to observe the nature of the bug).

The version that was ported by a fellow named "Bambi", appears to have
the same bug. They probably started from the a common set of sources
at some point.

I had good luck with Bambi's (original) system for a while, but
eventually, it stopped parsing printcaps correctly, just like the one
mentioned in the FAQ.

{Dan is working on his own implementation at the moment}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: Dave Alden <alden@math.ohio-state.edu>

I began to have problems with the newest version. I just gave up and switched
over to using the System 5 printing system. :-(

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: Justin Mason <jmason@iona.ie>

I don't get much chance to read news these days, but if you want a decent
LPD/LPR implementation for Solaris (or SunOS, HP/UX, IRIX, Linux and A/UX),
go for PLP . It's available from ftp.iona.ie:/pub/plp . It's also got
some incredibly useful documentation. I've appended a features list.

This is a portable, reliable implementation of the BSD Line Printer
Spooler (LPD) system. Some features that improve on most BSD LPD
implementations:

* Configurability: a configuration file is used, and additional
    features are turned on or off from there; additional configuration
    files are also specified there. See the file "examples/plp.conf.nfs"
    for a sample configuration file.

* The PLP software can be used with NFS spool directories,
    in which there is a common set of spool queues, as well as the
    usual environment where each host transfers print jobs to a
    common host.

* printcap entries are taken from more than one file; a set of files
    can be listed, with the earliest matching entry being used. This,
    in conjunction with a plp.conf file and NFS spool queues,
    greatly simplifies spooler administration in a networked environment.

* The EUCS PLP functionality has been integrated, including:

* printcap lookups can use Hesiod and NIS databases instead of files.

* "Cost codes", job move, extended job size limitation functionality,
    job hold, minimum free space maintenance, forms, queue rerouting.
    See doc/README.Edinburgh for more details.

* The PLP daemon can run from inetd, resulting in reduced virtual
    memory usage and more reliability at the expense of request
    turn-around time.

* TCP/IP sockets can be used as line printer devices, allowing
    printers to be connected to terminal servers, and allowing use
    of recent HP LaserJet printers' MIO interfaces. Ditto for
    Annex ports.

* Input-filters can be used in a remote-printer printcap entry,
    ie. one where the file is forwarded to another host for printing.

* Extremely verbose and chatty error messages have been added. These
    greatly ease debugging and installation. In addition, the
    "checkpc" utility can be used to set file permissions and other
    items for use by the PLP software. The PLP daemon can also fix
    some common permissions problems on-the-fly.

* Security: environment variables are completely sanitized before exec()s.

* Security: lpd will check any command lines before exec()ing, logging
    an error message if shell metacharacters are embedded in them.

* Security: PLP is immune to the security hole described in
    8lgm advisory 3.

* Security: "root" and "daemon" permissions are used only when
    they are explicitly needed.

* Access and permission to use PLP functions is controlled by
    entries in a printer permissions file which can restrict use by
    user name, host, spooler, page useage, and a host of other
    factors. The printcap file is used to specify the printer queues
    and their operation.

* Jobs can now be prioritized. The maximum priority a user can

* In addition to the general printer permissions file, each spool
    queue can have its own additional printer permissions file.

* Line printer control functions can be exercised from a remote host.
    Hosts and users with remote control permissions are specified
    by entries in the printer permissions file.

* The unspooling of jobs can be performed by a user defined program,
    rather than the spooler. This allows the spooler to be used to
    send jobs to remote sites using various file transfer protocols.

* remote-printer sequences ("rm", "rp" printcap entries) with more
    than two entries are possible.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

From: Peter Dalgaard SFE <pd@kubism.ku.dk>
Got things working here. You definitely need the -p2 version.
Also, check that the LP system is not running at the same time
or the two systems will fight over the printer port. Had the
unknown printer msg for a while, because someone had defined a
printer on workstation as remote on the server which had no such
thing. Fixing the workstation cleared that up.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thanks also to:

jws@cellnet.com (Jim Seavey)
epl@Kodak.COM (Gene Loriot (epl@kodak.com))
pasken@newton.slu.edu (Robert Pasken)
Yeo Ann Kian <yeoak@iscs.nus.sg>

------------------------------------------------------------------------
| From: David Bailey | Email: david.bailey@aea.orgn.uk |
| At: CFDS | Tel: +44 (0)235 432670 |
| AEA Technology | Fax: +44 (0)235 436671 |
| 8.19 Harwell | |
| Oxon | |
| OX11 0RA | |
| UK | |
------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:08 CDT