Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a default 10.8 image for our corporate Mac users. We have a local Wifi network which should be set up by default on this image. I have used PackageMaker to set up all the other deployed software and settings, and would like to keep it that way. I am using InstaDMG to build the image (another reason to prefer the modular packaging method I have in place).

I have tried deploying a .keychain file to /Library/Keychains/, but the AP is not picked up; I am also aware of /Library/SystemConfiguration/ but after deploying this, the system still does not result in the expected behavior.

How can I deploy system-wide Wifi settings to a unbooted images using packages?

share|improve this question
You might want to specify the OS you are building, as there are major changes between 10.6, 10.7 and 10.8 as to how network configurations can be imported and exported. – da4 Jan 7 '13 at 17:50
OS Version Added. – zwerdlds Jan 9 '13 at 20:32
up vote 5 down vote accepted

I believe PackageMaker includes some first-run scripts, does it not? The easiest way is probably to make use of the networksetup command line tool in a script set to run on the first launch of an image.

To add a WPA network:

networksetup -addpreferredwirelessnetworkatindex AirPort mynetworkSSID 0 WPA superSecretPassword

The encryption type can be one of:

  • OPEN — open hotspot, no passphrase necessary of course.
  • WPA
  • WPAE (WPA Enterprise)
  • WPA2
  • WPA2E (WPA2 Enterprise)
  • WEP
  • 8021XWEP (802.1X WEP)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.