Operating System - HP-UX
1837559 Members
3776 Online
110117 Solutions
New Discussion

Re: Regarding installing a remote printer on a HP-UX server

 
SOLVED
Go to solution
Kavita Poonia
Regular Advisor

Regarding installing a remote printer on a HP-UX server

Hello folks !

Can anyone please help me in installing a remote printer named tsx1 on a HP-UX server by giving me the whole procedure and what commands to be used.

Thanks a lot for your help !
17 REPLIES 17
Ramesh S
Esteemed Contributor

Re: Regarding installing a remote printer on a HP-UX server

Hi

Try this,

1)Make sure that the printer connected to remote system is pingable.

2)rlpdaemon must be running on both systems.To start rlpdaemon,invoke the command:

#/usr/sbin/rlpdaemon

To start rlpdaemon from inetd, the following line should be included in the file /etc/inetd.conf:

printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i

3)When you configure your printer into the LP spooler, you must identify the printer interface script to be used. The /usr/lib/lp/model directory lists printer interface scripts from which to choose. If you do not find the exact model, you could use "dumb".

3)sam ->
Printers and Plotters ->
LP Spooler ->
Printers and Plotters ->
(Actions Menu)
Add Remote Printer/Plotter ->
< printername > ->
Remote System Name ->
Remote Printer Name ->


Best Regards,
Ramesh
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Hi Ramesh,

Thanks a lot for your reply. Is it necessary to use SAM, can't this be done by issuing UNIX commands.


Again thanking you.

Ramesh S
Esteemed Contributor

Re: Regarding installing a remote printer on a HP-UX server

Hi

You can use "lpadmin" command also. But, not sure about the syntax.

I used to configure printer thru SAM.

Best Regards,
Ramesh
Safarali
Valued Contributor

Re: Regarding installing a remote printer on a HP-UX server

Kavita

adding remote printer via sam is easy

from printer menu add remote printer put your ip there and and give any printer name if you have any doubt please inform me
you can also add the printer on command line
I can send command line

Regards
Safar
Yogeeraj_1
Honored Contributor
Solution

Re: Regarding installing a remote printer on a HP-UX server

hi Kavita,

If you want to do it using the command line, you would proceed as follows:

1. Setup Name/address resolution for the queue.
e.g. edit /etc/hosts and add IP address of host which will be accepting print requests and which will have the configured printer queue.

192.168.122.8 YDHOST


2. Login as root on the hp-ux server.

3. Stop the lp spooler:
# /usr/sbin/lpshut

SRV2:>/usr/sbin/lpshut
scheduler stopped
SRV2:>


4. Add the printer:
# /usr/sbin/lpadmin -pYDPRN -v/dev/null -mrmodel -ob3 -ocmrcmodel -osmrsmodel -orc -ormYDHOST -orpYDPRN
-pYDPRN YDPRN is the name of the printer as you want to call it on your system.
-ormYDHOST YDHOST is the name of the host (printer) as it appears in your name/address resolution
-orpYDPRN YDPRN is the queue name to the RIP.

5. Accept and enable the new printer:
# /usr/sbin/accept YDPRN
# /usr/bin/enable YDPRN

6. Restart the spooler:
# /usr/sbin/lpsched


hope this helps!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Regarding installing a remote printer on a HP-UX server

hi again,

to test it your would of course do the following:

7. now test your setup
e.g.
# lp -dYDPRN /home/yogeeraj/.profile


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Thanks Ramesh.

Thanks to Safarali too Can you please send some document or command line about which you are talking so that I can have more clear idea about adding printers.

Thanks Yogeeraj for you reply. It was really very helpful. I think this is what I wanted but I have some queries.
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

I just wanted to know what entry should I make in /etc/hosts. I mean I have given a task to install printer on HP-UX server named ncsqas02.na.jnj.com but they have mentioned a host name in lpadmin command too which is jnjthbafps01.ap.jnj.com as per the below command line

/usr/sbin/lpadmin -ptsx1 -ormjnjthbafps01.ap.jnj.com -orpauto -mrmodel -v/dev/null -orc -ocmrcmodel -osmrsmodel

What the hostname jnjthbafps01.ap.jnj.com is for ? Is this my printer's hostname as per Yogeeraj's description in one of his reply which is different from hostname on which I have to install printer.

Once again thank you all for your help.
James R. Ferguson
Acclaimed Contributor

Re: Regarding installing a remote printer on a HP-UX server

Hi Kavita:

> What the hostname jnjthbafps01.ap.jnj.com is for ? Is this my printer's hostname as per Yogeeraj's description in one of his reply which is different from hostname on which I have to install printer.

There are three main components to define for remote printers. The first is the *hostname* of the device on the network that will receive the output of your server. This can be another server, a printer with an inbuilt NIC (LAN) or a "netport" card which connects to a physical printer.

James R. Ferguson
Acclaimed Contributor

Re: Regarding installing a remote printer on a HP-UX server

Hi (again):

SORRY...I hit submit far too soon!

> What the hostname jnjthbafps01.ap.jnj.com is for ? Is this my printer's hostname as per Yogeeraj's description in one of his reply which is different from hostname on which I have to install printer.

There are three main components to define for remote printers. The first is the *hostname* of the device on the network that will receive the output of your server. This can be another server, a printer with an inbuilt NIC (LAN) or a "netport" card which connects to a physical printer.

This hostname should be defined either in DNS or in your server's '/etc/hosts'.

The second component is the *name* of the printer as it will be known to your local (server) host. What you call it doesn't matter except to the print subsystem.

The third component is the *name* of the printer as the *remote* system knows it. Often this is something like 'lpt1_text' or lpt1_passthru'.

Even though you don't want to use SAM, you might setup on remote printer using SAM and then examine SAM's logs to see how the various menu items translate into a commandline.

Regards!

...JRF...
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Hi James,

Thanks a lot for making me understand the whole scenarion. But I still have one confusion. I just wanted to verify that according to the below mentioned command line :

/usr/sbin/lpadmin -ptsx1 -ormjnjthbafps01.ap.jnj.com -orpauto -mrmodel -v/dev/null -orc -ocmrcmodel -osmrsmodel

The first component is "jnjthbafps01.ap.jnj.com" which is the *hostname* of the device on the network that will receive the output of my server.

The second component is "tsx1", which is the name of the printer as it will be known to my local (server) host i.e. ncsqas02.na.jnj.com as mentioned in one of my above replies on which I have to install printer.

And I am not able to figure out the third componenet which is the name of the printer as the *remote* system knows it. at all from above mentioned command line. Is that "auto" according to above mentioned command.

Please help me out in this.

Thanking you again.
Bill Hassell
Honored Contributor

Re: Regarding installing a remote printer on a HP-UX server

> And I am not able to figure out the third componenet which is the name of the printer as the *remote* system knows it. at all from above mentioned command line. Is that "auto" according to above mentioned command.

Correct. This will be the biggest problem you will have. A "remote printer" looks like a remote computer with one or more attached printers. The remote printer protocol must know the name of the printer you want at the remote computer. The problem is that the remote computer is actually a small processor inside the LAN card or the printer itself. There are more than 25 network printer products and NONE of them have any standard names for the internal printer name. Some LAN cards (such as HP) use the names "text" and "raw" for the printer's name (text will add CR to the end of any line with just a LF (the Unix standard for ASCII files), and raw simply passes the data directly to the printer's internal electronics.

So you must find the printer's LAN card internal name(s). Start with the manufacturer's website and look through the technical documentation. You will find this info in the Unix section. Note that some printers will NEVER work on HP-UX (or Unix) because they require a very large dot conversion driver, and very few printer manufacturers will supply anything special for HP-UX -- only Windows versions are supplied.

Tell us the manufacturer and model of the printer and perhaps we can discover the name somewhere on the web.


Bill Hassell, sysadmin
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Thanks a lot Bill for this. It was really helpful. Now all the three components are clear to me. Now I got to know that third component is basically related print queue or something internal to printer which is recognized by remote server.


Thanking you again !
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Hi Folks,

Finally I have installed remote printer tsx1 on ncsqas04.na.jnj.com through command line. But after adding printer when I have run the command lpstat -otsx1 to check status of printer, it has given following output :

#-> lpstat -otsx1
/usr/sbin/rlpstat: Connection to jnjthbafps01.ap.jnj.com is down
no entries

Is this okay or there is some problem. Please suggest !

Thanking you all once again.
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Hello all,

Please reply for my above put query.

Thanks a lot !
Bill Hassell
Honored Contributor

Re: Regarding installing a remote printer on a HP-UX server

> /usr/sbin/rlpstat: Connection to jnjthbafps01.ap.jnj.com is down

This means that the device at jnjthbafps01.ap.jnj.com is not replying back. I am not a fan of hostnames for printers and especially not fully qualified names. Shorten the printer name to something less than 10 characters. Put that name in ytour /etc/hosts file along with the IP address of the printer. Then change the file /etc/nsswitch.conf to use files then DNS.

However, until you find out the correct name of the LAN card's printer name, it will never work. HP-UX is trying to contact the LAN card's printer name (which has nothing to do with hostname or your local print queue). What is the printer model?


Bill Hassell, sysadmin
Kavita Poonia
Regular Advisor

Re: Regarding installing a remote printer on a HP-UX server

Hi Bill,

Thanks a lot for your reply. I did understand a part of it. Sorry but I do not have the model number, so will not be able to give you that.

Thanks and regards,
Kavita