Posted on 11-21-2017 10:06 AM
I have several printers setup to be deployed via Self Service. Despite my not having turned it on while creating the printer configuration, every time a printer is installed using Self Service, the option to "Share this printer on the network" gets turned on. The printer sharing service does not get turned on, so these printers are not really shared. This is more of an annoyance than anything. Does anyone else have this problem? How can I stop this from happening?
Posted on 11-21-2017 11:16 AM
We script our printers, adding -o printer-is-shared='false'
option to disable sharing for the printer.
Not sure if you can push the command if the printer is already set up, but in case you can, maybe this helps...
#!/bin/sh
#
# lpadmin:
# -p = Queue
# -v = URL
# -E = Enable
# -P = PPD
# -D = Description
# -L = Location
# -o = Options
/usr/sbin/lpadmin
-p MyFancyQueue
-v lpd://MyFancyPrinter.domain.com/MyFancyQueue
-E
-P /path/to/MyFancyPPD
-D MyFancyDescription
-L MyFancyLocation
-o printer-is-shared='false'
#other options using "-o" would go here
exit 0
Posted on 11-21-2017 11:20 AM
Thanks! I have some time scheduled tomorrow to work on our JSS. I will try this out.
Posted on 11-21-2017 03:18 PM
@jhbush1973 posted a script that might be closer to what you're looking to do?
https://www.jamf.com/jamf-nation/discussions/14270/disable-printer-sharing#responseChild86532
Posted on 11-21-2017 06:49 PM
I've written a script which generates payload-free packages, where the package's embedded script uses the lpadmin
command to create printers with a pre-set configuration. By default, printer sharing is disabled as part of the printer configuration. It's available via the link below:
https://github.com/rtrouton/payload-free_package_printer_generator
I have a post on how to use this script available via the link below: