Operating System - HP-UX
1847591 Members
3941 Online
110265 Solutions
New Discussion

added printer w/ lpadmin, not printing; works fine when done with SAM

 
SOLVED
Go to solution
Susan Harris
Occasional Advisor

added printer w/ lpadmin, not printing; works fine when done with SAM

When adding a network printer with lpadmin and all goes well (no errors), I don't get any output on the printer. When I add the network printer with SAM, I get a print. This is what I did for the lpadmin piece:

#lpshut
#lpadmin -pGALI -mlaserjet5si -v/dev/null
#accept GALI
#enable GALI
#lpsched
(no errors on anything)
when submit a print job, I get a request ID like all is fine, nothing is in the queue. What am I missing?

4 REPLIES 4
John Palmer
Honored Contributor

Re: added printer w/ lpadmin, not printing; works fine when done with SAM

Hi Susan,

All your commands are correct however I suspect that the problem may be to do with the interface script 'laserjet5si'.

The jetadmin scripts in /etc/lp/interface call a script of the same name in /etc/lp/interface/model.orig. Did you manually copy in a script here? lpadmin doesn't know about this technique and will only put a script in /etc/lp/interface.

You will also find that jetadmin modifies the original interface script to define the PERIPHERAL variable pointing to your printer's IP address.

I suggest that you compare your two interface scripts and then you will find what extras jetadmin configures for you.

Regards,
John
Bill Hassell
Honored Contributor
Solution

Re: added printer w/ lpadmin, not printing; works fine when done with SAM

If you are truly adding a network printer with an HP JetDirect interface card (and not a serial or parallel interface), the manual steps are *very* involved. There are two interface scripts and laserjet5si is not the right script for model.orig...it should be net_lj5x.

Since there are so many details required to configure a network printer, use SAM or run the /opt/hpnp/bin/jetadmin program. Or better yet, get the latest JetDirect software and (if the printer already has the network configurations loaded into it) then just use the addqueue command as in:

addqueue -h host_name -q queue_name

where host_name is the IP address or a known hostname for the printer, and queue_name is the name you'll use in HP-UX to refer to the printer using lp -d. See also the man page for removequeue.


Bill Hassell, sysadmin
Manju Kampli
Trusted Contributor

Re: added printer w/ lpadmin, not printing; works fine when done with SAM

when printing are you using the printer destination i.e. lp -d "printer_name".

I think you might be configuring this printer as default in the sam, hence when you print it goes default to this printer. In the command use lpadmin -d "printer_name" to set it as a default.

see lpstat -t if the job is in the queue and what error it is showing
Never stop "LEARNING"
Susan Harris
Occasional Advisor

Re: added printer w/ lpadmin, not printing; works fine when done with SAM

Thanks to all that responded. I'm going with Bill's suggestion, which I tested and works fine. I have many network printers to add on many servers, so using the 'addqueue' command, I'm going to write a script to do this. Thanks! Sue