Ubuntu – Cannot downgrade wpa_supplicant to fix Wi-Fi connection to a corporate network (WPA2/PEAP with no CA certificate) in Ubuntu 18.04

18.04downgradewirelesswpa-supplicant

I recently upgraded my Ubuntu from 16.04 to 18.04 (clean install, full wipe). Now I can no longer connect to the corporate network at my office (perhaps related to these bugs: bug 1, bug 2). What proved to fix this issue in Ubuntu 16.04 is the answer to this question; Downgrade wpa_supplicant to 2.1.

However, even with the linode repository, this fix can no longer be applied. There is no version for wpa_supplicant below 2.6 to the best of my knowledge for Ubuntu 18.04.

My question is this: How can I downgrade wpa_supplicant to 2.1 for Ubuntu 18.04?

Configuration needed for corporate the wifi connection:

  • Security: WPA & WPA2 Enterprise
  • Authentication: Protected EAP (PEAP)
  • Checkbox No CA certificate required.
  • Inner authentication: MSCHAPv2

Best Answer

I found a solution and it is working flawlessly. Here are the steps:

  1. Add Ubuntu Vivid and Xenial repos.

    $ cat <<'EOF' | sudo tee /etc/apt/sources.list.d/vivid.list
    deb http://old-releases.ubuntu.com/ubuntu/ vivid main restricted universe multiverse
    deb http://old-releases.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse
    deb http://old-releases.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
    EOF
    
    $ cat <<'EOF' | sudo tee /etc/apt/sources.list.d/xenial.list
    deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
    deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
    EOF
    
  2. Update your repo list.

    $ sudo apt -y update
    
  3. Downgrade wpasupplicant and install libssl.

    $ sudo apt -y --allow-downgrades install wpasupplicant=2.1-0ubuntu7.3
    
    $ sudo apt -y --allow-downgrades install libssl1.0.0=1.0.2g-1ubuntu4.14
    
  4. Setup priority for the recently installed packages.

    $ sudo echo -e "Package: wpasupplicant\nPin: release o=Ubuntu,n=vivid\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/vivid
    
    $ sudo echo -e "Package: libssl1.0.0\nPin: release o=Ubuntu,n=xenial\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/xenial
    
  5. Restart your computer.

Credits: http://viranzo.blogs.upv.es/2018/09/11/downgrade-wpa_supplicant-ubuntu-18-04

Related Question