Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Network Printers on SCO ENTERPRISE 5.xx 1

Status
Not open for further replies.

joemama613

IS-IT--Management
May 14, 2003
66
0
0
US
I have a few network printers connected that many people print to. Every once in a while (more often than I would like), a network printer will no longer print. When I go to the Print Job Manager in SCOADMIN, I will see multiple jobs backed up to the printer in question. When I delete all waiting jobs, the printer is fine until the next time this happens. The exact problem happens with at least two printers. Can you help?
 
Which printing method (hpnp or lpr/lpd) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You may try to stop/restart the lpd service:
kill -15 `ps -e | awk '$NF=="lpd"{print $1}'`
rm -f /usr/spool/lpd/lock /usr/spool/lpd/*/lock
sleep 5
/usr/lib/lpd &

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
make sure the :ex option is not in the /etc/printcap entry for these printers if the remote print server is not an sco box.
i remove it even if it is.
 
Stanhubble...No :ex option at any of the printers in printcap. Any other suggestions? Joe
 
And what is the output of the rlpstat command when the printer no longer print ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Your symptom is (unfortunately) quite common on lpd printers in SCO OpenServer. If the printer is busy or unresponsive for a period of time, the lpd child process appears to just hang and wait forever.
I don't know how to prevent that behavior, but you could use PHV's script within another "watchdog" script to restart those printers without manual intervention.
We have a couple of Clients doing so with a script that will fire off if a particular printjob hasn't been handled in 15 minutes. Of course, that time-frame is highly subjective. In our case, the reports are seldom longer than a 2-page packing slip.
 
I would like to set up a shell script that can be invoked by any user to reset the spooler. However, they do not have permissions for that. So I thought of including an "su" as part of the shell to give them access but I do not want to give them the root password. Is there a way to create a new user that will have permission to reset the spooler? This way I can have the shell "su" to this new user that will not have the root password. Following is part of the shell:
su root "-c ls -9 -u"
kill -15 `ps -e|awk '$NF=="lpd"{print$1}'`
rm -f /usr/spool/lpd/lock /usr/spool/lpd/*/lock
sleep 5
/usr/lib/lpd&
Or perhaps there is an existing user (lp for example) that I can put in the shell. I was hesitant to set up a password for lp - I'm not sure what affect it will have on the system.
Any help would be appreciated.
 
Unfortunately, only root has sufficient privileges to remove files in /var/spool/lpd subdirectories.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Both "asroot" and "sudo" would be better solutions (or a cron-based watchdog as noted earlier). But, a fairly simple solution would be to create a "root" equivilent login that runs your script and exits. This is NOT a sound security policy, but works for most of our customers.

All you need to do is create a new standard login account (i.e. lpreset), then edit the /etc/passwd entry to make the UID "0". Edit the corresponding entry in /tcb/files/auth/l/lpreset. Then, edit the /usr/lpreset/.profile script to include this:
exec /usr/local/bin/{your script}.
 
Thanks motoslide. That was very helpful. I wasn't sure hoe to edit the /tcb/files/auth/l/lpreset but I copied everything from root (except the password) and it's working fine now.
Thanks for all your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top