pop-os / cosmic-applets

WIP applets for cosmic-panel
GNU General Public License v3.0
203 stars 74 forks source link

cosmic-applet-network: Cannot connect to WPA2/PEAP/MSCHAPv2 enterprise network #225

Open ryanabx opened 7 months ago

ryanabx commented 7 months ago

The device I am testing this on is a Dell Latitude 7390 2-in-1 running a custom Fedora ostree image with all cosmic modules updated to master. (See here)

The network I am trying to connect to requires a username and a password. Cosmic Network Applet only asks for a password, and then won't connect.

I looked into the problem by checking out this help thread, this might be useful for figuring out the fix in the network applet: https://askubuntu.com/questions/279762/how-to-connect-to-wpa2-peap-mschapv2-enterprise-wifi-networks-that-dont-use-a-c

I don't think the network applet is capable (yet) of connecting to these types of networks, because I still cannot connect to the network, even after modifying the network configuration file.

wash2 commented 7 months ago

Thanks for letting me know, I'll look into this issue, and work on adding support for WPA2/PEAP/MSCHAPv2. but I'm not sure that I have a good way of testing it.

ryanabx commented 7 months ago

Thanks for letting me know, I'll look into this issue, and work on adding support for WPA2/PEAP/MSCHAPv2. but I'm not sure that I have a good way of testing it.

If you have a PR at any point, let me know and I'll be more than happy to test it

ryanabx commented 7 months ago

@wash2 this information might be helpful for the PR, I used the network manager cli (nmcli) to connect eventually. Here's the command I ran:

nmcli connection add \
  type wifi \
  connection.id WIFI_NAME \
  wifi.ssid SSID \
  wifi.mode infrastructure \
  wifi-sec.key-mgmt wpa-eap \
  802-1x.eap peap \
  802-1x.identity IDENTITY \
  802-1x.phase2-auth mschapv2 \
  802-1x.password PASSWORD

If you're busy with other things, I might look into the code and see how the network applet interfaces with NetworkManager. It's possible I could figure out a fix. Should just be as simple as detecting if the network is wpa2 enterprise and using networkmanager under the hood.

References: https://www.reddit.com/r/linuxquestions/comments/twr6vu/network_manager_and_wpa2enterprise/

wash2 commented 7 months ago

Ok, I might be busy but this is helpful. I'll try to look into it some more today or tomorrow, but if you get a chance, please feel free to give it a try :).

ryanabx commented 7 months ago

Ok, I might be busy but this is helpful. I'll try to look into it some more today or tomorrow, but if you get a chance, please feel free to give it a try :).

I'm giving it a look-see right now! I got acquainted with how the dbus interface works and system76's rust bindings to NetworkManager. Now I'm seeing if I can make it detect when a network requires a username/password instead of just a password.