Skip to main content

Hi,
Has anyone had any luck setting Airport to switch wireless networks that
use a mere WEP key? I've read a lot about Leopard not remembering recent
networks or retaining the password. I can use networksetup just fine
within 10.6 and it always rejoins the network after rebooting. Any help
would be appreciated.



John McLaughlin
Technical Support Specialist
Newton Public Schools

I actually setup the network and copied the
/Library/Preferences/SystemConfiguration into a package and have a script
the renames it at the end. so it resets the Airport back to default
settings I choose. The reason for the rename is the computer name is
embedded in there also.
D. Trey Howell
ACMT, ACPT, ACDT, ACHDS
trey.howell at austinisd.org
Desktop Engineering
twitter @aisdmacgeek


I got this little pkg from a guy at Apple. Read the instructions on, and once you configure it you can drop it into casper and deploy. I hope the attachment goes through, as I have had the list reject my emails sometimes. If it doesn't go through contact me off list and I will send it.



?xml version="1.0" encoding="ISO-8859-1"?>





Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base


Did you replace com.apple.airport.preferences.plist and preferences.plist
with your package? Are those files the only ones responsible for the
change? How are you setting the password? I've been scripting the
additional entries using PlistBuddy. What exactly are your renaming in
your script?



John McLaughlin
Technical Support Specialist
Newton Public Schools


Thomas, this will come in handy... I'll have to try it out. Reading the
readme however, it says the package expires 12/31/09, I wonder if it will
stop working.


OK I will just reply to the list. I got this from a guy at Apple, and
it has an expiration date because at some point in time this little PKG
may be integrated into the OS itself. That is the only reason why it is
set to expire. I don't think it actually will expire, but that is why.
So, maybe the next update of SL will have this wireless deployment stuff
built into it.



If you want to take the pkg apart and inspect it, you can grab a copy of
"Pacifist" which will allow you to do so. Maybe you can modify it to
make it work better for you.





Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base


On a side issue, you can take the PKG apart in Composer, you dont need
Pacifist, just drag the pkg into Composer list and then convert to
source and you can inspect the contents



Criss



Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054


Oh yeah I knew that....not enough coffee this morning


Hey everyone, I am in the middle of switching everything over to
compiled configurations and so that means I have to script a lot of post
image settings since I am never logging in to the OS and setting them
before hand. So, I was looking into configuring my network settings and
I recall running into this before. Now, we are a complete 10.5 shop so
your results may vary if you are running any different versions. If you
look here:



/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport



You can set all sorts of things from this framework. If you run that
with the --help command you get this:



tlarkin$
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
--help
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
AirPort v.528.1 (528.1.0)
Supported arguments:
-z --disassociate Disassociate from any network
-i[<arg>] --ibss=[<arg>] Create IBSS
-x --xml Print info as XML
-s[<arg>] --scan=[<arg>] Perform a wireless broadcast scan.
Will perform a directed scan if the optional <arg> is provided
-r<arg> --repeats=<arg> Repeat the command the specified number
of times
-A[<arg>] --associate=[<arg>] Associate to network.
Will prompt for network name if arg is not specified
and if necessary, for a password if the network is using WEP or WPA.
The following additional arguments may be specified with this command:



--bssid=<arg> Specify BSSID to
associate with
--password=<arg> Specify a WEP key or
WPA password
-I --getinfo Print current wireless status, e.g.
signal info, BSSID, port type etc.
-P<arg> --psk=<arg> Create PSK from specified pass phrase
and SSID.
The following additional arguments must be specified with this
command:
--ssid=<arg> Specify SSID when
creating a PSK
-c[<arg>] --channel=[<arg>] Set arbitrary channel on the card
-h --help Show this help
admins-imac:~ tlarkin$



FYI



-Tom



?xml version="1.0" encoding="ISO-8859-1"?>





Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base


I was just poking around with this in 10.6.2, and the commands have
changed. The "airport" utility no longer allows you to add a network with
the -A flag. In fact, a lot of these flags are marked as "legacy".



It appears that Apple has moved some of the functionality to the
"networksetup" utility with these flags/switches:



-getairportnetwork hardwareport
-setairportnetwork network hardwareport [password]
-getairportpower hardwareport
-setairportpower hardwareport on | off
-listpreferredwirelessnetworks hardwareport
-addpreferredwirelessnetworkatindex hardwareport network index securitytype
[password]
-removepreferredwirelessnetwork hardwareport network
-removeallpreferredwirelessnetworks hardwareport



I haven't started playing with these, and for all I know they've been there
all along.



Steve Wood
Director of IT
swood at integer.com



The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475


IIRC, most of those have been there since 10.5
---
Jared F. Nichols
Desktop Engineer, Infrastructure & Operations
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436



On Nov 10, 2009, at 10:40 AM, Steve Wood wrote:



I was just poking around with this in 10.6.2, and the commands have changed The "airport" utility no longer allows you to add a network with the -A flag. In fact, a lot of these flags are marked as "legacy".



It appears that Apple has moved some of the functionality to the "networksetup" utility with these flags/switches:



-getairportnetwork hardwareport
-setairportnetwork network hardwareport [password]
-getairportpower hardwareport
-setairportpower hardwareport on | off
-listpreferredwirelessnetworks hardwareport
-addpreferredwirelessnetworkatindex hardwareport network index securitytype [password]
-removepreferredwirelessnetwork hardwareport network
-removeallpreferredwirelessnetworks hardwareport



I haven't started playing with these, and for all I know they've been there all along.



Steve Wood
Director of IT
swood at integer.com<mailto:swood at integer.com>



The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475



On Thu, Nov 5, 2009 at 8:47 AM, Thomas Larkin <tlarki at kckps.org<mailto:tlarki at kckps.org>> wrote:
Hey everyone, I am in the middle of switching everything over to compiled configurations and so that means I have to script a lot of post image settings since I am never logging in to the OS and setting them before hand. So, I was looking into configuring my network settings and I recall running into this before. Now, we are a complete 10.5 shop so your results may vary if you are running any different versions. If you look here:



/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport



You can set all sorts of things from this framework. If you run that with the --help command you get this:



tlarkin$ /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --help
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport AirPort v.528.1 (528.1.0)
Supported arguments:
-z --disassociate Disassociate from any network
-i[<arg>] --ibss=[<arg>] Create IBSS
-x --xml Print info as XML
-s[<arg>] --scan=[<arg>] Perform a wireless broadcast scan.
Will perform a directed scan if the optional <arg> is provided
-r<arg> --repeats=<arg> Repeat the command the specified number of times
-A[<arg>] --associate=[<arg>] Associate to network.
Will prompt for network name if arg is not specified
and if necessary, for a password if the network is using WEP or WPA.
The following additional arguments may be specified with this command:
--bssid=<arg> Specify BSSID to associate with
--password=<arg> Specify a WEP key or WPA password
-I --getinfo Print current wireless status, e.g. signal info, BSSID, port type etc.
-P<arg> --psk=<arg> Create PSK from specified pass phrase and SSID.
The following additional arguments must be specified with this command:
--ssid=<arg> Specify SSID when creating a PSK
-c[<arg>] --channel=[<arg>] Set arbitrary channel on the card
-h --help Show this help
admins-imac:~ tlarkin$



FYI



-Tom



?xml version="1.0" encoding="ISO-8859-1"?>





Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org<mailto:tlarki at kckps.org>
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base


Actually, the move to networksetup for wireless is new in 10.6. The nice new feature here that I’ve been told about by our SE is the ability to set the order of wireless networks, preferred connections and adding in the WPA keys, and so forth. We also looked at these at the Users Group a couple weeks ago. A very welcome change! This will help with the conversation on this list some time ago about wanting to force computers to use a certain network vs. the neighbors networks. You could script it to keep applying the preferred network and at least make it a pain to use other networks.



John



--
John Wetter
Technology Support Administrator
Educational Technology, Media & Information Services
Hopkins Public Schools
952-988-5373


Reply