JAMF Printer Installs

cmudgeUWF
New Contributor III

Does anyone have experience deploying printers in JAMF with Mojave? I've tried to use JAMF Admin to capture it, built a script using lpadmin, etc, and none of it works. There seems to be something missing.

#!/bin/sh

sudo lpadmin -p "PRINTER" -L "Location" -D "Printer Name" -E -v "ipp://<local_ip>" -P "/Library/Printers/PPDs/Contents/Resources/HP Color LaserJet M750.gz"

There always seems to be something missing. When attempting to open the Print Queue, I'm prompted that the printer is missing software. When you try to install it, it looks like it is going to load, but never does anything beyond this.

16 REPLIES 16

adminNWA
New Contributor III

When I started using JAMF one of the most confusing tasks was printers. Most of the advice on this forum is to use a bash script to load the printers. But I found, once I got the JAMF solution working, it works really well. Here are the steps I have used.

  • I manually install the printer on my workstation or a dummy workstation that is running JAMF Admin. Once the printer is setup on a workstation I use JAMF admin to bring that printer up to my JAMF server. You want to make sure that the printer that you have uploaded to the JMAF server has the correct PPD file and is not using the generic PPD file. (this was probably the hardest part for me) I found that the PPD files live in /Library/Printers/PPDs/Contents/Resources/ (not a big discovery, but important none the less)

  • the reason why the PPD file setting is important is because that if the PPD file that will get installed when the printer definition and print queue are mapped to your machines.

  • next, the easy part, I upload my printer driver file to my JAMF server and I create a policy to install the printer driver. According to JAMF tech support you can map the printer in the same policy that installs the printer driver or you can map the printer in a separate policy. I do both.

I have uploaded some screenshots.

The first is the printer definition that I uploaded from my workstation. You can see that this specifies the PPD file to use.

The second is a policy that just maps a printer.

The remaining screenshots show a policy that installs the printer driver and maps the printer.


The only problems that I have had, and they are of my own making, is when I want to remove a printer. Sometimes I just go in like a bull in a china shop and I go straight to my printers in JAMF and I just delete the printer and then I go to my policies and I just disable the policy that installed that printer. The problem is that that does not remove the printer.

If something changes with your printers in the future the proper steps are to go into the policy that maps the printer and change the setting from map to unmap. Then if that policy is only running once per computer clear the log so that the policy will run on all of your computers. Once the unmap policy runs the printer is removed from the printer list and then at that point one can go in and delete/disable the policy that installs the driver and one can go into the printers and delete the printer from JAMF.

Once you get used to the printers in JAMF it really works quite well.

adminNWA
New Contributor III

9092e01d792547afa3703b1f768e235e
f165e917733444c8861e980acaf4efb9
cd484e5e4ded456caa0ebf75fcbaaaa1
854bcc78a90f458980fc5c47f5fef9af

anverhousseini
Contributor II
Contributor II

I'm using a combination of jamf mapPrinter and lpadmin. Here is an example of mapping a printer and changing the options:

#!/bin/bash

/usr/local/bin/jamf mapPrinter 
    -cupsName "Printer_Name" 
    -displayName "Printer Name" 
    -deviceURI "lpd://192.168.1.100" 
    -path "/Library/Printers/PPDs/Contents/Resources" 
    -ppd "/Library/Printers/PPDs/Contents/Resources/CNMCIRAC7260S2.ppd.gz"

lpadmin 
    -p "Printer_Name" 
    -o "CNSidePaperDeck=Small" 
    -o "CNFinisher=BFINL1" 
    -o "CNPuncher=PUNU2" 
    -o "CNFolder=FLDU1" 
    -o "CNInsertUnit=INSU1" 
    -o "CNUseJobAccount=True" 
    -o "CNColorMode=mono" 
    -o "CNDuplex=None"

You can run lpoptions -p "Printer_Name" -l to find all available options. For this specific printer the output looks like this:

CNSidePaperDeck/Paper Deck Unit: None *Small Large
CNFinisher/Output Options: None STFINL1 *BFINL1
CNPuncher/External Puncher: None *PUNU2 PUNU23 PUNF24 PUNS4
CNFolder/Paper Folding Unit: None *FLDU1
CNInsertUnit/Insertion Unit: None *INSU1
CNUseCSModeJobAccount/Dept. ID Management Authentication: *mode1 mode2
CNUseCSModeSecured/Secured Print Authentication: *mode1 mode2
CNUseJobAccount/Department ID Management: False *True
CNEnableTrustPrint/Secure Printing Function of Device: *False True
CNInSlotManMediaType/Paper Type of Multi-purpose Tray: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 HEAVY3 HEAVY4 OHP LABELS TRACING THIN POSTCARD ENVELOPE 1SIDEDCOATED1 1SIDEDCOATED2 1SIDEDCOATED3 1SIDEDCOATED4 2SIDEDCOATED1 2SIDEDCOATED2 2SIDEDCOATED3 2SIDEDCOATED4 TEXTURE1 TEXTURE2 TEXTURE3 TEXTURE4
CNInSlotAMediaType/Paper Type of Drawer 1: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 OHP THIN
CNInSlotBMediaType/Paper Type of Drawer 2: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 OHP THIN
CNInSlotCMediaType/Paper Type of Drawer 3: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 OHP THIN TAB1 TAB2
CNInSlotDMediaType/Paper Type of Drawer 4: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 OHP THIN TAB1 TAB2
CNInSlotEMediaType/Paper Type of Drawer 5: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 HEAVY3 HEAVY4 OHP LABELS THIN 1SIDEDCOATED1 1SIDEDCOATED2 1SIDEDCOATED3 1SIDEDCOATED4 2SIDEDCOATED1 2SIDEDCOATED2 2SIDEDCOATED3 2SIDEDCOATED4 TEXTURE1 TEXTURE2 TEXTURE3 TEXTURE4
PageSize/Page Size: Letter Letter_MAX 11x17 11x17_MAX Ledger Ledger_MAX Legal Legal_MAX Statement Statement_MAX Executive Executive_MAX A5 A5_MAX B5 B5_MAX *A4 A4_MAX B4 B4_MAX A3 A3_MAX Postcard Postcard_MAX dbl_postcard dbl_postcard_MAX 4x_postcard 4x_postcard_MAX jenv_you3 jenv_you3_MAX jenv_kaku2 jenv_kaku2_MAX jenv_chou3 jenv_chou3_MAX Monarch Monarch_MAX Com10 Com10_MAX dl_envelope dl_envelope_MAX Envelope_C5 Envelope_C5_MAX SRA3 SRA3_MAX 12x18 12x18_MAX 13x19 13x19_MAX A4+ A4+MAX Letter+ Letter+MAX Oficio Oficio_MAX A_Oficio A_Oficio_MAX B_Oficio B_Oficio_MAX E_Oficio E_Oficio_MAX M_Oficio M_Oficio_MAX A_Letter A_Letter_MAX G_Letter G_Letter_MAX G_Legal G_Legal_MAX F4A F4A_MAX K8 K8_MAX K16 K16_MAX Foolscap Foolscap_MAX A_Foolscap A_Foolscap_MAX Custom.WIDTHxHEIGHT
Collate/Finishing: *True False
CNDuplex/Print Style: *None DuplexFront Booklet
Booklet/Book Opening: *Left Right
CNVfolding/Fold Only: *False True
CNSaddleStitch/Saddle Stitch: *False True
BindEdge/Binding Location: *Left Right Top Bottom
CNStaple/Staple: *False True
StapleLocation/Position: *TopLeft BottomLeft Left TopRight BottomRight Right Top Bottom
OutputBin/Paper Output: *Auto TrayA TrayB TrayC
CNMultiPunch/Hole Punch: *Off PUNU2 PUNU23 PUNF2 PUNF4 PUNS4
CNZfolding/Z-fold: *False True
CNCfolding/C-fold: *False True
CNOutputPartition/Offset: None *offset rotation
CNCfoldSetting/C-fold Settings: *pattern1 pattern2 pattern3 pattern4
CNOutputFace/Face Up/Face Down: *None FaceDown FaceUp
CNTrustPrint/Use Secure Printing Function of Device: *False True
CNCopySetNumbering/Copy Set Numbering: *False True
CNGradationSmoothing/Gradation Smoothing: *Off Smooth1 Smooth2
CNShiftStartPrintPosition/Offset the Position to Start Printing: *False True
CNCreep/Use Creep (Displacement) Correction: *False True
CNDisplacementCorrection/Displacement Correction Method: *Device Auto Manual
CNSelectBy/Select by: *PaperSource PaperType
InputSlot/Paper Source: *Auto Manual Cas1 Cas2 Cas3 Cas4 SideDeck
MediaType/Paper Type: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED LHEAD BOND HEAVY1 HEAVY2 HEAVY3 HEAVY4 OHP LABELS TRACING THIN POSTCARD ENVELOPE TAB1 TAB2 1SIDEDCOATED1 1SIDEDCOATED2 1SIDEDCOATED3 1SIDEDCOATED4 2SIDEDCOATED1 2SIDEDCOATED2 2SIDEDCOATED3 2SIDEDCOATED4 TEXTURE1 TEXTURE2 TEXTURE3 TEXTURE4
CNOHPPrint/Print on Transparencies: *False True
CNInterleafSheet/Insert Cover Sheets: *False True
CNInterleafInputSlot/Paper Source: *Auto Manual Cas1 Cas2 Cas3 Cas4 SideDeck
CNInterleafMediaType/Paper Type: *PlainPaper1 PlainPaper2 RECYCLED1 RECYCLED2 COLOR PREPANCHED BOND HEAVY1 HEAVY2 HEAVY3 HEAVY4 THIN 1SIDEDCOATED2 1SIDEDCOATED3 1SIDEDCOATED4 2SIDEDCOATED2 2SIDEDCOATED3 2SIDEDCOATED4 TEXTURE1 TEXTURE2 TEXTURE3 TEXTURE4
CNInterleafPrint/Print on Cover Sheets: *False True
CNInsertSheet/Insert Sheets: *False True
CNTabPrintMode/Printing Position on Tab: Shift *NoShift
CNSheetForInsertion/Type: *Insert Chapter TAB1
CNInsertPrintSide/Print on: *None OnlyFrontSide OnlyBackSide BothSides
CNInsertInputSlot/Paper Source: Manual *Cas1 Cas2 Cas3 Cas4 SideDeck InsertionUnit1
CNSetFrontSheet/Only Front Cover: *False True
CNFrontPrintOn/Print on: *Off OnlyFrontSide OnlyBackSide BothSides
CNFrontPaperSrc/Paper Source for Front Cover: Manual *Cas1 Cas2 Cas3 Cas4 SideDeck InsertionUnit1
CNSetBackSheet/Only Back Cover: *False True
CNBackPrintOn/Print on: *Off OnlyFrontSide OnlyBackSide BothSides
CNBackPaperSrc/Paper Source for Back Cover: Manual *Cas1 Cas2 Cas3 Cas4 SideDeck InsertionUnit1
Resolution/Quality: 1200 *600
CNColorMode/Color Mode: *mono color
ColorModel/Color Mode: Gray *RGB
CNPureBlackText/Pure Black Text: *None True False
CNBlackOverprint/Black Overprint: *None True False
CNRGBMatchingMode/Matching Mode: *ICCProfile DeviceLinkProfile
CNRGBSourceProfile/Source Profile: *None sRGBv3.0(Canon) HDTVgamma1.5 HDTVgamma1.8 HDTVgamma2.4 Off
CNRGBMatchingMethod/Matching Method: *None Monitor Perceptual Colorimetric Saturation Vividphoto
CNRGBPureBlackProcess/Pure Black Process: *True False
CNRGBInputLightClrSpace/Input (Light + Color Space): *D50sRGB D65sRGB D50AdobeRGB D65AdobeRGB
CNCMYKMatchingMode/Matching Mode: *ICCProfile DeviceLinkProfile
CNCMYKSimulationProfile/Simulation Profile: *None JapanColor USWebCoatedV1 EuroStandardV1.00 Off
CNPureBlackProcess/Pure Black Process: *True False
CNCMYKInputLightClrSpace/Input (Light + Color Space): *D50JapanColor
CNUseGrayScaleProfile/Use Grayscale Profile: *False True
CNOutputProfile/Output Profile: *Default
CNPrioritizeLineText/Prioritize Printing of Lines and Text: *True False
CNUsePSBrightness/Brightness: *False True
CNPSBrightness/Brightness: 1 2 3 *4 5 6 7
CNHalftone/Halftones: resolution gradation errdiffusion pattern1 pattern2 pattern3 pattern4 pattern5 *pattern6 pattern7
CNColorHalftone/Halftones: resolution gradation errdiffusion pattern1 pattern2 pattern3 pattern4 pattern5 *pattern6 pattern7
CNTonerSaving/Toner Save: Auto True *False
CNAdvancedSmoothing/Advanced Smoothing: *None Smooth1 Smooth2 Off
CNTonerVolumeAdjustment/Toner Volume Correction: *None Normal Gradation Text
CNLineControl/Line Control: *None Resolution Gradation
CNUseSharpness/Sharpness: *False True
CNSharpness/Sharpness: 1 2 3 *4 5 6 7
CNCompositeOverprint/Composite Overprint: *None True False
CNSpotColorMatching/Spot Color Matching: *None True False
CNTonerDensityAdjustment/Toner Density Adjustment: *None True
CNImageCompression/Image Compression: *None Image Normal Speed
CNDensityFineAdjustment/Density Fine Adjustment: *False True
CNDensityFineAdjustmentNum/Density Fine Adjustment: 1 2 *3 4 5
CNGrayConversion/Grayscale Conversion: sRGB *NTSC RGB
CNTonerDensity/Black: 1 2 3 4 5 6 7 8 *9 10 11 12 13 14 15 16 17
CNCTonerDensity/Cyan: 1 2 3 4 5 6 7 8 *9 10 11 12 13 14 15 16 17
CNMTonerDensity/Magenta: 1 2 3 4 5 6 7 8 *9 10 11 12 13 14 15 16 17
CNYTonerDensity/Yellow: 1 2 3 4 5 6 7 8 *9 10 11 12 13 14 15 16 17
CNTrapping/Trapping: *None False True
CNTrapWidth/Trapping Width: *1 2 3
CNTrapDensity/Trapping Density: 25 50 75 *100
CNJobExecMode/Job Processing: *print Hold secured store promote
CNPdeUseJobAccount/Use Department ID Management: *True False
CNAuthenticate/Confirm Department ID/PIN When Printing: *True False
CNOverlay/Processing Method: *NoUseOverlay UseOverlay CreatFormFile
CNOverlayFormComposition/Application: *AllPage FrontSide BackSide

The option with an asterisk is the active option. You can run this command in a policy with "Files and Processes", so you don't have to create a script in Jamf Pro:

/usr/local/bin/jamf mapPrinter -cupsName "Printer_Name" -displayName "Printer Name" -deviceURI "lpd://192.168.1.100" -path "/Library/Printers/PPDs/Contents/Resources" -ppd "/Library/Printers/PPDs/Contents/Resources/CNMCIRAC7260S2.ppd.gz" && lpadmin -p "Printer_Name" -o "CNSidePaperDeck=Small" -o "CNFinisher=BFINL1" -o "CNPuncher=PUNU2" -o "CNFolder=FLDU1" -o "CNInsertUnit=INSU1" -o "CNUseJobAccount=True" -o "CNColorMode=mono" -o "CNDuplex=None"

If you upload the PPD's with Jamf Admin you have to make sure to use the exact same driver version otherwise the PPD could not match the driver and some settings are invalid, then you have a lot of work just to change e.g a single option (adding printer in preferences, make changes in the cups web GUI, remove printer from Jamf Pro, uploading printer with Jamf Admin etc.). With this method you don't care about the driver version.

cmudgeUWF
New Contributor III

I'm having an issue with using a bash script: even if I point at the .gz correctly, it still only shows the printer using the generic postscript driver.

Chris_Hafner
Valued Contributor II

@anverhousseini I'm going to dig into that mapPrinter bit.

@cmudgeUWF Over time, I've found that simply distributing the necessary printer drivers (PPD) seperately and then only using lpadmin to facilitate the actual printer queue install, to be more reliable. You could distribute the drivers like us (during enrollment) or at a policy ahead of the lpadmin script.

-NOVELLUS-
New Contributor II

@adminNWA Thank you very much for your great howto for deploying printers with JamfPRO. It works great !
One issue is faced, after the rollout of the printers :
We are deploying printers via a smb share to our (windows) print server.
Mapping manually the printer is, to install the Kyocera Mita printersoftware (the drivers) open the system settings, go to the printers dialogue, add a printer via smb and apply. After that, the mapped printer is shown at the left part of the printer dialogue.
When I am deploying the printer with the same settings (install the driver package, set the path to smb://...) the printer is shown, if I want to print something (for example a website) but it is not shown at the system settings, printer dialogue.
If I remote the MDM Profile, the Printer is shown.
Is there anyone able to help me to get the mapped printer show while the MDM profile is installed ?

donmontalvo
Esteemed Contributor II

Too bad printer drivers are going away very soon. #AirPrintFTW

--
https://donmontalvo.com

j_grafton
New Contributor III

Hi All,
I have been reading a few different posts about printing and deploying printers in jamf and I have it working but it seems to simple compared to what everyone does.
We have a print queue which is across our estate and is the default on every mac. Print jobs to this queue can be released from several different printers and is easy. Then I have departmental printers for those who have a separate printer in their shared staff base. There isn't as many of these printers.
All i do is I add a new printer to jamf admin and create a policy to map the printer to the computer group for that department and push the policy.
For the shared printer that can be released from several printers I map it but I add in a package of printer drivers.

So many people have said about using configuration profiles and plists but is the way I am doing it correct? As I can unmap easily should the printer be removed or the iMac/mac is removed from the group?
Thanks

NOVELLUS
Contributor

We have a couple of locations and one central printer queue for the whole company. each location has its own printserver. When a employee is changing the location, the client will connect to the local network ( LAN od WLan), This causes a change of the network status.
I created a policy and triggered it with "change networkstatus". In this policy I change the print server on the client to the local printserver of that location, where the employee works.
The result is, that the print job is not routed through the whole company (for example from location outside to the headquarter and from there back to the printer at the location, where the employee works.) Because of this, the jobs are only handled in the local area network and they are printed much faster.

user-LaeSZUcuyi
New Contributor

So this method still works on our Catalina machines, but we have been seeing more issues with our normal Self Service printer install straight failing on Big Sur machines. So far, all computers were working in Catalina, then upgraded to Big Sur. No clean installs.

Deployment details:

Deploy policy that installs Canon post script

Map both printers

pueo
Contributor

Hello All

Has anyone found a way to dynamically add printers to users devices when they travel from floor to floor or building to building?  Maybe using Network Segments?  
If our C-Level folks move from one floor to another or travel to another country, we cannot expect them to manually install a printer.  It should be there for them shortly after they login.
Trying to add 300 printers to your Jamf Pro is a terrible waste of time and very manual (a script still requires one to type everything out).  I have added about 30 so far using Jamf Admin and installing them on my laptop first. Works great but for 300!...nope.
I am also wondering if the community has found away to tap into Domain services to see and install the domain printers with out being bound to AD. Never ever want to go down that path again.  This way we do not have to upload many printers and then manually update them if needed.

With return to office occurring soon many of our C-Level will be back at work and travelling. I would like to get on top of this before it becomes a bigger issue.

 

a.

NOVELLUS
Contributor

@pueo as written in my reply above, I have done this with a policy. The policy is triggered by a network status change and changes the printer of the current location to the client. To get this working, the network areas must be configured in Jamf. The policy is working with variables (the correct printer queue for the current location) and is mapping the needed spooler to the client. This works for us, because we have the same printer model at each location and because of this the same printer driver. For each location (in this case for each network area), I created an own policy.

 

@NOVELLUS I think I understand your method.  Most of our bigger copies on each floor are the same and we use the one Xerox printer driver package for ALL our printers.  I have it installed as part of the deployment process.  If you have the new printer added via a policy triggered buy a Networkchange it can take up to 15mins to deploy. Does this cause issues if Users want to print right away?  I may PM you if we go down this path and I can't figured out the work flow.  

@pueo I have no idea, why the deployment of your printers is so slow.  The trigger of our policies are nearly at the same time, as the clients network state changes. I only change the spooler with a script, there is no need to deploy any printer driver or other software.

Maybe this example will help you:

For each location I created a "print in" - policy. 

"PrintInLocationOne" (policy). The policy only contains a script ans is triggered at the clients network state change.

The command in the script is:

#!bin/bash
#
# empty the current FollowME printer queue
#
# variables:
#
# $7 = Printername respectively Spoolername
# $6 = Printerdescription
# $5 = Location (ex. location1, location2, city1, city2, building1, building2)
# $4 = Printserver (ex. server1, server2...)
# $3 = Name of the current user, who is logged on at the time, the script is running
#
# empties the current printerqueue, notice: pay attention to the capitalization!
#
lprm -P $7 -U $3
#
#change the printserver of the printerqueue to the printserver from the present location of the user
#
lpadmin -p $7 -D $6 -L $5 -E -v smb://$4/$7 -o auth-info-required=negotiate -U $3
exit 0

That's all.

Thanks for the reply and sharing your solution.  We haven't implemented anything at the moment.  I have only added printers to Self Service, but this won't do as we expand out Mac fleet.  

I will look into your process and see if works for us.

 

cheers.

@pueowe are providing the printer installation, too via the selfservice.app. It is the "main installation", the user could choose, if it would be necessary to reset the printer system and install the spooler again. The selfservice policy,  re installs the printer drivers on the client and the spooler is mapped to the client. Before mapping the spooler, the little script below is checking in the background for some parameters, so the right spooler server will be mapped.

 

Bildschirmfoto 2021-11-18 um 07.54.57.png

 

Script:

#!/bin/sh
for PRINTER in `lpstat -v | grep 'smb://' | awk '{print $3}' | tr -d :`
do
    lpadmin -p $PRINTER -o auth-info-required=negotiate
done
exit 0