System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname )

 
Alzhy
Honored Contributor

Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname )

Is there an alternative to the following procedur of changing a Print Queue Definiton's IP address?

 

lpshut

lpadmin  (delete and recreate with new IP/hostname)

lpsched

 

Is there not a file we can simply edit?  Where are the IPs and Hostnames stored?

 

Our servers typically average over 3,000 printer definitions.... and we need to change a number of  these..

Hakuna Matata.
4 REPLIES
Bill Hassell
Honored Contributor

Re: Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname )

Were all of these printers setup using lpadmin or were they setup using the JetDirect (hppi) utility? With JetDirect printers, the IP address (or hostname) is stored in the generic interface script for each printer in /etc/lp/interface. For lpadmin printers, the information is buried in the /var/spool/lp/pstatus file which is binary and cannot be edited. You can view the file with: vis /var/spool/lp/pstatus.  So you'll have to script the changes using lpadmin (delete and then re-add).



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname)

> So you'll have to script the changes using lpadmin (delete and then re-add).

 

Hopefully save the 3000 lpadmin commands for next time.

Alzhy
Honored Contributor

Re: Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname)

All of the printers were lpadmin configured -- regardless if they were Jetdirect interfacd (HP) or not. All our printers are "dumb" - they print / stream "print files" -- Postscript mainly or PCL encoded Text files. We've Lexmarks and Xerox/Phasers and HPs -- and we never used the native "print software" bundled with the printers.

 

I guess we've no choice but to script this one --- automation is not the problem, the issue is we have a very short window to do these printer changes.

 

Oh well - maybe set up a central print server next time. (or it's likely a bad'der idea?).

Hakuna Matata.
Dennis Handly
Acclaimed Contributor

Re: Where are IP/hostname of Printers on HP-UX stored? (Change Printer Queue IP/Hostname)

>All of the printers were lpadmin configured

 

Next time, save those commands.

 

>I guess we've no choice but to script this one --- automation is not the problem

 

But automation is the solution.  We use a NIS group with the tuple to add remote printers.