Posted on 02-19-2015 11:09 AM
printers deployed via policy (Self Service) have the 'share this printer on the network' CHECKED. How do I get this to deploy UN-CHECKED ?
The printer is being uploaded UN-checked, .
Solved! Go to Solution.
Posted on 02-19-2015 01:31 PM
I've been using the Files and Processes section in the same policy that adds the printer, no issues so far
Execute Command lpadmin -p YOURPRINTERNAME -o printer-is-shared=false
Posted on 02-19-2015 11:14 AM
Hi,
There's a bunch of suggestions and examples on this thread: https://jamfnation.jamfsoftware.com/discussion.html?id=11050
Posted on 02-19-2015 01:00 PM
davidacland - also, the printers that get added by policy have 'share this printer on the network' CHECKED but the computers have 'Printer Sharing is turned OFF, but i would like to have the printers UN-Checked
im not really great at scripting, so I did some cut and paste (from the settimezone script and created a script.sh. In the policy I added the script with priority 15 'After', the setting for the parameter is My printer name (printer name has spaces, i used no quotes when adding the printer name in the scripts parameter section of the policy )
here is the script
#!/bin/bash
# A HARDCODED VALUE FOR "Printer_Name" CAN BE SET BELOW.
# A list of accepted time zone values can be generated using the following command in Terminal:
#
# This script disables printer sharing on a designated printer.
# Delete the double quotes and replace with the desired printer_name,
# If this script is to be deployed via policy using the JSS leave the next line as is.
printer_name=""
lpadmin -p "$printer_name" -o printer-is-shared=false
echo "Print Sharing for $printer_name has been disabled."
exit 0
Posted on 02-19-2015 01:31 PM
I've been using the Files and Processes section in the same policy that adds the printer, no issues so far
Execute Command lpadmin -p YOURPRINTERNAME -o printer-is-shared=false
Posted on 02-19-2015 04:03 PM
@May - my Files and Processes is not working. The printer name has spaces, so would I have to put the printer name in " " ? Ex. " Mathlab-sharp mx-c311"
lpadmin -p "Mathlab-sharp mc-c311" -o printer-is-shared=false
Posted on 02-19-2015 04:17 PM
Or. Mathlab-sharp_mc-c311
Posted on 02-20-2015 09:27 AM
based on lpstat -p I would have to name it Mathlab_sharp_mc_c311
Posted on 02-20-2015 09:35 AM
@tcandela ah, i remember that now!
i was fortunate enough to be able to rename the printer so it had no spaces.
Did you test with the quotes?
Posted on 02-20-2015 10:11 AM
when i tested with quotes from command line I was getting things like 'command not found' 'the printer uri must be of form pip://HOSTNAME/printers/PRINTERNAME echo 'message'
once I changed it to Mathlab_sharp_mc_c311 it went directly to the echo 'message' I checked system preferences and printer sharing was Unchecked
I have not tested via Casper yet, I will run a 'self service' printer install soon, i put that lpadmin -p .............. in the policies Files and Processes section