How to Fix Can't Connect To Wifi In Debian 9 And Other Debian Based Linux - MAC Randomization Bug

Share:

This article will guide you to fix wifi not being connected to any wireless network due to a bug on Network Manager on Debian 9 and other debian based distros like Ubuntu. I personally stumble upon this issue on my Debian 9(Cinnamon) distro and after googling for sometime knew about this bug on Network Manager's specific version. You can refer to this link for more info on this bug or just scroll down for a quick fix.

Because of this bug what happens is this that, whenever you try to connect to a wifi, it tries to connect for a long time and then simply just gives a notification saying 'The network connection has been disconnected.'

To fix this issue you can either upgrade/downgrade to the bug free version of Network Manager Or just edit a small configuration file of the Network Manager. So, in this article we will guide you to edit the configuration file to fix the problem, which prevented the wifi from working.

Follow the below steps to fix the issue on your Debian 9 based distro;

Steps:
1.Edit the Network Manager Configuration File
2.Restart Network Manager Service
3.Connect to Wifi Successfully.
Note: You will need root access to edit the config file. Use "sudo" or login to your root account.
Fist of all open the terminal and type the following command to edit the configuration file. I will simply use the gedit to edit the config file.
sudo gedit /etc/NetworkManager/NetworkManager.conf
Now copy the below text and paste at the end of the file
[device]
wifi.scan-rand-mac-address=no
And now save it.

Suggested Read: How to write in Non-English Language on Linux (Nepali, Hindi, Russian etc)

Now we will have to restart the Network Manager, for that enter the following command in the terminal;
sudo systemctl restart NetworkManager

Now You should be able to connect to your wireless AP. If in case you weren't able to connect successfully try to restart. And sure dont hesitate to comment below your issue.

4 comments

salomon said...

It does work after restarting.

Tushar Kulkarni said...

It works! Thanks a lot!

Doc Blades said...

smooth as a glove. Perfect solution

Telstra Support said...

Internet Service Providers hold an important space in our world. All of our personal, as well as professional work, is somehow based upon the Internet. One day without the internet feels like backward by ages. Sometimes modem comes up with technical clich├ęs like, it connects to the internet but don’t allow browsing. It can be solved via simple steps.
How to connect Telstra wifi