Operating System - HP-UX
1751978 Members
4578 Online
108784 Solutions
New Discussion юеВ

Re: Change printer destinations?

 
SOLVED
Go to solution
Martin Robinson
Frequent Advisor

Change printer destinations?

I have a load of 'remote' printers defined, where the remote hosts are given as IP addresses. I want to change the remote host name to a name, resolved using /etc/hosts, so that when we move the printserver, I don't have to redefine all the printers.

I thought I could do this with lpadmin:
lpadmin -pPRINTER1 -ormPRINTHOST
and although it succeeded (or did not report an error), SAM still says my printer is on xx.xx.xx.xx, not on PRINTHOST.

How can I do this without having to delete and reenter all the printers using SAM?

So this is really an lpadmin question, I think, unless there is a file I can edit.
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: Change printer destinations?

Simlpy edit the config file for each in;

/var/spool/lp/interface/

Each one has the line;

PERIPH=

Simply modify it, stop and start lp and youre done. Easy to do with a script if you have tons of printers (use sed).
Im from Palmerston North, New Zealand, but somehow ended up in London...
Darrell Allen
Honored Contributor

Re: Change printer destinations?

Stefan is correct. Just to add a small note, you can use the hostname in the "PERIPH=" line instead of the IP address.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Martin Robinson
Frequent Advisor

Re: Change printer destinations?

Sorry, guys, this a REMOTE printer not NETWORK.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Change printer destinations?

I very seldom use SAM for printers but this should work:

I. SAM -> Printers and Plotters -> LP Spooler -> Save / Restore Spooler Configuration -> Actions -> Save Spooler Configuration

2. Exit SAM

C. cd /var/sam/lp
edit the file, lpinfo, and make any changes to the remote printer lines that you like and save the file.

IV. SAM -> Printers and Plotters -> LP Spooler -> Save / Restore Spooler Configuration -> Actions -> Restore Spooler Configuration

----------------------------

The actual lp data is stored in /var/spool/lp/pstatus but it's a binary file so that editing would require C or Perl.


If it ain't broke, I can fix that.