Operating System - HP-UX
1833883 Members
1819 Online
110063 Solutions
New Discussion

Setting up printers on multiple systems

 
SOLVED
Go to solution
Craig A. Sharp
Super Advisor

Setting up printers on multiple systems

SA's.

I am looking for an example script and or suggestions on creating printers on multiple systems at the same time.
I want to create a printer on one server and have that printer propgate to the other server automatically.

Thanks,

Craig A. Sharp
Roush Industries
5 REPLIES 5
Bart Paulusse
Respected Contributor
Solution

Re: Setting up printers on multiple systems

Hi Craig,
I've had the same problem when more and more servers were added in my company.
I've attached a script that takes an ip-adres, queuename as parameter (and some optional ones, see script), and then creates the printer on all servers you have included in your script.

regards,
Bart
Vincenzo Restuccia
Honored Contributor

Re: Setting up printers on multiple systems

You can see attachment.
Frederic Soriano
Honored Contributor

Re: Setting up printers on multiple systems

Hi Craig,

If your environment is really large (several hundreds of machines), then you might consider using HP Distributed Print Service (aka HPDPS) in DCE extended environment; here is an excerpt of HPDPS Administration Guide (see http://docs.hp.com/hpux/onlinedocs/B2355-90678/B2355-90678.html ):

"HP Distributed Print Service (HPDPS or DPS) is a sophisticated distributed print environment that allows you to give your
users access to a wide variety of printers and printing functions. It also provides you with the ability to effectively and centrally
manage your entire distributed print environment.
[...]
In the DCE Extended Environment, HPDPS objects (such as physical printers and spoolers) created by any member of a DCE
cell are instantly available to the entire cell. For example, if a new physical printer is created within a DCE Extended
Environment server, the name of the new physical printer is visible to every client in the DCE cell, and each client can
immediately issue HPDPS operations for that physical printer. This is possible because the entire cell shares the same
namespace called the DCE Cell Directory Service. This allows for single-point administration as a result of the distributed
namespace."

In my company, we are using this product for several months now, and it works like a charm :o) Unfortunately, DPS in extended environment relies on DCE CDS, which is not free (available from HP under references B3187B and B3188B).

HTH!

Best regards,

Fred.
James L Shirley (4075)
Occasional Advisor

Re: Setting up printers on multiple systems

This script sets up rprint queues on all servers listed in "/home/root/rprntservers.list". You also need to change MASTER_SERVER below to a single server where you pre-configure all printers to the local spooler. The scripts assumes you can run remote shells on the servers in the rprntserver.list.

Enjoy,
Jim

#!/usr/bin/ksh
#
# Script to add rprinter queues to all UNIX servers on the network.
# Execute /home/root/addprint.k
# Written by Jim Shirley 9-2-1999
#
echo "Is $1 the queue you want to create on all of the servers? y/n \c"
read entry
case $entry
in
y|Y)
for n in `cat /home/root/rprntservers.list`
do
echo "Status on server $n"
remsh $n /usr/sbin/lpshut
remsh $n /usr/sbin/lpadmin -p$1 -ormMASTER_SERVER -orp$1 -mrmodel -v/dev/null -ocmrcmodel -osmrsmodel
remsh $n /usr/sbin/lpsched
remsh $n /usr/bin/enable $1
remsh $n /usr/sbin/accept $1
done ;;
*)
echo "Use this syntax - /home/root/addprint.k " ;;
esac
No Indian prince has to his palace ...
Craig A. Sharp
Super Advisor

Re: Setting up printers on multiple systems

Thanks everyone for the excellent answers. I am planning to create a script with the provided examples to handle both Jetdirect and Intel Netport with the same script.