Printer Install Help

KyleEricson
Valued Contributor II

I had used this before I got JAMF and now I can't seem to get it to install.
I have tried a Dmg and a pkg without any luck.
Any ideas?

This is the post install script

#!/bin/sh


## postinstall

pathToScript=$0
pathToPackage=$1
targetLocation=$2
targetVolume=$3


loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`




mv /tmp/com.apple.print.add.plist /Users/$USER/Library/Preferences/
mv /tmp/org.cups.PrintingPrefs.plist /Users/$USER/Library/Preferences/
mv /tmp/IT Dept Printer.app /Users/$USER/Library/Printers/
mv /tmp/.cups /Users/$USER/


chown -R $loggedInUser:staff /Users/$USER/Library/Preferences/com.apple.print.add.plist
chown -R $loggedInUser:staff /Users/$USER/Library/Preferences/org.cups.PrintingPrefs.plist
chown -R $loggedInUser:staff /Users/$USER/Library/Printers/IT Dept Printer.app
chown -R $loggedInUser:staff /Users/$USER/.cups



/usr/sbin/lpadmin -p 'IT_Dept_Printer' -L ‘IT_Dept’ -E -v lpd://10.22.1.93 -P /Library/Printers/PPDs/Contents/Resources/Kyocera TASKalfa 4550ci.ppd -o printer-is-shared=false



exit 0      ## Success
exit 1      ## Failure
Read My Blog: https://www.ericsontech.com
6 REPLIES 6

Dylan_YYC
Contributor III

Just a thought, why use a script? With Jamf Admin you can add printers then via a policy send out that printer. Or maybe i missed the point :D

gracoat
New Contributor

I'm struggling with Jamf Admin since when you configure it to capture your printer when it installs, it uses the generic printer driver. Since it's an HP LaserJet 3015x printer, the drivers come from Apple's Software Update system. I really don't like the generic one. Really really.

So how do you tell Jamf that when the printer is installed it needs to get the driver from Apple? Or better yet, how do you get Jamf Admin to capture the fact that you're using anything OTHER than the generic one?

santoroj
New Contributor III

We have deployed the correct printer pkg file to all computers by policy, then imported the printers through JAMF Admin Console to the self-service app making them available to everyone to install as they need to.

gracoat
New Contributor

Do your printer pkg files come from Apple's Software Update service? How do you dig the package files out of there?

gracoat
New Contributor

Okay, so I've found the HP Printer Drivers on Apple's support site. No problemo! It's a PKG and everything! The problem is that it's SIX HUNDRED MEGABYTES.

I mean. ...I've got lots of bandwidth... But it feels like swatting the fly with a jumbo jet.

I'll try it on a test computer and see if it works.

Installing the Package from Jamf as a policy and adding the printer as well. Both AT THE SAME TIME. Will it work??

Edit: 10 minutes later...
**Nope. Didn't work. Generic driver. Anyone have thoughts or a solution?

santoroj
New Contributor III

It will work, just need to push the drivers first then the printers using the priority setting. It is a lot of file, but it is a one time shot.