Posted on 09-30-2014 01:43 PM
Hi Everyone,
I'm working my way through the various aspects of my JSS. Next up is printers! I see a lot of options available for deploying printers, but basically I'm just trying to identify the best solution for my environment. So here's the scenario:
I have a heavy Windows environment with Active Directory. All printers are shared off of various Windows print servers bound to AD. The queues are hosted on the print servers, users connect to the print server, install the printer of their choice, drivers download and install, etc.. From an AD-bound Mac if I go to add a printer (+) all of the shared printers on the domain show up, each listed as Open Directory. This all looks very promising so far.
Drivers
Is it best to package up individual drivers? Or just deploy the massive driver packages that Apple provides (http://support.apple.com/kb/dl907)?
Printer Capture and Upload
Would it be recommended to add these domain printers to a test machine as mentioned above, and suck those into Casper Admin? Or should I be adding the printers directly and then capturing?
Solved! Go to Solution.
Posted on 10-01-2014 07:00 PM
We've had tons of problems deploying printers w/ Casper and finally found this workflow most useful:
On a test machine:
- Install HP printer driver bundle from http://support.apple.com/downloads (too many issues installing the drivers individually - keep getting "software has been installed incorrectly" alerts and having to "Repair" the installation)
- Configure printer(s) in System Preferences (we have a mixture of Pharos & IP printers)
- Add all printer configs via Casper Admin
- Upload all corresponding PPD files to JSS (you'll find them in /private/etc/cups/ppd/) - for some reason Casper uses the generic PPD by default, you will need to uncheck that box in JSS before you can upload any PPDs.
Then run a quick test image deployment and open printer preferences. If your printers appear to be paused (yellow bubble in Print preferences), as a workaround, create and add the following script to your imaging workflow:
#!/bin/sh
## Resumes all paused printers
lpstat -p | grep "disabled" | awk '{print $2}' | xargs -n 1 -I{} sudo cupsenable {}
exit 0
Good luck ~
Posted on 09-30-2014 03:34 PM
1) Are your Mac's bound using the built in AD tool? (we use another tool so I have to ask)
If your Mac's are bound using the built in AD tool do you experience issues with them losing connection at times? We did so we moved to a 3rd party tool. This helped in mapping printers using AD groupings (at first).
2) Are the printers in question relatively the same make/models?
If you have large (read expensive) network printers that have a lot of extra functions (multiple paper trays, stapling function, duplex printing) you are much better off pushing out the OEM driver package so all the functionality is there instead of the basic print/scan/fax driver that Apple offers. But this is just my 2 cents.
Posted on 09-30-2014 03:39 PM
Our fleet only had a couple of manufacturers so we deployed a monolithic driver package for each brand.
To get the printers into Casper we added them to a machine using the Advanced option the add printers section of OSX (right click on the title bar of the add printer dialogue and choose Customise Toolbar) to ensure they were setup exactly how we wanted, we then used Casper Admin on that machine to pull the printers in.
In general the drivers were pushed out universally so the policy to the deploy the printer(s) only needed the printer itself.
If we got a strange model that needed a specific none deployed driver that would be added to the policy for that specific printer.
Others may have done it all differently but this has worked reliably for us.
Posted on 10-01-2014 07:00 PM
We've had tons of problems deploying printers w/ Casper and finally found this workflow most useful:
On a test machine:
- Install HP printer driver bundle from http://support.apple.com/downloads (too many issues installing the drivers individually - keep getting "software has been installed incorrectly" alerts and having to "Repair" the installation)
- Configure printer(s) in System Preferences (we have a mixture of Pharos & IP printers)
- Add all printer configs via Casper Admin
- Upload all corresponding PPD files to JSS (you'll find them in /private/etc/cups/ppd/) - for some reason Casper uses the generic PPD by default, you will need to uncheck that box in JSS before you can upload any PPDs.
Then run a quick test image deployment and open printer preferences. If your printers appear to be paused (yellow bubble in Print preferences), as a workaround, create and add the following script to your imaging workflow:
#!/bin/sh
## Resumes all paused printers
lpstat -p | grep "disabled" | awk '{print $2}' | xargs -n 1 -I{} sudo cupsenable {}
exit 0
Good luck ~
Posted on 10-01-2014 07:05 PM
By the Grace of God we have a custom solution!
The idea and implementation steps given by The Lord God Almighty and I have to give all the Glory and Honour and Praise and Thanks to Him and Him alone!
Thank You Jesus!
We have about 1800 AD printer queues (as of today) and we support most of them. Printer capture and deploy is impossible for us with that amount of printers.
The solution we have is to search AD LDAP and install the printers based on location details stored in LDAP.
We have a Casper Self Service policy which will give a nice guided GUI and will install the selected printer using above method.
Thanks
Posted on 10-01-2014 09:12 PM
I love this community. So many great responses.
@Snickasaurus
All of our Macs are bound using the build in tool. We coordinate the binding through JAMF using the built-in binding operation. So far I haven't seen any issues but we have a very small fleet starting out. Hopefully this doesn't bite us later!
The printers range mainly between HP and Canon copiers.
@Look
Thank you for the advice. Assuming we went with this approach through self-service, do you have a method for detecting whether or not a client has the driver package installed so it doesn't attempt to re-install the drivers. We have users that will install 2-3 printers in their building.
@JAMAUAI
This is pretty much exactly what I was looking for! So it sounds like Casper Admin is simply ingesting the printer configuration and not the drivers? This is why you are following up with the PPD piece. I was getting similar errors so I will certainly give this a shot!
@Kumarasinghe
Sounds like a very large environment! When you say you search AD LDAP, are you referring to a scripted install? Any chance you can provide a sample?
Posted on 10-01-2014 09:39 PM
Yes. It is a scripted method.
It is customised to our environment and I'll give you the process so you can work something out.
1) ldapsearch - search your LDAP
2) lpadmin - Install the printer using the attributes you have retrieved from ldapserch
You may have to add some additional attributes in AD so you can read them when you do the ldapsearch.
Hope these information will help.
Posted on 10-02-2014 02:27 AM
@JAMF_noob correct, as far as I know Casper Admin only takes in the printer configurations. You will need to deploy the printer drivers (preferably provided by Apple - no need to repackage) as part of your imaging workflow.
Posted on 10-02-2014 08:08 AM
Casper Admin indeed just pulls the configuration from what I can tell. It always selects the "Generic PPD" so you have to install the PPD's and sometimes other software, depending on the printers.
If you have a simple printer like some have in an office, it works pretty well and without a lot of hassle. Once you get to building some workgroup printers, you may need to do more work and a lot of testing. There are often lots of options and queues setup for those, and they can be tricky. One thing I use to make changes or verify command line changes is to use the CUPS webpage on the Mac I build the printers on:
In Terminal:
cupsctl WebInterface=yes
Webpage:
http://localhost:631
Once printer(s) are configured in the System Preferences, you can make more granular changes there if you prefer a GUI. Those can be applied to the printer plists for distribution, and sometimes help to more easily see where your config is not setup correctly.
Posted on 08-26-2017 07:39 AM
Hey, I am looking for just what you have managed to get done. Could you share the script please. Thanks
Posted on 08-27-2017 04:03 PM
@JAMF_noob
Yes the script pulls the model of printer and looks for a compatible local driver and displays a user dialogue if it doesn't find one.
99% of drivers are in a single vendor provided package on all machines though so there are only a few instances when this happens.
For what it's worth here's the install part of the script. Missing a few variables and secondary functions that need to be populated first.
Install_Printer() {
The_Model=$(dscl "/Active Directory/$Machine_Domain/All Domains" -read /Printers/${The_Printer} | awk '/MakeAndModel/,/ /' | tail -n1 | sed -e 's/^ //g')
echo ${The_Model}
if [[ "$The_Model" ]]; then
The_Driver=$(lpinfo -m | awk -F ".gz" '/'"$The_Model"'/ && /.gz/ {print $1 ".gz"}' | head -n1)
fi
if [[ ! "$The_Driver" ]]; then
The_Model=$(echo ${The_Model} | sed -e 's/ PCL.*//g' -e 's/ PS.*//g')
The_Driver=$(lpinfo -m | awk -F ".gz" '/'"$The_Model"'/ && /.gz/ {print $1 ".gz"}' | head -n1)
fi
echo ${The_Driver}
if [[ "$The_Driver" = "" ]];then
Display_Driver_Error
else
Printer_Name=$(dscl "/Active Directory/$Machine_Domain/All Domains" -read /Printers/${The_Printer} | awk '/RealName/ {print $2}')
echo ${Printer_Name}
Print_Server=$(dscl "/Active Directory/$Machine_Domain/All Domains" -read /Printers/${The_Printer} dsAttrTypeNative:shortServerName | awk '{print $2}')
echo ${Print_Server}
Printer_Path=$(dscl "/Active Directory/$Machine_Domain/All Domains" -read /Printers/${The_Printer} | awk '/PrinterURI/ {print $2}')
Current_Protocol=$(echo ${Printer_Path} | awk -F ":" '{print $1}')
if [[ "$Preferred_Protocol" ]] && [[ "$Current_Protocol" != "$Preferred_Protocol" ]]; then
Printer_Path=$(echo ${Printer_Path} | sed -e s/$Current_Protocol:/$Preferred_Protocol:/g)
fi
echo ${Printer_Path}
lpadmin -p "${The_Printer}" -E -v "${Printer_Path}" -m "${The_Driver}" -o printer-is-shared="false" -o auth-info-required="default" -D "${Printer_Name} on ${Print_Server}"
Display_Final
fi
}