Difference between revisions of "wpa supplicant"
From Noah.org
Jump to navigationJump to searchm |
|||
Line 23: | Line 23: | ||
</pre> | </pre> | ||
− | == simple, with restriction on | + | == simple, with restriction on the key type == |
<pre> | <pre> |
Revision as of 05:25, 25 February 2010
script
This is similar to running wpa_pas expect that it adds scan_ssid=1 to the config and it deletes the plantext password..
#!/bin/bash $TARGET_SSID=$1 $PASSWORD=$2 (echo "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin";wpa_passphrase "${TARGET_SSID}" "${PASSWORD}" | grep -v \#psk | sed '/ssid/a \\tscan_ssid=1')
simplest
# Note that the key, psk, is in plaintext. network={ ssid="omega" scan_ssid=1 psk="wifipassword" }
simple, with restriction on the key type
# Note that the key, psk, is in plaintext. network={ ssid="omega" scan_ssid=1 key_mgmt=WPA-PSK psk="wifipassword" }
examples
cat /proc/net/dev cat /proc/net/wireless ifconfig ra0 up iwlist ra0 scan
# iwlist ra0 scan ra0 Scan completed : Cell 01 - Address: 00:14:BF:28:FA:76 ESSID:"homebase" Mode:Managed Channel:1 Quality:76/100 Signal level:-60 dBm Noise level:-97 dBm Encryption key:on Bit Rates:54 Mb/s IE: WPA Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK IE: IEEE 802.11i/WPA2 Version 1 Group Cipher : TKIP Pairwise Ciphers (2) : CCMP TKIP Authentication Suites (1) : PSK
# wpa_passphrase homebase foobar77 network={ ssid="homebase" #psk="foobar77" psk=6d17e9c2946eae02e0dbb65b23bff89397396cdfb244df31fc10fd68dd004efa }
# allow frontend (wpa_cli) to be used by all users in 'admin' group ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=admin network={ ssid="homebase" psk=6d17e9c2946eae02e0dbb65b23bff89397396cdfb244df31fc10fd68dd004efa scan_ssid=1 key_mgmt=WPA-PSK }