Hello all,
I'm trying to create a policy to remove printers with a script. The script I found on here that I'm trying to use is:
#!/bin/sh
# remove all printers
rm -rf /etc/cups/printers.conf
# restart cups
killall cupsd
exit 0
When I put it in a policy in Self Service and run it I get the following back in the log:
Executing Policy Remove Printers Script...
[STEP 1 of 2]
Mounting casdjamf.chambersburg.k12.pa.us to /Volumes/CasperShare...
[STEP 2 of 3]
Mounting casdmac to /Volumes/CasperShare 1...
Error: Could not mount distribution point "casdmac".
[STEP 3 of 3]
Running script removeprinters.sh...
Script exit code: 126
Script result: sh: /Library/Application Support/JAMF/tmp/removeprinters.sh: /bin/sh
#: bad interpreter: No such file or directory
I tried running the script using the sh command in terminal I don't get any error messages, but I still have my printers as well. I tried doing some research here and through Google but I'm still kind of stuck. Any advice is greatly appreciated.