Posted on 01-05-2017 08:15 AM
Hi All,
Another question for the hive. =)
I am trying out Printer Management by setting up the printers on my machine, making changes via the localhost:631 cups interface, then capturing the printer via Casper Admin.
These steps "seem" to have worked. Except when I looked in the JSS, all the printers showed "Use Generic PPD". Being "smart" I unchecked that, and saw the proper PPD listed there and thought "great, it'll add the PPD to the machine when it installs the printer".
Wrong. All the printers show as "Generic Printer" on the machines, and have the icon to match. Things as simple as Duplex don't work, let alone more complicated things on MFPs like Job Accounting. =(
So, I created an installer that added the PPDs to the local machines, but the printers have already been created, and I can't seem to get the Configuration Profile to "refresh" them.
I've read a lot of people are just using lpadmin to create and manage the printers via scripting, but it seems like that removes the ability to easily add/remove printers from computers (I had this dream of smart groups dynamically assigning printers based on the user's building/floor, and an office move would magically (once I renamed the computer) would simply "work!).
Am I just crazy, and it doesn't work how I hope? Am I doing something (obvious or not) wrong? Am I stuck going back to scripting printer adds?
Posted on 01-05-2017 08:24 AM
@staze I do not use the Casper method for deploying printers, I gave that up a long time ago, and instead I am one of those that use lpadmin
. However, if you are making changes to the printers via the cups interface, I believe you will need to deploy the updated printer PPD that lives in /etc/cups/ppd
and point to that. I could be wrong about that, so testing would definitely be in order.
As far as adding and removing printers with lpadmin
not being easy, it's actually very easy in my opinion, and you have plenty of control over the printer options that way:
lpadmin -p <name> -L <location> -E -o <printer options> -v lpd://<ip> -P <ppd location>
# remove printer
lpadmin -x <name>
You can then write policies for each floor/building/location that you want printers automatically added for. Just scope to the network segment/building/location and set the script. Granted you would need an lpadmin
script for each location, or you'd need to pass variables to the script based on the policy.
Posted on 01-05-2017 08:26 AM
This is a known issue that we have filed under PI-000625.
In most cases, you can simply uncheck the "Use Generic PPD" box and it will show the correct PPD that was actually captured, and you can then save it and it will stick, though the printer may need to be unmapped and remapped for the change to show on the client end.
If that does not resolve the issue on the client end, the printer driver may need to be packaged up and pushed out via policy to correct it.
If you'd like to have a case created to get it attached to PI-000625, or to troubleshoot further if the above does not resolve the issue, please get in contact with support either by giving us a call, sending an e-mail to support@jamf.com, or by using the My Support section of Jamf Nation.
Thanks!
Amanda Wulff
Jamf Support
Posted on 01-05-2017 10:33 AM
Hi Amanda,
Thank you! So, how do I actually get it to "re-map" on the client? I've done just about every dance I can think of... short of just using ARD to nuke /etc/cups/printers.conf on the machines.
Posted on 01-05-2017 10:40 AM
@stevewood Thanks. I am familiar with doing that, as I've done it that way for ages during imaging via DeployStudio. It just seems... broken to me. And doesn't easily solve removing the old printers from when the computer moves locations (unless I'm missing something)... =/
Posted on 01-05-2017 10:41 AM
If you mapped the printers using the JSS, you'd go back to the same place in the policy payload and, instead of map, select unmap from the dropdown menu, save, and give the policy a chance to re-run (depending on how your policy is set up, it may need a trigger change as well so it runs again). After it's unmapped itself, modify the policy again and select map from the dropdown.
If it was pushed out through a config profile, you'll need to edit the printers payload on that profile to remove the printer, save so the profile pushes out to remove the printer(s) from scoped computers, then re-add the printer and save the profile again and push it back out.
If you require assistance in doing that, used a method other than policies or configuration profiles push the printers out, or re-doing the policy or config profile doesn't take care of it, please contact support either by giving us a call, sending an e-mail to support@jamf.com, or by using the My Support section of Jamf Nation.
Thanks!
Amanda Wulff
Jamf Support
Posted on 01-05-2017 10:50 AM
Great, I'll give that a shot. But I don't think I've seen much luck with removing the printers from the Configuration Profile, and having it actually remove from the client (this may be tied to issues I've been seeing with configuration profiles not actually updating on the client when changes are made). =/
Will post back. =)
Posted on 01-05-2017 10:53 AM
@staze removal can be done with a separate policy. The difficult part is how you identify which printers to remove. If you're just removing all printers and adding back only the ones for that particular location, that's easy. It's when you need to surgically remove a printer that can get tricky.
For example, if you have a location named Finance with a printer named FinanceXerox, as long as you have a way of identifying when a person enters that location, you can add with lpadmin -p
like I mentioned above.
Then when that user leaves the Finance location and goes to another location named Customer Service, you can remove the FinanceXerox with lpadmin -x FinanceXerox
and add the Customer Service printer with lpadmin -p CustomerSvcXerox
. Again, the difficult part is how you identify what printers are on the system that need to be kept and which ones need to be removed.
If you do not care about other printers, and only want the printers for a location on a machine at any given time, then you simply blow away all of the printers with something like this:
launchctl stop org.cups.cupsd
mv /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
cp /etc/cups/cupsd.conf.default /etc/cups/cupsd.conf
mv /etc/cups/printers.conf /etc/cups/printers.conf.backup
# I found that by touching this file the system did not put the backup back
touch /etc/cups/printers.conf
launchctl start org.cups.cupsd
Granted that is a sledge hammer approach, but it works. Then you just add back what you want. You could put that little bit in the scripts to add the printer for each location.
If you are concerned with preserving printers, you could use a Bash script or Python script to iterate through the printers installed on the machine, use an array of known printers, and remove only if the printer found is in the array.
Posted on 01-05-2017 12:25 PM
Okay, that SEEMS to have worked. Only issue is now the machines are complaining that there's missing software (the rest of the stuff Ricoh printers need), and Apple doesn't provide a manual download for it.
Any tips for where to grab these?
Posted on 01-05-2017 12:27 PM
Yup, that works... unless people have personal printers on their laptops. =/
I'll have to keep playing with this... but thanks for the help!
Posted on 01-05-2017 12:56 PM
@staze unless the printer is on Apple's list of included printers you should download the installer from the manufacturer's website and install the driver on the computers before you push the printer to the clients.
Posted on 01-05-2017 01:39 PM
It is on their list... but the client has to download those drivers when the printer is added. These are lab machines, so students aren't going to have the rights (nor should they have to) to download that software.
So I actually have to include the software on the machines ahead of time. =/
Posted on 01-05-2017 02:03 PM
So, the drivers posted on Apple's site here, even though they say they're only for up to 10.10, work just fine in 10.11. So I just deployed via policy.
That seems to have made everything work. Deploying via Configuration Profile worked, the printers appear to be properly configured, etc.
Thanks everyone!!!
Posted on 01-05-2017 02:49 PM
@staze I totally realize that personal printers put a bit of a wrench in this, but you can work around that. Depending on how many printers you might have, this could be a little difficult or just a plain pain in the butt. This is a script I used to remove some specific printers from our machines. For each printer that you need removed, just change the If Then statements and add as many as you need:
#!/usr/bin/env python
'''
Name: removeFieryDirect.py
Date: 16 December 2015
Author: Steve Wood (@stevewood_tx / swood@integer.com)
Purpose: used to remove direct fiery printing queues
'''
import subprocess
c = subprocess.check_output(["launchctl", "stop", "org.cups.cupsd"])
p = subprocess.check_output(["lpstat", "-a"])
p = p.split()
for words in p:
if 'Garth' in words:
k = subprocess.check_output(["lpadmin", "-x", "Garth"])
if 'Wayne' in words:
k = subprocess.check_output(["lpadmin", "-x", "Wayne"])
if 'PrinterDinklage' in words:
k = subprocess.check_output(["lpadmin", "-x", "PrinterDinklage"])
if 'Atlanta-Xerox' in words:
k = subprocess.check_output(["lpadmin", "-x", "Atlanta-Xerox"])
d = subprocess.check_output(["launchctl", "start", "org.cups.cupsd"])
You could at least use that to delete just the printers you need and not touch personal printers.