Mass Printer Import

Not applicable

Hey

I'm new to Casper (only been using it for a few weeks) and so far I'm
enjoying the amount of things it does for me.

The one thing I'm not so happy with is the method for creating printers.
It's great for individual printers but no so great for lots of printer (we
have lots!); well unless I'm missing something obvious. I know everyone uses
scripts and I am using them to create printers (with lpadmin not jamf
binary) but I still would like the individual printers for self service.
Currently we have several windows print servers (that serve several hundred
printers) and I've written a quickie JScript that extracts the printer
details from the server and then creates printer scripts based on their
subnets (/24 only). If anyone is interested, they are available at:

http://dl.dropbox.com/u/1826667/casper/printer_scripts.zip

This works fine. The scripts find their own PPDs (provided they exist; it's
a pretty crude method I'm using and it has to be run from a mac) and create
the printer. But I would like to create individual printers for self-service
in case someone needs a printer not on their subnet (some sites have more
than one subnet on their level) or if they original scripts fail for some
reason. I can use the scripts I generate to populate a machine and then
import them into casper admin but there are *hundreds* of checkboxes and
this is supposed to be as automated as possible (hence the scripts and the
scraping of the print servers). You can't Applescript Casper Admin so that's
out of the question.

I've looked into the Casper API but it does not support adding to printers
(only reading). I could create individual scripts for each printer (the
script can easily be modified to do that) but then I have to create
something to automate adding the scripts into Casper Admin and the policy
creation. I have looked into adding the printers via MySQL directly (most of
my efforts are currently in this direction) but I feel I have now moved from
shaving the yak to cleaning the windows of the Empire State Building.

Does anyone else manage a site with a large amount of printers? How do you
do it? Do you just bite the bullet and do all the grunt work? I don't mind
if it's once off but we want to automate as much as possible because we want
to be able to manage the printers from a single location (the windows
servers) and then create (or update) our scripts and printers automatically
from that.

Any ideas?

Sven Schott

6 REPLIES 6

davelb20
New Contributor III

Sven,

We ran into the exact same problem. We had about 270 printers, most of them having PPDs already installed with the OS. We had to install all 270 printers by hand on one computer then add them to casper. Then we were trying to implement self service so users can install the printers without being a member of lpadmin or having escalated priveleges. So we had to create policies for all 270 printers. Then if users would like to uninstall printers we had to make 270 policies for those as well. I'm sure there is a more elegant way to do it. The printers seem to be working great now though, and the users don't have elevated privileges and our admin team doesn't need to intervene when they want printers added to their computer.

We have a mixed environment with 10.5.8 and 10.6.4 systems mixed. I added all the printer ppds on a 10.6.4 system. Now when users on 10.5.8 install with the self service policy, the printer is installed fine but it is paused and lpadmin access is required to unpause it. The the self service install on 10.6.4 systems works find. I hope they come up with a more streamlined solution. Because creating then if needed modifying options on 270 self service policies is not fun.

In the future I'd like to look at implementing a search feature in the self service. Right now we have one long list of printers, where the user has to scroll down to find the one they would like to install.

David Bruno
Security +, RHCT, CCNA, CCA
Computer Scientist
ARL/CISD
410-278-8929
david.bruno at us.army.mil

Not applicable

We just made a quick script that can be tossed into a login hook policy or a
self service policy. All it does is add the currently logged in user to the
lpadmin group, then they can add and remove printers without having to
unlock that preference pane, and they don't get any other elevated access on
the machine.

#!/bin/bash

USER=who | grep "console" | cut -d" " -f1
sudo dseditgroup -o edit -a $USER -t user lpadmin

Notice the pane is locked but the '+' and '-' buttons are still active. This
puts a little work on the user, as they have to know the IP or DNS name of
the printer they use, but it saves us the work of having to find and make a
JSS entry for every single one of our printers.

Bob

David Bruno wrote: Sven, We had to install all 270 printers by hand on one computer then add them to

casper. Then we

![external image link](attachments/bf6297ff7a5a4d86afb590a7237be150)

Not applicable

I do the same, but slightly differently. I add an AD group to lpadmin rather than the individual user and do it with a postimage script. My purpose in adding then was to allow users to un-pause printers that had become paused due to them forgetting to authenticate to some print accounting software that we use.

Bukira
Contributor

$(Usame here, i added an AD group which contains ALL users to the lpadmin when i build the image

Criss Myers
Senior IT Analyst (Mac Services)
iPhone / iPad Developer
Apple Certified Technical Coordinator v10.5
LIS Development Team
Adelphi Building AB28
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054

![external image link](attachments/25d672f6a8db40c39416ae78b95cff81)

Bukira
Contributor

$(Usame here, i added an AD group which contains ALL users to the lpadmin when i build the image

Criss Myers
Senior IT Analyst (Mac Services)
iPhone / iPad Developer
Apple Certified Technical Coordinator v10.5
LIS Development Team
Adelphi Building AB28
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054

![external image link](attachments/0d43f9fbf96a497abef1ab60970ae867)

Bukira
Contributor

$(Usame here, i added an AD group which contains ALL users to the lpadmin when i build the image