[comp.unix.questions] Need help with lp spooling problem

sscott@camdev.UUCP (Steve Scott) (02/28/90)

Yesterday, I submitted the following description of a problem:


      After updating my operating system(s) from HP/UX 6.5 to HP/UX 7.0
      (on HP9000 3x0 boxes), the following scenario occurs:
      
      I have a machine (say cammax) which does not have a laser printer
      connected to it.  But I do have a machine (say camdev) which does.
      
      On cammax, I put a script in /usr/spool/lp/model which contained
      the following pertinent line
      
      cat $file | remsh camdev lp
      
      (remsh is HP's rsh (remote shell command))
      
      Under 6.5, this worked just fine.
      
      But, under 7.0, the weirdness begins:
      
      On cammax, if I type 
      
          cat file_name | remsh camdev lp
      
      everything works just fine (like it did under 6.5)
      
      BUT:
      
      if I say lp file_name (on cammax), nothing prints on camdev.
      
      I have traced the problem this far:
      
      When the remsh is performed on cammax (by hand), the temporary files 
      on camdev (the cAxxxxcamdev and dAxxxxcamdev ones in 
      /usr/spool/lp/request/lp) have permission 400 and owner = lp (grp = bin).
      
      When the remsh is performed on cammax (via the script), the files reach
      camdev BUT the cAxxxxcamdev file has permission 400 and owner = root
      
      It appears that this causes the error:
      
      "lpsched: cannot open and lock file cAxxxxcamdev"
      
      
      So:  1)  why did this work under 6.5 and not HP/UX 7.0:
      
      AND
       
           2)  why would the owner on the temp files be lp when remsh
               executed interactively and the owner on the temp files
               be root when executed via the script?
      
      I guess I oughta tell you that I am logged in as sscott (for example),
      so the owner of the file in neither case has the same owner as the
      person logged in at the time of invocation
      
The thought(s) for today:

I have figured out a little something about this problem:

On cammax if I do (interactively)

      cat $file | remsh camdev lp

then the cAxxxxcamdev file is (owner = lp, group = bin) and all
goes well.  So, how did the owner of the cA file go from sscott to
lp?  I'm not gonna question that - it works!  (8-))

On cammax if the following is done from the lp model

      cat $file | remsh camdev lp

then the cAxxxxcamdev file is (owner = root, group = bin) and I get
the failure mode as described above

I have also noticed that if I do the following interactively:

      cat $file | remsh camdev -l lp lp

then I get the same resulting (NOT acceptable) operation


Okay, so I have discovered that when user lp puts stuff into the spooler on
camdev, the system breaks down.  Why does a user lp have the cAxxxxcamdev
and the dAxxxxcamdev files changed to (owner = root)?

Any ideas?




-- 
Steve Scott            UUCP: {texbell|texsun}!csccat!camdev!sscott
Motorola, Inc.         Internet : sscott@mot.com  Telephone : 1-817-232-6317