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

How to add many network printers on HP-UX 11.23

SOLVED
Go to solution
Muthyala
Frequent Advisor

How to add many network printers on HP-UX 11.23

Hi

 

I need to add 200+ network  printers to my HP-UX 11.23 server. I sthere any script to do it ?.

 

TIA 

Sri

2 REPLIES
sapoguheman
Frequent Advisor

Re: How to add many network printers on HP-UX 11.23

check if you have add queue command on server

Muthyala
Frequent Advisor
Solution

Re: How to add many network printers on HP-UX 11.23

Hi

 

Thanks . I added using this script ,In my case my printers are directly connected to server thru network and they are not routed thru any printserver.So ineed to add the printer name and Ip address of them in /etc/hosts.

 

#!/bin/ksh
###############################################################################
#  add_printers  Script to add remote, lan attached
###############################################################################
# shut down the print spooler
#############################
/usr/lib/lpshut
#############################
# for each printer listed , ...
#############################
for PRNTR in `cat /root/home/root/printer_list`
do
   #LPADMIN="lpadmin -p$PRNTR -v/dev/null -mrmodel -g0 -ocmrcmodel -osmrsmodel -orm$PRNTR"
  
   LPADMIN="lpadmin -p$PRNTR -orm$PRNTR  -orp$PRNTR -mrmodel -v/dev/null -ob3 -ocmrcmodel -osmrsmodel"
   #############################
   # ... do the following
   #############################
   #   1st - remove it, then add it, using defaults, placing it on NET1
   #############################
       lpadmin -x$PRNTR
       $LPADMIN
   #############################
   #   2nd - begin accepting requests to it
   #############################
       /usr/lib/accept $PRNTR
   #############################
   #   3rd - enable it
   #############################
       /usr/bin/enable $PRNTR
done
#############################
# after the last printer is added, restart the spooler
#############################
/usr/lib/lpsched

 

 

Details of the Command

 

lpadmin -p$PRNTR -v/dev/null -mrmodel -g0 -ocmrcmodel -osmrsmodel -orm$LOC.holst
ein.com -orp$PRNTR"

where $PRNTR is the name of the print queue and $LOC is the name of the server to which the printer is attached.