harrison@utfyzx.UUCP (03/06/87)
I posted this in comp.unix.questions a few days ago, and have received no replies. I have since tried similar commands on an AT&T 3B and did not duplicate the behaviour described below (which is maybe why nobody responded!). Thus it appears to be an HP-ism and I am reposting to comp.sys.hp. ----------------------------------------------------------------- The environment: UNIX V.2 on an HP9000/500 (Release 5.11 of HP-UX). The users: 1400 undergraduates in a Physics teaching lab. The problem: we have our mostly naive users running under rsh(1) for their and our protection. Whenever they send a job to lp(1) they get the message: sh: /dev/null restricted The output usually comes out of the printer (a QMS Postscript PS800+ connected to a serial line on a 27130A MUX) but the message is annoying. Sometimes nothing comes out of the printer but the Postscript file gets sent to the user's screen, which is more than annoying! Not knowing where this problem comes from, I'll try to be complete about our configuration below. I do know it is an artifact of rsh, because only rsh users get it. The port /dev/lp has been put to sleep by /etc/rc and then had its parameters set with a stty ... < /dev/lp. Lp(1) is suid to owner lp, /dev/lp is mode crw------- and owned by lp, /dev/null is rw by the world. Finally, the driver script in /usr/spool/lp/interface has the usual: for file in $files .. /usr/local/lib/psf < "$file" 2>&1 .. lines where `psf' handles Postscript end-of-job stuff (and also converts a file not beginning wth "%!" to Postscript, which is not relevant in this application). Any ideas on where this message comes from and how to get rid of it? Any help on why the file gets re-directed to /dev/tty on an apparently random basis? Thanks in advance. -- David Harrison, Dept. of Physics, Univ. of Toronto {ihnp4,utzoo}!utgpu!utfyzx!harrison