Operating System - HP-UX
1748129 Members
3693 Online
108758 Solutions
New Discussion юеВ

How to use the command line to add a remote printer?

 
SOLVED
Go to solution
discoverer
Frequent Advisor

How to use the command line to add a remote printer?

Hello All,

As we know, we can use SAM to add a remote printer through a printer server.

Is there a command that can do this?

( I just want to write a 'expect' script to add a printer on all 30 W/Ss at one time. )

Thanks!

/Listener
Listen, then discover, then succeed!
2 REPLIES 2
Harinath N
Frequent Advisor
Solution

Re: How to use the command line to add a remote printer?

Hi,

You can use,

#lpadmin -pPRINTER_NAME -ormREMOTE_SYSTEM -orpREMOTE_SYSTEM_class_name
-v /dev/null -mrmodel -ocmrcmodel -osmrsmodel


PRINTER_NAME - Will be the target printer name
REMOTE_SYSTEM - Hostname of the system where the printer is connected.

Regards,
N.Harinath

linuxfan
Honored Contributor

Re: How to use the command line to add a remote printer?

Hi,

You could try addqueue (/opt/hpnp/bin/addqueue)
For more information do a manpage on addqueue

For example if you have a HP laserjet(5m)
the model number is 15 (addqueue -l to find out different model numbers), the ip address of the printer is xxx.xxx.xxx.xxx and the queuename you want to use is queue1, you would do something like

addqueue -i 15 -h xxx.xxx.xxx.xxx -q queue1

You could easily script this as well.

-HTH
I am RU
They think they know but don't. At least I know I don't know - Socrates