[comp.unix.admin] remote printing from HP Unix system

heiser@tdw206.ed.ray.com (Bill Heiser - Unix Sys Admin) (05/31/91)

I have a user using an HP Unix system, trying to print remotely
either using lp or lpr to a Sun system.  The print jobs get lost
in the bit bucket.  The lpstat command on the HP shows the jobs
in the queue, but then they disappear.  They never show up on the
Sun system.

The HP system is something I don't usually deal with, hence I'm not
sure what to check.  Is there something like "sysadm" or some other
tool I should use to check this?  I see there isn't a printcap file
either.

Thanks in advance for any advice on this.

Bill

-- 
Work: heiser@tdw201.ed.ray.com
      ...!{decuac,necntc,uunet}!rayssd!tdw201.ed.ray.com!heiser
Home: bill@unixland.natick.ma.us     -or-   bill@unixland.uucp
...!uunet!{think,world}!unixland!bill 508-655-3848 Public Access Unix, USENET

paul@prcrs.prc.com (Paul Hite) (06/04/91)

In article <3882@tdw206.ed.ray.com>, heiser@tdw206.ed.ray.com (Bill Heiser - Unix Sys Admin) writes:
> I have a user using an HP Unix system, trying to print remotely
> either using lp or lpr to a Sun system.  

Well, for starters, how was the printer definition set up on the hp?  It's easy
to get it wrong.  Since it isn't working anyway, try removing and re-adding it:

	#! /bin/sh
	HOST=<name of remote host goes here>
	PRINT=<name of printer on remote host goes here>
	HPPRINT=<name of printer on hp system goes here>
	/usr/lib/lpshut
	/usr/lib/lpadmin -x$HPPRINT
	/usr/lib/lpadmin -p$HPPRINT -mrmodel -v/dev/null -ocmrcmodel \
		-osmrsmodel -orm$HOST -orp$PRINT -ob3
	# assuming that HPPRINT should be the default printer:
	/usr/lib/lpadmin -d$HPPRINT
	/usr/lib/lpsched

The syntax is very picky.  Do not introduce any spaces in the above commands.

If it still doesn't work, look in /usr/spool/{log,lpd.log} to see there are
any useful messages.  You can get more stuff in lpd.log by adding a -l to the
invocation of rlpdaemon.  This might be in /etc/rc or /etc/inetd.conf.

If you don't see any errors on the hp side I would suspect the sun.  I'm not
familiar with suns, but we have remote printed from hp's to ultrix boxes and
vice versa.

I have never seen the symptom of print jobs just disappearing.  I hope you 
post a followup when you track it down.  Good luck.

Paul Hite   PRC Realty Systems  McLean,Va   paul@prcrs.prc.com    (703) 556-2243
        You can't tell which way the train went by studying its tracks.

ct1x+@andrew.cmu.edu (Ching-Ping Tseng) (06/20/91)

Excerpts from netnews.comp.unix.admin:

> 4-Jun-91 Re: remote printing from HP..  Paul Hite@prcrs.prc.com (1531)}
> 
> In article <3882@tdw206.ed.ray.com>, heiser@tdw206.ed.ray.com (Bill Heiser -
> Unix Sys Admin) writes:
> 
> > I have a user using an HP Unix system, trying to print remotely
> > either using lp or lpr to a Sun system.  
> 
> Well, for starters, how was the printer definition set up on the hp?  It's
> easy to get it wrong.  Since it isn't working anyway, try removing and
> re-adding it:
> 
> 	#! /bin/sh
> 	HOST=<name of remote host goes here>
> 	PRINT=<name of printer on remote host goes here>
> 	HPPRINT=<name of printer on hp system goes here>
> 	/usr/lib/lpshut
> 	/usr/lib/lpadmin -x$HPPRINT
> 	/usr/lib/lpadmin -p$HPPRINT -mrmodel -v/dev/null -ocmrcmodel \\
> 		-osmrsmodel -orm$HOST -orp$PRINT -ob3
> 	# assuming that HPPRINT should be the default printer:
> 	/usr/lib/lpadmin -d$HPPRINT
> 	/usr/lib/lpsched
> 
> 


I am a novice system adminstration assistant.  We have the same requirment of
printing from HP 9000/320s (running HP-UX 7.0, old...) to an APPLE LaserWriter
IINTX connected to a SUN 3/60 (runing SunOS 4.1.0) via RS-232.  Thanks to the
response given by paul@prcrs.pre.com, we can do the printing too now.

However, there is one further question: The printing can be transmitted
successfully to SUN only if it is sent by root.  Every other user receives
this message:
	% lp /etc/mklp (or whatever the file is)
	lp: Unable to set the effective group id to 10 (or the user's GID)

The lpstat works fine in all cases.  It's obvious that lp can not set gid on
execution.  But I've checked the permission mode, owner and group of all the
related files and they all match the description in /etc/mklp.  Can someone
give me a hint where else to look at?

Thanks in advance.

--- Robert Tseng
    CADLab Assistant 
    Department of Architecture	
    Carnegie Mellon University
    ct1x+@andrew.cmu.edu
    Tel: (412) 268-3596

P.S. We have YP running on all the machines and the /etc/passwd and /etc/group
     on HPs look like this:
	/etc/passwd:
		root:sCsHc60pR8aJE:0:0::/:/bin/csh
		daemon:*:1:5::/:/bin/sh
		bin:*:2:2::/bin:/bin/sh
		adm:*:4:4::/usr/adm:/bin/sh
		uucp:*:5:3::/usr/spool/uucppublic:/usr/lib/uucp/uucico
		lp:*:9:7::/usr/spool/lp:/bin/sh
		+::0:0:::

	/etc/group:
		root::0:
		other::1:
		bin::2:root,bin,lp
		sys::3:
		adm::4:
		daemon::5:
		mail::6:
		lp::7:
		+:

[/usr/bin]
-r-sr-sr-x   1 lp       bin        66876 Jan 16  1990 cancel*
-r-sr-sr-x   1 lp       bin        60808 Jan 16  1990 disable*
-r-sr-sr-x   1 lp       bin        26472 Jan 16  1990 enable*
-r-sr-sr-x   1 lp       bin        94208 Jan 16  1990 lp*
-r-sr-sr-x   1 root     bin       102400 Jan 16  1990 lpalt*
-r-xr-xr-x   1 bin      bin          608 Jan 16  1990 lpr*
-r-sr-sr-x   1 lp       bin       110592 Jan 16  1990 lpstat*
[/usr/lib]
-r-sr-sr-x   1 root     bin       122880 Jan 16  1990 lpsched*
-r-sr-sr-x   1 root     bin        98304 Oct 12  1989 rcancel*
-r-sr-sr-x   1 root     bin        62460 Oct 12  1989 rlp*
-r-sr-sr-x   1 root     bin       118784 Oct 12  1989 rlpdaemon*
-r-sr-sr-x   1 root     bin        81752 Oct 12  1989 rlpstat*
-r-sr-sr-x   1 root     bin        54412 Jan 16  1990 rwrite*
-r-sr-sr-x   1 lp       bin        54476 Jan 16  1990 accept*
-r-sr-sr-x   1 lp       bin        80588 Jan 16  1990 lpadmin*
-r-sr-sr-x   1 lp       bin        56520 Jan 16  1990 lpfence*
-r-sr-sr-x   1 lp       bin        60256 Jan 16  1990 lpmove*
-r-sr-sr-x   1 lp       bin        52040 Jan 16  1990 lpshut*
-r-sr-sr-x   1 lp       bin        54928 Jan 16  1990 reject*
[usr/spool/lp]
drwxr-xr-x  15 lp       bin         1024 Jun 19 21:42 ./
drwxr-xr-x   2 lp       bin         1024 Jun 19 13:24 class/
drwxr-xr-x   2 lp       bin         1024 Jun 19 16:45 interface/
drwxr-xr-x   2 lp       bin         1024 Jun 19 16:45 member/
drwxr-xr-x   5 lp       bin         1024 Jun 19 16:45 request/
drwxr-xr-x   2 lp       bin         1024 Jun 19 16:45 cinterface/
drwxr-xr-x   2 lp       bin         1024 Sep 15  1989 cmodel/
drwxr-xr-x   2 lp       bin         1024 Jun 19 16:45 sinterface/
drwxr-xr-x   2 lp       bin         1024 Sep 15  1989 smodel/
-rw-r--r--   1 lp       lp          2268 Jun 19 21:34 pstatus
-rw-r--r--   1 lp       lp           564 Jun 19 16:45 qstatus
[/usr/spool/lp/model]
-r-sr-sr-t   1 lp       bin         4432 Oct 12  1989 model/rmodel*

darcy@druid.uucp (D'Arcy J.M. Cain) (06/21/91)

In article <gcMBnX600VoTE_bkVj@andrew.cmu.edu> Ching-Ping Tseng writes:
>Excerpts from netnews.comp.unix.admin:
>> 4-Jun-91 Re: remote printing from HP..  Paul Hite@prcrs.prc.com (1531)}
>> > I have a user using an HP Unix system, trying to print remotely

etc.

I don't know if this is exactly what you need but Greg Woods (woods@robohack)
and I have put together a remote printing facility using UUCP which works
quite well.  In fact I have two jobs being directed to a client's printer
as I write this.  The idea is to keep the standard printer semantics as
local printers.  Here is a sample command

  sort file_name | pr -f | lp -d lp5

where 'lp5' is actually at another site connected by UUCP.  I suppose you
could even make the remote printer the default printer.

The file is compressed before it is sent to the remote system but if you
were to do:

  lp -d lp5 file.Z

it recognizes it (through a change to /etc/magic, not by noticing the .Z
extension) as a compressed file and skips that stage.

I will post the script to alt.sources today.  We call it rprint.

Printer 'bdg' is actually on a syste
-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   There's no government
Toronto, Ontario, Canada           |   like no government!
+1 416 424 2871                    |

paul@prcrs.prc.com (Paul Hite) (06/23/91)

In article <gcMBnX600VoTE_bkVj@andrew.cmu.edu>, ct1x+@andrew.cmu.edu (Ching-Ping Tseng) writes:
> 
> However, there is one further question: The printing can be transmitted
> successfully to SUN only if it is sent by root.  Every other user receives
> this message:
> 	% lp /etc/mklp (or whatever the file is)
> 	lp: Unable to set the effective group id to 10 (or the user's GID)
> 
> The lpstat works fine in all cases.  It's obvious that lp can not set gid on
> execution.  But I've checked the permission mode, owner and group of all the
> related files and they all match the description in /etc/mklp.  Can someone
> give me a hint where else to look at?

I had never looked at /etc/mklp before now.  That script (as supplied by hp)
has errors.  It has set some of your permissions wrong!

> [/usr/bin]
> -r-sr-sr-x   1 lp       bin        94208 Jan 16  1990 lp*

lp should be owned by root.  I made lp owned by lp on prcrs and got the error
that you are getting.  chown it back to root.  All together you seem to have 
the wrong permissions on three files.  Here is an ls -l showing the correct
permissions:

-r-sr-xr-x   1 root     bin       126976 Jan 18  1990 /usr/bin/lp
-r-sr-xr-x   1 root     bin       118784 Jan 18  1990 /usr/lib/lpadmin
-r--r--r--   1 bin      bin         4432 Oct 12  1989 /usr/spool/lp/model/rmodel

Paul Hite   PRC Realty Systems  McLean,Va   paul@prcrs.prc.com    (703) 556-2243
    "We are trying to bring up an Air Traffic Control display on an X window 
      terminal and there seems to be some problems." -- from comp.windows.x