use casper to ensure naming convention solution

tlarkin
Honored Contributor

I know this has been discussed over and over again on the list, and I have come up with a solution. Borrowing from the dummy package system, I have devised a very simple method of enforcing computer names so if users that have rights change the name it gets changed back.

This is a low resource solution as it only requires to run a simple shell script to check the name and change it off a local configuration file.

Attached are two scripts, the first one will grab the computer's current computer name and store it in a file /Library/Receipts/computername.conf.

The second script you can have a Casper policy run once a day, or when ever you want it to run. It will read the contents of computername.conf and then compare it to the current computer name and change it if need be.

Then you can run the first script whenever you image a machine via a post run policy in your imaging config. Then whatever the name is in the JSS will be stored in that file. I think it is important to stress that running it right after imaging will store the name that the JSS gives it.

So, this is kind of like the dummy package system, and I wrote the script with out using the jamf binary so you can run it over ARD admin or what not as well or on machines that are not managed by the JSS.

I have only tested this on one machine and when I changed the name, it changed it back. I guess I Could also incorporate a recon in the script too that way it is updating the JSS when the name changes.

Thought I would share since I know we have been discussing this in the past on this mailing list. I have had a few problems with machines being named wrong. Of course if this script runs with the computer name being wrong it will store the wrong name in the computername.conf file.

Thoughts?

-Tom



Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351

0 REPLIES 0