I am new to JSS and generally impressed with what I find. However I was disappointed to see that admin users can change their machine names. Since I have no authority to remove admin rights here and wanted to use smart groups based on names to dictate policy it concerned me.
I devised a script that uses a spare editable field in JSS (barcode_2) to store a backup of the desired computer name and enforces it as the active computer name. In this way of the name it changed, it gets changed back at login (or other trigger point).
It's my first bash script in a while and my first foray into the JSS API.
I'd like help from the community testing and improving it please. I'm unfamiliar with JAMFNation. What is the best/accepted approach for this? Do I post the script here? Or somewhere else?
After it is concluded I'm happy to upload to the general scripts tab, if allowed.
Specifically I'm looking for error condition checking, what versions of OSX it can be made to work on (dependency checking) and general improvements. How should I go about this?
Best Wishes
Matt
Edit reason: typo.