Conecte-se ao WiFi da universidade usando wpa_supplicant usando ID e senha

4

Recentemente, reinstalei meu sistema operacional e esqueci de fazer backup do arquivo /etc/wpa_supplicant/wpa_supplicant.conf , por isso passei o dia imaginando como me conectar ao Wi-Fi.

Eu posso me conectar a uma rede pública com SSID CUGuest , então acho que meus drivers estão bem, e não há problema com dhcpcd . Em computadores que não são meu laptop, posso fazer logon em uma rede WiFi segura chamada CUWireless usando minha ID de escola JDR74731 e senha ***** ... nenhum arquivo de certificado é necessário.

Eu tenho mexido com arquivos de configuração do formulário

/etc/wpa_supplicant/wpa_supplicant.conf
---------------------------------------
network={
    ssid="CUWireless"
    key_mgmt=WPA-EAP WPA-PSK IEEE8021X
    identity="[email protected]"
    password="*****"
    disabled=0
}

Eu tento conectar-me ao WiFi usando um comando como

$ sudo wpa_supplicant -B -dd -iwlp3s0 -c/etc/wpa_supplicant/wpa_supplicant.conf -Dnl80211

Depois, eu verifico usando iw dev wlp3s0 link para ver se algo excitante aconteceu ou não, e quando ainda não consigo acessar a rede, eu verifico a saída do comando wpa_supplicant (coloco sua saída em um arquivo de log especificado com o -f flag):

wpa_supplicant v2.6
Successfully initialized wpa_supplicant
Initializing interface 'wlp3s0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
Line: 1 - start of a new network block
ssid - hexdump_ascii(len=10):
     43 55 57 69 72 65 6c 65 73 73                     CUWireless      
key_mgmt: 0xb
identity - hexdump_ascii(len=22):
     6a 64 72 37 34 37 33 31 40 63 72 65 69 67 68 74   jdr74731@creight
     6f 6e 2e 65 64 75                                 on.edu          
password - hexdump_ascii(len=9): [REMOVED]
Priority group 0
   id=0 ssid='CUWireless'
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Supported cipher 00-0f-ac:6
nl80211: Supported cipher 00-0f-ac:13
nl80211: Supported cipher 00-0f-ac:11
nl80211: Supported cipher 00-0f-ac:12
nl80211: Using driver-based off-channel TX
nl80211: Driver-advertised extended capabilities (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Driver-advertised extended capabilities mask (default) - hexdump(len=8): 00 00 00 00 00 00 00 40
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface wlp3s0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0xa5bb00
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=040e
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0xa5bb00 match=0500
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlp3s0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlp3s0: Own MAC address: 20:68:9d:de:e4:90
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlp3s0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlp3s0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlp3s0: No enabled networks (1 disabled networks)
wlp3s0: State: DISCONNECTED -> INACTIVE
TDLS: TDLS operation supported by driver
TDLS: Driver uses external link setup
TDLS: Driver does not support TDLS channel switching
wlp3s0: WPS: UUID based on MAC address: 1faa30f2-cb8e-574a-b056-3651783cdf9b
ENGINE: Loading dynamic engine
ENGINE: Loading dynamic engine
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Add operating class 115
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 116
P2P: Channels - hexdump(len=2): 24 2c
P2P: Add operating class 117
P2P: Channels - hexdump(len=2): 28 30
P2P: Add operating class 124
P2P: Channels - hexdump(len=1): 95
P2P: Add operating class 125
P2P: Channels - hexdump(len=1): 95
P2P: Add operating class 130
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Own listen channel: 81:6
P2P: Random operating channel: 81:6
P2P: initialized
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149 125:149 130:36,40,44,48
P2P: cli_channels:
wlp3s0: Added interface wlp3s0
wlp3s0: State: INACTIVE -> DISCONNECTED
nl80211: Set wlp3s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
wlp3s0: Determining shared radio frequencies (max len 1)
wlp3s0: Shared frequencies (len=0): completed iteration
P2P: Add operating class 81
P2P: Channels - hexdump(len=11): 01 02 03 04 05 06 07 08 09 0a 0b
P2P: Add operating class 115
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Add operating class 116
P2P: Channels - hexdump(len=2): 24 2c
P2P: Add operating class 117
P2P: Channels - hexdump(len=2): 28 30
P2P: Add operating class 124
P2P: Channels - hexdump(len=1): 95
P2P: Add operating class 125
P2P: Channels - hexdump(len=1): 95
P2P: Add operating class 130
P2P: Channels - hexdump(len=4): 24 28 2c 30
P2P: Update channel list
P2P: channels: 81:1,2,3,4,5,6,7,8,9,10,11 115:36,40,44,48 116:36,44 117:40,48 124:149 125:149 130:36,40,44,48
P2P: cli_channels:
Daemonize..
RTM_NEWLINK: ifi_index=3 ifname=wlp3s0 operstate=2 linkmode=1 ifi_family=0 ifi_flags=0x1003 ([UP])
EAPOL: disable timer tick
wlp3s0: Removing interface wlp3s0
wlp3s0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
TDLS: Tear down peers
wlp3s0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlp3s0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlp3s0: WPA: Clear old PMK and PTK
wlp3s0: Cancelling scan request
wlp3s0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
wlp3s0: P2P: Disable P2P since removing the management interface is being removed
P2P: All ASP advertisements flushed
P2P: Disabling Extended Listen Timing
P2P: Stopping find
P2P: Clear timeout (state=IDLE)
P2P: State IDLE -> IDLE
P2P: All ASP advertisements flushed
Remove interface wlp3s0 from radio phy0
Remove radio phy0
nl80211: deinit ifname=wlp3s0 disabled_11b_rates=0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x88888888882d3389 (mode change)
wlp3s0: CTRL-EVENT-TERMINATING 

Isso é o máximo que eu consegui. Mesmo se você não tem idéia do que o problema pode ser, eu adoraria qualquer conselho de depuração sobre isso! Acabei de mexer com wpa_supplicant.conf e espero que, eventualmente, as coisas funcionem, mas estou ficando exausto.

A saída relevante de iw dev wlp3s0 scan é

BSS 88:75:56:86:48:a1(on wlp3s0)
    TSF: 2840049015012 usec (32d, 20:54:09)
    freq: 2412
    beacon interval: 102 TUs
    capability: ESS Privacy ShortPreamble ShortSlotTime RadioMeasure (0x1431)
    signal: -70.00 dBm
    last seen: 20320 ms ago
    Information elements from Probe Response frame:
    SSID: CUWireless
    Supported rates: 5.5* 6.0 9.0 11.0 12.0 18.0 24.0 36.0 
    DS Parameter set: channel 1
    TIM: DTIM Count 0 DTIM Period 1 Bitmap Control 0x0 Bitmap[0] 0x0
    Country: US Environment: Indoor/Outdoor
        Channels [1 - 11] @ 30 dBm
    BSS Load:
         * station count: 2
         * channel utilisation: 54/255
         * available admission capacity: 23437 [*32us]
    Power constraint: 3 dB
    ERP: <no flags>
    HT capabilities:
        Capabilities: 0x19ac
            HT20
            SM Power Save disabled
            RX HT20 SGI
            TX STBC
            RX STBC 1-stream
            Max AMSDU length: 7935 bytes
            DSSS/CCK HT40
        Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
        Minimum RX AMPDU time spacing: 8 usec (0x06)
        HT RX MCS rate indexes supported: 0-23
        HT TX MCS rate indexes are undefined
    RSN:     * Version: 1
         * Group cipher: CCMP
         * Pairwise ciphers: CCMP
         * Authentication suites: IEEE 802.1X
         * Capabilities: 4-PTKSA-RC 4-GTKSA-RC (0x0028)
    Extended supported rates: 48.0 54.0 
    HT operation:
         * primary channel: 1
         * secondary channel offset: no secondary
         * STA channel width: 20 MHz
         * RIFS: 1
         * HT protection: no
         * non-GF present: 1
         * OBSS non-GF present: 0
         * dual beacon: 0
         * dual CTS protection: 0
         * STBC beacon: 0
         * L-SIG TXOP Prot: 0
         * PCO active: 0
         * PCO phase: 0
    Extended capabilities: Proxy ARP Service, QoS Map, WNM-Notification, 0
    WMM:     * Parameter version 1
         * u-APSD
         * BE: CW 15-1023, AIFSN 3
         * BK: CW 15-1023, AIFSN 7
         * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
         * VO: CW 3-7, AIFSN 2, TXOP 1504 usec

Além disso,

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 20:6a:8a:91:79:58 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 20:68:9d:de:e4:90 brd ff:ff:ff:ff:ff:ff

Meu sistema veio com uma cópia do netctl instalado, mas eu o removi. Eu não acho que quaisquer outros conjuntos de redes estejam interferindo com wpa_supplicant . Eu me certifico de sudo killall wpa_supplicant entre todos os meus testes.

    
por Jordan 04.05.2017 / 01:28

1 resposta

2

Acabei fazendo isso funcionar com

/etc/wpa_supplicant/wpa_supplicant.conf
---------------------------------------
network={
     ssid="CUWireless"
     key_mgmt=WPA-EAP
     identity="[email protected]"
     password="*****"
}

Eu achava que listar vários protocolos em key_mgmt permitiria que qualquer um deles fosse usado, ou seja, não havia problema em listar muitos deles. O valor WPA-PSK requer um campo psk , no entanto, de acordo com a documentação. Eu acho que, desde que eu não tenho um campo psk mas ainda assim listei WPA-PSK sob key_mgmt , o software ficou confuso e não funcionou. Não tem 100% de certeza sobre isso.

    
por 04.05.2017 / 05:01