Operating System - HP-UX
1827588 Members
3005 Online
109965 Solutions
New Discussion

Remote Printer IP Address Change

 
Fuad_1
Regular Advisor

Remote Printer IP Address Change

Hi,

There many remote printers defined in one server. I want to change the IP addresses for all, how can I get a list of all those printers?
Set goals, and work to achieve them
3 REPLIES 3
Robert-Jan Goossens
Honored Contributor

Re: Remote Printer IP Address Change

Hi,

Try

# lpstat -v
Write the names of printers and the pathnames of the
devices associated with them. The list argument is a
list of printer names.


Hope it helps

Robert-Jan.
Chris Wilshaw
Honored Contributor

Re: Remote Printer IP Address Change

You can try

cd /etc/lp/interface

grep ^PERIPH= * | more


This will give you the IP address (or name of the device depending on how it has been set up).

If the name is given, you can just use nslookup to get the IP address.
Bill Hassell
Honored Contributor

Re: Remote Printer IP Address Change

Are these remote printers or are they JetDirect printers that were added with JetAdmin or HP Printer Installer (ie, in SAM these are called Network printers)? If they were added as remote printers, the addresses (IP or network name) are stored in the pstatus file which is binary and cannot be edited. Just delete and re-add the printers. A better solution is to use DNS names rather than IP addresses. If you don't have a DNS server, store the hostnames in /etc/hosts. That way, you can simple change /etc/hosts and the new IP addresses are immediately available.

For JetDirect, you can indeed change the /etc/lp/interface file to the new IP address for each printer. But as in the above case for remote printers, you can give each printer a hostname and IP address in /etc/hosts (assuming there is no DNS server) and replace IP addresses in the interface directory with hostnames. Also note that you can easily delete and add JetDirect printers with addqueue and removequeue.


Bill Hassell, sysadmin