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.

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?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
With 10.8 I had to create a profile with IPC (we don't have a lion server), was able to create a system profile but still doesn't activate wireless before login. I get the error that network accounts are unavailable. It's also a WPA2 Enterprise network, would the second hack work for that? –  Matt Pieper Dec 13 '12 at 16:59
    
It should work fine... Basically all the first script is saying is "hey run this other script at startup" and the second script is saying "turn on the airport and connect to this network using this password" –  InfluenceJamie Dec 14 '12 at 20:19
    
The only issue with this setup is that when you logout as user and login window is displayed, the script doesn't effect to connect on wifi. I would appreciate if you know how to do the little hack in order the script will run during start up screen. –  James Wise Sep 12 '13 at 6:13
    
Sorry, can you explain in more detail what you're trying to do... Is the problem that you are wanting the script to run when you log out and log in as a different user? –  InfluenceJamie Sep 13 '13 at 5:42
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.