[comp.sys.sun] lprm problem

kerry@teb.larc.nasa.gov (Kerry Gough) (04/27/89)

Hi, folks!!

I have a question regarding the use of "lprm". We are running SunOS 3.5 on
a 3/160 server with five (5) 3/50s as diskless clients. Since our major
application is document processing (using TeX), we have a variety of
output devices: a 300dpi laser printer, a 600dpi laser printer, and a
high-resolution phototypesetter. In addition, we are in the process of
purchasing a new typesetter sometime in the (hopefully) near future (if we
can ever get through the NASA red tape involved...). Since the 3/160 only
has two serial ports, our third output device, the 600dpi printer, is
hanging off a serial port on one of our clients, and the new typesetter
will most likely be connected in the same way. Naturally, the devices are
declared as remote printers in the printcap entries on each of the
clients, with the proper host specified for each device.

Here's the problem we're having: 

If someone on one of the clients prints something out, and then realizes
they have made a mistake, they try to use "lprm" to remove the file from
the queue, only to receive an error message saying "permission denied".
Apparently, since the file has been transferred to the queue of another
machine, they can't remove it from the queue. However, if they rlogin to
the host machine for the printer and run lprm from there, they still get
"permission denied" errors, apparently because the files were sent from
another machine. This even happens if I change to super-user and run
lprm!!  The only way I have been able to remove these jobs from the queue
is to log in as super-user, change to the spool directory for the device,
and physically remove the data and control files from the directory.
Obviously, my users can't do this, and we end up wasting a lot of paper
and computer time printing out jobs that we already know are wrong. Or,
they have to get me to kill them using the brute-force method I have
described, which interrupts whatever important work I'm doing (mahjongg,
sdi, hack, etc.). 

Does anyone know of a way to allow the users to use lprm on a remote printer?

Also, I'd really prefer having all my peripherals connected to the server.
Does anyone know if Sun (or someone else) makes a board with just a
handful of serial ports on it?

Thanks, 
Kerry

Kerry M. Gough
NASA-Langley Research Center
Mail Stop 149
Hampton VA 23665
(804)864-2496

email: kerry@teb.larc.nasa.gov

[[ Classic problem.  The primary name for a host in /etc/hosts and the
kernel host name set by "hostname" must be the same for lprm to work
correctly.  The client sends it's hostname (from the kernel call
"hostname") as part of the queued file name to the server.  But for lprm
all the checking is done on the server's end:  it builds the file name
from the number and the *primary* name of the requesting host.  Some
sites use a nick name for "hostname", thus the problem.  This may have
been fixed under 4.0, but I'm not sure.  "hostname" should really return
the primary name anyway.  If anyone sets their prompts from "hostname",
tell them to use "basename" to strip off the domain part of the name.
--wnl ]]