Posted on 12-11-2018 03:27 AM
We must change the DNS-settings for our clients.
I would try to manage it by jamf to expand the computername with the domain for DNS.
i found a script at jamfnation but it changes the computername to "iMac" - that's not so good for us ;-)
so i wrote this to test it for me:
"#!/bin/bash
scutil --set HostName "Computername.ourdomain"
exit 0"
it works but i don't want to make this for each mac individually.
Is there a reason to set this for all clients ?
I found many scripts on jamfnation for DNS-Changes but tey all changes the ip-adresses.....
Kind regards,
Frank
Posted on 12-11-2018 04:41 AM
You can do something like this:
#!/bin/sh
cName=$(networksetup -getcomputername)
domain="domain.name"
scutil --set HostName "$cName.$domain.name"
exit 0
Posted on 12-11-2018 06:05 AM
That's it
It works fine !!
Thanks for your support!!!