Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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/com.apple.airport.preferences.plist 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
add comment

1 Answer

up vote 3 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
add comment

Your Answer

 
discard

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.