Posted on 03-12-2013 09:14 AM
I am setting here in a Casper Training and I have a situation that I need some help. I was wondering if there is a policy set or a script to set a DNS on a static based environment. I work at a school that hosts it's own DNS and has no DHCP set up. Any ideas would be helpful.
Posted on 03-12-2013 09:25 AM
You can probably create a shell script that leverages the networksetup command using the setdnsservers flag.
networksetup -setdnsservers networkservice dns1 [dns2] [...]
-setdnsservers networkservice dns1 [dns2] [...]
Use this command to specify the IP addresses of servers you want the specified
<networkservice> to use to resolve domain names. You can list any number of
servers (replace dns1, dns2, and so on with the IP addresses of domain name
servers). If you want to clear all DNS entries for the specified network
service, type "empty" in place of the DNS server names.
Posted on 03-12-2013 10:28 AM
You guys rock and Dusty from Minneapolis says "Hi"
Posted on 03-12-2013 11:49 AM
kuwahrg's solution is good.
Now, hop in the DeLorean and come up to 2013.
Posted on 03-18-2013 07:53 AM
I like it back here in 1995. But I will talk with Doc Brown.