Managing hundreds of Macs and almost that many printers can prove to be difficult. Here is the method we use at the school where I work. It makes updating units after a new printer is installed a snap. This method works with 10.3 and 10.4, but I haven't tested 10.2. We use a LoginHook to call the script that will add the printers. Here is an example of how to add a LoginHook. In Terminal, type:
sudo defaults write com.apple.loginwindow LoginHook /bin/loginscript.sh
Any script you put in /bin called loginscript.sh will run every time a user logs in. It runs as root, too, so you can have it do all kinds of cool stuff. Now on to the script (I've also included an uncommented version at the end).
Here's the generic, commented script. The first part of the script will delete all of the current printers. We do this because we might need to read a printer with new info. UNIX allows multiple queues with the same name, which can get confusing. The list of printers is stored in /etc/printcap. We'll parse /etc/printcap with sed to create a script to delete the current printers. sed is a UNIX command line tool for substituting text, among other things. We'll use lpadmin -x "Printer Name" to delete the printers. Now all of the printers have been deleted
Adding a printer with lpadmin is easy. The flags I use are:
/usr/sbin/lpadmin -p G-Wing-HP -L G104 -E -v \
lpd://192.168.2.2 -P \
"/Library/Printers/PPDs/Contents/Resources/en.lproj/HP\ LaserJet 4050 Series.gz"
Set the default printer like this
lpoptions - d G-Wing-HP
You can add as many as you'd like, just make sure you add the printer before you try to set it as the default. You can also add via ipp instead of lpd. We don't use AppleTalk any more, but you can add AppleTalk printers with a line like this:
lpadmin -p Printer_Display_Name -E -v \
pap://Zone/Printer-Name-With-Dashes/LaserWriter -P /Path/To/PPD
Once the script is running at login, you can update it with Apple Remote Desktop, or by editing the script remotely via ssh. The script resets the queues at every login, so any 'stuck' print jobs are cleared up by a logout/login. New printers can be added and are immediately available after login. You can add multiple printers with the same IP address and different PPDs for custom jobs.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060725103733602