Enabling Wireless Before Logon for Active Directory

active-directoryenterpriseNetworkSecuritywifi

We are purchasing computers in the next week on our Enterprise network and will have a mix of Macs and PCs. We are currently running our AD server on Windows Server 2008R2.
We use folder redirection and mounting for all of our users, and would want the folder to automount on login for Apple. We have a LAN and also a radius authenticated wireless network on PEAP.

I have successfully joined the AD with my MB Pro, but cannot login to AD due to the wireless not working before login.

Has anyone ran across this issue before or know of a fix?

Best Answer

Couple of different ways to fix this. First, and probably the best as it doesn't involve any hacks is:

  1. In the network preference pane of system preferences click on Wi-Fi on the left
  2. Click "Advanced"
  3. Click on 802.1x.
  4. Click the plus sign
  5. Click Add Login Window Profile.

Apple has some nice looking pictures and instructions of the above here.

If that doesn't work for you, there is a UNIX hack you can use.

In /Library/LaunchDaemons, create a file called "com.example.airport.plist" containing the following code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Debug</key>
<false/>
<key>Label</key>
<string>com.example.airport</string>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/YOURUSERNAMEHERE/bin/join-wifi.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

This tells it to run the script /Users/YOURUSERNAMEHERE/bin/join-wifi.sh at start-up. Obviously, replace YOURUSERNAMEHERE with your OS X username so that this corresponds to a folder off your home directory.

Then, in your home directory, make sure that you have a "bin" folder for storing scripts. Create a file therein called join-wifi.sh that contains this:

#!/bin/bash
networksetup -setairportpower en1 on
networksetup -setairportnetwork en1 your-network-name-goes-here 'your-WPA-key-goes-here'

In this last file, replace the your-network-name-goes-here with the name of the wireless network, and replace your-WPA-key-goes-here with your wireless network's password.

It's not a great solution, and certainly not a secure way to store your wifi access data, but it should work to get you connected at login next time you reboot.