Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

setDNSServers.sh -- Set a DNS server for a specified network interface

Synopsis

sudo setDNSServers.sh
sudo setDNSServers.sh <mountPoint> <computerName> <currentUsername> <networkInterface> <dnsServer>

If the $networkInterface parameter is specified (parameter 4), this is the Netowrk Interface for
which DNS server that will be set. The expected values for the $networkInterface parameter can
be found by running the command:

networksetup -listallnetworkservices

If the $dnsServer parameter is specified (parameter 5), this is the DNS server that will be set.

If no parameter is specified for parameters 4 and 5, the hardcoded value in the script will be used.

Description

This script will set a DNS Server in the network settings for whichever network interface has been specified.

Download

Preview

Generating Preview...

906 Downloads
Uploaded: 11/5/11 at 7:53 PM by jake
Product: Mac OS X