Operating System - HP-UX
1828043 Members
1570 Online
109973 Solutions
New Discussion

Changing Network Printer on Unix

 
Brett A. Weber
Occasional Contributor

Changing Network Printer on Unix

I need to change our network printer on our
unix server and I was told the lpadmin
was what I needed to use. I have the IP address for the laserjet 8150 I want to
add.

However, I can't seem to figure out how to use
the lpadmin command. The current network
printer on the unix server is also not using
the spooler process.

Any help??? Please note I am not a unix
expert I am taking over an existing account.

Thank You,
Laurie Brown

9 REPLIES 9
Marcel Boon
Trusted Contributor

Re: Changing Network Printer on Unix

Hi Brett,

What do you want to change ?

Marcel
See the man pages
Brett A. Weber
Occasional Contributor

Re: Changing Network Printer on Unix

I want to change the printer. I have the
new IP address. It's a different network
printer I want to setup, a laserjet 8150.

I can't find the file where the current
network printer is setup.

Laurie Brown
Marcel Boon
Trusted Contributor

Re: Changing Network Printer on Unix

Hi,

If you want to change the IP-adress, you can't
do it whith the lpadmin command.
You can use an another application, jetadmin.
Maybe it is already installed on your system.
try: jetadmin.

Marcel

See the man pages
Andreas Voss
Honored Contributor

Re: Changing Network Printer on Unix

Hi,

if the printer was configured with jetadmin you could change IP address in the file:
/etc/lp/interface/
Look there for the line

PERIPH=

and add/replace your address ie:
PERIPH=192.1.1.1

If the printer is not setup with jetadmin you have to delete and recreate the printer.

Regards
Brett A. Weber
Occasional Contributor

Re: Changing Network Printer on Unix

The /etc/lp/interface and /etc/lp/sinterface
files are empty. The old network printer was
created with lpadmin, I just have never setup
a network printer on a unix box before.

The former unix person said he used lpadmin
and I am trying to setup a new network printer.
I have the ip address but I can't seem to use
the command correctly.

Laurie Brown
Andreas Voss
Honored Contributor

Re: Changing Network Printer on Unix

Hi,

if your laserjet has an internal Networkcard (Jetdirect) or is connected via external JetDirect-Box i would recommend installing jetadmin for HP-UX.

Generally the use of SAM would be much easier to configure a printer.
This will work for standard remote and jetadmin printers.

Regards
Marcel Boon
Trusted Contributor

Re: Changing Network Printer on Unix

Hi Brett,

I agree Andreas...you talk about an ip-number, so I believe the printer has an NIC. My advice is to install jetadmin. Is it not possible to speak wtih your unix-person, maybe he can explain what he did. If there is no NIC and the printer is parallel on your hp-ux system,
you can use sam for installing printers.
Marcel
See the man pages
Li XiaoMing
New Member

Re: Changing Network Printer on Unix

Hi, you can do this :

##############################################
/usr/sbin/lpshut
sleep 2
/usr/sbin/lpadmin -xprinter_name
/usr/sbin/lpadmin -pprinter_name -v/dev/null -ormprinter_name -orptext -ocmrcmodel -o osmrsmmodel
sleep 2
/usr/sbin/lpsched
sleep 2
accept printer_name
sleep 2
enable printer_name

/usr/sbin/lpadmin -dprinter_name

############################################

Note , the printer_name is the printer name you used in your network , and it can be resolved to IP address ( so you should include it in you /etc/hosts file or in the nis Host map )

Hope this helps.( and it works in our env , HP8100 printer , whith unix workstations )
Bill Hassell
Honored Contributor

Re: Changing Network Printer on Unix

Printers that have a LAN card (or special print servers) have one common protocol commonly called rlp or lpr but refer to the remote printing protocol defined in RFC 1179. HP created the JetDirect product line 10 years ago and defined a new port (not 515 from RFC 1179) called 9100 to bypass the severe limitations of lpr printing (primarily, no status checking).

Using JetDirect software, the printer can easily be defined in one step once the printer has an IP address, subnet mask and gateway. The command is addqueue. The advantage to using JetDirect software is that all the options listed in man net_lj5x will function.

However, as many sysadmins for HP-UX have discovered, non-HP-UX systems such as NT or other Unix boxes cannot handle any -o options and every job from HP-UX must be preformatted (especially ASCII files) before sending the job to a remote print server (which is what port 515 on the JetDirect card is using with lpr).

So you have two choices:

1. Use JetDirect software (always download the latest copy from www.hp.com) and have controls such as duplex, paper trays, fonts, image rotation, etc), or

2. Use the previous post about setting up a remote print server using lpadmin and then write wrappers to handle the stairstep effects seen when printing HP-UX ASCII files.


Bill Hassell, sysadmin