使用 ID 和密码使用 wpa_supplicant 连接到大学 WiFi

使用 ID 和密码使用 wpa_supplicant 连接到大学 WiFi

我最近重新安装了操作系统,却忘记备份/etc/wpa_supplicant/wpa_supplicant.conf文件,所以我花了一天时间研究如何连接到 WiFi。

我可以很好地连接到带有 SSID 的公共网络CUGuest,所以我认为我的驱动程序都没有问题,并且dhcpcd.在不是我的笔记本电脑的计算机上,我可以登录到CUWireless使用我的学校 IDJDR74731和密码命名的安全 WiFi 网络*****...不需要证书文件。

我一直在弄乱表单的配置文件

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

我尝试使用如下命令连接到 WiFi

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

之后,我检查使用iw dev wlp3s0 link以查看是否发生了任何令人兴奋的事情,当我仍然无法访问网络时,我检查命令的输出wpa_supplicant(我将其输出放入使用标志指定的日志文件中-f):

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 

据我所知。即使您不知道问题可能是什么,我也希望得到任何有关此问题的调试建议!我一直在摆弄wpa_supplicant.conf并希望最终能起作用,但我已经筋疲力尽了。

的相关输出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

还,

$ 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

我的系统附带了已安装的副本netctl,但我将其删除了。我不认为任何其他网络套件会与wpa_supplicant.我确保sudo killall wpa_supplicant在所有的试验之间。

答案1

我最终让它工作

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

我原以为列出多个协议key_mgmt将允许使用其中任何一个协议,即列出其中许多协议并没有什么坏处。然而,根据文档,该WPA-PSK值需要一个字段。psk我认为,由于我没有字段,psk但仍然列WPA-PSK在 下key_mgmt,所以该软件变得混乱并且无法工作。对此并不能100%确定。

相关内容