Can’t connect to WiFi in debian 9 and Ubuntu 17.04/17.10 [FIXED]

Source: Linux Super User

Recently I installed Debian 9 xfce on my home desktop, I was able to connect to the wi-fi network at the time of installation but after logging into desktop I am not able to connect to any wi-fi network using network manager.

After some searching I have found that this issue is due to the new privacy feature (MAC address randomization) in the new version of NetworkManager causing some wi-fi adaptors to stop working.

Both Debian 9 and Ubuntu 17.04/17.10 are badly affected with this bug, You can read more about this bug in Debian 9 here and Ubuntu 17.04/17.10 here .

Follow below steps to fix this issue in Debian 9 and Ubuntu 17.04/17.10
Edit NetworkManager config file
 sudo nano /etc/NetworkManager/NetworkManager.conf

Now add below lines to the file


[device]
wifi.scan-rand-mac-address=no

 

Restart NetworkManager service
 sudo systemctl restart NetworkManager 

Now you will be able connect to wi-fi network.